Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .fortitude.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[check]
target-std="f2008"
line-length=140

[check.per-file-ignores]
"deps/**" = [
"C001", # implicit-typing
"C061", # missing-intent
"C071", # assumed-size
"C072", # assumed-size-character-intent
"C091", # external-procedure
"C092", # procedure-not-in-module
"C131", # missing-accessibility-statement
]
"deps/ops/public/GenMod_Platform/**" = [
"C002", # interface-implicit-typing
]
"deps/ops/public/GenMod_Sleep/GenMod_Sleep.f90" = [
"C002", # interface-implicit-typing
]
"src/opsinputs/opsinputs_cxfields_mod.F90" = [
"C121", # use-all
]
"src/opsinputs/opsinputs_cxwriter_mod.F90" = [
"C121", # use-all
]
"src/opsinputs/opsinputs_mpl_mod.F90" = [
"C061", # missing-intent
"C091", # external-procedure
]
"src/opsinputs/opsinputs_obsdatavector_interface.f90" = [
"C071", # assumed-size
]
"src/opsinputs/opsinputs_obsspace_interface.f90" = [
"C071", # assumed-size
]
"src/opsinputs/opsinputs_varobswriter_mod.F90" = [
"C091", # external-procedure
"C121", # use-all
]
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,20 @@ permissions:
contents: read

jobs:
lint:
name: Lint CMakeLists
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install cmakelint
run: |
python3 -m pip install cmakelint
- name: Lint
python3 -m pip install cmakelint fortitude-lint
- name: Run cmakelint
run: |
find -type f '(' -name 'CMakeLists.txt' -o -name '*.cmake' ')' \
-exec cmakelint '{}' ';'
- name: Run fortitude check
run: |
fortitude check --target-std=f2008 --line-length=150

build:
name: gnu-openmpi
Expand Down
4 changes: 2 additions & 2 deletions deps/gcom/gc/gc__buildconst.F90
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ MODULE gc__buildconst
IMPLICIT NONE
PRIVATE

PUBLIC :: &
#if defined(MPI_SRC)
mpiabort_errno, mpi_bsend_buffer_size, &
PUBLIC :: mpiabort_errno, mpi_bsend_buffer_size
#endif
PUBLIC :: &
gc_version, gc_build_date, gc_int_type, gc_real_type, gc_descrip, gc__isize, &
gc__rsize, gc__forterrunit

Expand Down
10 changes: 5 additions & 5 deletions deps/gcom/gc/gc__errlim.F90
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ SUBROUTINE gc__errlim(iabrt, sub, lim, mval, aval)
INTEGER (KIND=gc_int_kind) :: iabrt, mval, aval
CHARACTER(LEN=*) :: sub, lim

WRITE(*,*) 'GC_', sub, '(): internal limit MAX_', lim, &
' exceeded on processor ', gc_me()
WRITE(*,*) 'Maximum value is ', mval, '. Actual value is ', &
aval, '. Exiting.'
WRITE(*,*) "GC_", sub, "(): internal limit MAX_", lim, &
" exceeded on processor ", gc_me()
WRITE(*,*) "Maximum value is ", mval, ". Actual value is ", &
aval, ". Exiting."

CALL gc_abort(gc_me(), gc_nproc(), '*** STATIC LIMIT EXCEEDED ***')
CALL gc_abort(gc_me(), gc_nproc(), "*** STATIC LIMIT EXCEEDED ***")

RETURN
END SUBROUTINE gc__errlim
9 changes: 4 additions & 5 deletions deps/gcom/gc/gc__flush.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ SUBROUTINE gc__flush(lunit)
USE f90_unix_io,ONLY:FLUSH
#endif

USE gc_kinds_mod, ONLY: &
#if defined(LINUX_NAG_COMPILER) || defined(_X1) || defined(XD1) \
|| defined(XT3)
gc_integer32, &
#if defined(LINUX_NAG_COMPILER) || defined(_X1) || defined(XD1) || defined(XT3)
USE gc_kinds_mod, ONLY: gc_int_kind, gc_integer32
#else
USE gc_kinds_mod, ONLY: gc_int_kind
#endif
gc_int_kind

IMPLICIT NONE

Expand Down
12 changes: 6 additions & 6 deletions deps/gcom/gc/gc__stamp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ SUBROUTINE gc__stamp()
IMPLICIT NONE

WRITE(6,*)
WRITE(6,*) '====================================================='
WRITE(6,*) 'GCOM Version ', &
WRITE(6,*) "====================================================="
WRITE(6,*) "GCOM Version ", &
gc_version
WRITE(6,*) &
gc_descrip
WRITE(6,*) 'Using precision : ', &
gc_int_type , ' and ', gc_real_type
WRITE(6,*) 'Built at ', &
WRITE(6,*) "Using precision : ", &
gc_int_type , " and ", gc_real_type
WRITE(6,*) "Built at ", &
gc_build_date
WRITE(6,*) '====================================================='
WRITE(6,*) "====================================================="
WRITE(6,*)

RETURN
Expand Down
10 changes: 5 additions & 5 deletions deps/gcom/gc/gc_abort.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ SUBROUTINE gc_abort (me, nproc, mesg)
USE mpl, ONLY: mpl_comm_world
#endif

USE gc__buildconst, ONLY: &
#if defined(MPI_SRC)
mpiabort_errno, &
USE gc__buildconst, ONLY: gc__forterrunit, mpiabort_errno
#else
USE gc__buildconst, ONLY: gc__forterrunit
#endif
gc__forterrunit

USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY: OUTPUT_UNIT

Expand All @@ -40,9 +40,9 @@ SUBROUTINE gc_abort (me, nproc, mesg)

INTEGER (KIND=gc_int_kind) :: me, nproc, i, info
CHARACTER(LEN=*) :: mesg
CHARACTER(LEN=*), PARAMETER :: seqf2 = '(a20,i5,a3,a)'
CHARACTER(LEN=*), PARAMETER :: seqf2 = "(a20,i5,a3,a)"

WRITE(gc__forterrunit,seqf2) 'gc_abort (Processor ',me,'): ', mesg
WRITE(gc__forterrunit,seqf2) "gc_abort (Processor ",me,"): ", mesg
CALL gc__flush(gc__forterrunit)
CALL gc__flush(INT(OUTPUT_UNIT, KIND=gc_int_kind))

Expand Down
21 changes: 11 additions & 10 deletions deps/gcom/gc/gc_config.F90
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,21 @@ SUBROUTINE gc_config (mxproc, mxcoll, mxpt2pt, intf)
INTEGER (KIND=gc_int_kind) :: mxproc, mxcoll, mxpt2pt
CHARACTER(LEN=*) :: intf

#if defined(PREC_32B)
CHARACTER(LEN=*), PARAMETER :: gc_descrip_value = " 32"
#else
CHARACTER(LEN=*), PARAMETER :: gc_descrip_value = " 64"
#endif


mxcoll = 0 ! Deprecated
mxproc = 0 ! Deprecated
mxpt2pt = gc_none ! Deprecated
intf = 'GCOM Version ' // &
intf = "GCOM Version " // &
gc_version // &
' built at ' // &
" built at " // &
gc_build_date // &
' Interface: ' // &
#if defined(PREC_32B)
gc_descrip // &
' 32'
#else
gc_descrip // &
' 64'
#endif
" Interface: " // &
gc_descrip // &
gc_descrip_value
END SUBROUTINE gc_config
2 changes: 1 addition & 1 deletion deps/gcom/gc/gc_getopt.F90
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ SUBROUTINE gc_getopt(var, val, istat)
IF (var > gc__max_opts .OR. var < 1) THEN
! VAR is out of range
CALL gc_abort(gc_me(), gc_nproc(), &
'Cannot get option - out of range')
"Cannot get option - out of range")
END IF

val = gc__options(var)
Expand Down
2 changes: 1 addition & 1 deletion deps/gcom/gc/gc_imax_single_task.F90
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ SUBROUTINE gc_imax_single_task (len1, nproc, istat, imax, root)
INTEGER (KIND=gc_int_kind), INTENT(IN) :: nproc
INTEGER (KIND=gc_int_kind), INTENT(IN) :: root
INTEGER (KIND=gc_int_kind), INTENT(OUT) :: istat
INTEGER (KIND=gc_int_kind), INTENT(IN OUT) :: imax(len1)
INTEGER (KIND=gc_int_kind), INTENT(INOUT) :: imax(len1)

INTEGER (KIND=gc_int_kind) :: reduce_data_iwrk(len1)

Expand Down
2 changes: 1 addition & 1 deletion deps/gcom/gc/gc_imin_single_task.F90
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ SUBROUTINE gc_imin_single_task (len1, nproc, istat, imin, root)
INTEGER (KIND=gc_int_kind), INTENT(IN) :: nproc
INTEGER (KIND=gc_int_kind), INTENT(IN) :: root
INTEGER (KIND=gc_int_kind), INTENT(OUT) :: istat
INTEGER (KIND=gc_int_kind), INTENT(IN OUT) :: imin(len1)
INTEGER (KIND=gc_int_kind), INTENT(INOUT) :: imin(len1)

INTEGER (KIND=gc_int_kind) :: reduce_data_iwrk(len1)

Expand Down
12 changes: 6 additions & 6 deletions deps/gcom/gc/gc_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ SUBROUTINE gc_init_intro (comm)
USE mpl, ONLY: &
mpl_comm_world

USE gc_kinds_mod, ONLY: &
#if defined(MPI_SRC)
gc_log_kind, &
USE gc_kinds_mod, ONLY: gc_int_kind, gc_log_kind
#else
USE gc_kinds_mod, ONLY: gc_int_kind
#endif
gc_int_kind

IMPLICIT NONE

Expand Down Expand Up @@ -111,11 +111,11 @@ SUBROUTINE gc_init_final (me,nproc,comm)
USE gc__buildconst, ONLY: gc__isize, mpi_bsend_buffer_size
#endif

USE gc_kinds_mod, ONLY: &
#if defined(MPI_SRC)
gc_log_kind, &
USE gc_kinds_mod, ONLY: gc_int_kind, gc_log_kind
#else
USE gc_kinds_mod, ONLY: gc_int_kind
#endif
gc_int_kind

IMPLICIT NONE

Expand Down
36 changes: 20 additions & 16 deletions deps/gcom/gc/gc_init_thread.F90
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,24 @@ SUBROUTINE gc_init_thread (me, nproc, requested)

IF (me==0) THEN
IF (actual/=requested) THEN
WRITE(6,'(A)')'WARNING - REQUESTED AND ACTUAL THREADING LEVEL DIFFERENT'
WRITE(6,"(A)")"WARNING - REQUESTED AND ACTUAL THREADING LEVEL DIFFERENT"
END IF
IF (requested == mpl_thread_multiple) &
WRITE(6,'(A)')'THREAD LEVEL REQUESTED is MPL_THREAD_MULTIPLE'
IF (requested == mpl_thread_serialized) &
WRITE(6,'(A)')'THREAD LEVEL REQUESTED is MPL_THREAD_SERIALIZED'
IF (requested == mpl_thread_funneled) &
WRITE(6,'(A)')'THREAD LEVEL REQUESTED is MPL_THREAD_FUNNELED'
IF (requested == mpl_thread_single) &
WRITE(6,'(A)')'THREAD LEVEL REQUESTED is MPL_THREAD_SINGLE'
IF (actual==mpl_thread_multiple) WRITE(6,'(A)')'THREAD LEVEL SET is MPL_THREAD_MULTIPLE'
IF (actual==mpl_thread_serialized) WRITE(6,'(A)')'THREAD LEVEL SET is MPL_THREAD_SERIALIZED'
IF (actual==mpl_thread_funneled) WRITE(6,'(A)')'THREAD LEVEL SET is MPL_THREAD_FUNNELED'
IF (actual==mpl_thread_single) WRITE(6,'(A)')'THREAD LEVEL SET is MPL_THREAD_SINGLE'
IF (requested == mpl_thread_multiple) then
WRITE(6,"(A)")"THREAD LEVEL REQUESTED is MPL_THREAD_MULTIPLE"
end if
IF (requested == mpl_thread_serialized) then
WRITE(6,"(A)")"THREAD LEVEL REQUESTED is MPL_THREAD_SERIALIZED"
end if
IF (requested == mpl_thread_funneled) then
WRITE(6,"(A)")"THREAD LEVEL REQUESTED is MPL_THREAD_FUNNELED"
end if
IF (requested == mpl_thread_single) then
WRITE(6,"(A)")"THREAD LEVEL REQUESTED is MPL_THREAD_SINGLE"
end if
IF (actual==mpl_thread_multiple) WRITE(6,"(A)")"THREAD LEVEL SET is MPL_THREAD_MULTIPLE"
IF (actual==mpl_thread_serialized) WRITE(6,"(A)")"THREAD LEVEL SET is MPL_THREAD_SERIALIZED"
IF (actual==mpl_thread_funneled) WRITE(6,"(A)")"THREAD LEVEL SET is MPL_THREAD_FUNNELED"
IF (actual==mpl_thread_single) WRITE(6,"(A)")"THREAD LEVEL SET is MPL_THREAD_SINGLE"
END IF

RETURN
Expand All @@ -82,11 +86,11 @@ SUBROUTINE gc_init_intro_thread (comm, requested)
USE mpl, ONLY: &
mpl_comm_world

USE gc_kinds_mod, ONLY: &
#if defined(MPI_SRC)
gc_log_kind, &
USE gc_kinds_mod, ONLY: gc_int_kind, gc_log_kind
#else
USE gc_kinds_mod, ONLY: gc_int_kind
#endif
gc_int_kind

IMPLICIT NONE

Expand Down
2 changes: 1 addition & 1 deletion deps/gcom/gc/gc_kinds_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ MODULE gc_kinds_mod
INTEGER, PARAMETER :: gc_real_kind = gc_real64
#endif

END MODULE
END MODULE gc_kinds_mod
2 changes: 1 addition & 1 deletion deps/gcom/gc/gc_rmax_single_task.F90
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ SUBROUTINE gc_rmax_single_task (len1, nproc, istat, smax, root)
INTEGER (KIND=gc_int_kind), INTENT(IN) :: nproc
INTEGER (KIND=gc_int_kind), INTENT(IN) :: root
INTEGER (KIND=gc_int_kind), INTENT(OUT) :: istat
REAL (KIND=gc_real_kind), INTENT(IN OUT) :: smax(len1)
REAL (KIND=gc_real_kind), INTENT(INOUT) :: smax(len1)

REAL (KIND=gc_real_kind) :: reduce_data_wrk(len1)

Expand Down
2 changes: 1 addition & 1 deletion deps/gcom/gc/gc_rmin_single_task.F90
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ SUBROUTINE gc_rmin_single_task (len1, nproc, istat, smin, root)
INTEGER (KIND=gc_int_kind), INTENT(IN) :: nproc
INTEGER (KIND=gc_int_kind), INTENT(IN) :: root
INTEGER (KIND=gc_int_kind), INTENT(OUT) :: istat
REAL (KIND=gc_real_kind), INTENT(IN OUT) :: smin(len1)
REAL (KIND=gc_real_kind), INTENT(INOUT) :: smin(len1)

REAL (KIND=gc_real_kind) :: reduce_data_wrk(len1)

Expand Down
4 changes: 2 additions & 2 deletions deps/gcom/gc/gc_setopt.F90
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ SUBROUTINE gc_setopt(var, val, istat)
! Ensure Option is one we recognise
IF (var > gc__max_opts .OR. var < 1) THEN
CALL gc_abort(gc_me(), gc_nproc(), &
'Cannot set option - unrecognised')
"Cannot set option - unrecognised")
END IF

! Ensure Option values are recognised
IF (var == gc_force_bitrep .AND. &
(val /= gc_on .AND. val /= gc_off)) THEN
CALL gc_abort(gc_me(), gc_nproc(), &
'Cannot set GC_FORCE_BITREP - value unrecognised')
"Cannot set GC_FORCE_BITREP - value unrecognised")
END IF

gc__options(var) = val
Expand Down
10 changes: 5 additions & 5 deletions deps/gcom/gcg/gcg__errlim.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ SUBROUTINE gcg__errlim(iabrt, sub, lim, mval, aval)

gcg__me = gc_me()
gcg__nproc = gc_nproc()
WRITE(*,*) 'GCG_', sub, '(): internal limit MAX_', lim, &
' exceeded on processor ', gcg__me
WRITE(*,*) 'Maximum value is ', mval, '. Actual value is ', &
aval, '. Exiting.'
WRITE(*,*) "GCG_", sub, "(): internal limit MAX_", lim, &
" exceeded on processor ", gcg__me
WRITE(*,*) "Maximum value is ", mval, ". Actual value is ", &
aval, ". Exiting."

CALL gc_abort(gcg__me, gcg__nproc, '*** DEFINED LIMIT EXCEEDED ***')
CALL gc_abort(gcg__me, gcg__nproc, "*** DEFINED LIMIT EXCEEDED ***")

RETURN
END SUBROUTINE gcg__errlim
2 changes: 1 addition & 1 deletion deps/gcom/gcg/gcg__mpi_rank.F90
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ FUNCTION gcg__mpi_rank(dummy1,dummy2)
#include "gc_functions.h"

CALL gc_abort(gc_me(),gc_nproc(), &
'GCG__MPI_RANK called for non-MPI')
"GCG__MPI_RANK called for non-MPI")

gcg__mpi_rank = -1

Expand Down
7 changes: 3 additions & 4 deletions deps/gcom/gcg/gcg_ralltoalle.F90
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,11 @@ SUBROUTINE gcg__ralltoalle( &
gc__mpi_maxtag
#endif

USE gc_kinds_mod, ONLY: &
#if defined(MPI_SRC)
gc_log_kind, &
USE gc_kinds_mod, ONLY: gc_int_kind, gc_real_kind, gc_log_kind
#else
USE gc_kinds_mod, ONLY: gc_int_kind, gc_real_kind
#endif
gc_int_kind, &
gc_real_kind

IMPLICIT NONE

Expand Down
Loading