From 2ae0bda34e187f37cd5b0a21b80631868f3b8d38 Mon Sep 17 00:00:00 2001 From: Sean Bryan Date: Fri, 25 Oct 2024 12:25:59 +1100 Subject: [PATCH] Commit working progress --- src/offline/cable_mpicommon.F90 | 4 ++++ src/offline/cable_mpidrv.F90 | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/offline/cable_mpicommon.F90 b/src/offline/cable_mpicommon.F90 index ddd0e57855..f41b13207f 100644 --- a/src/offline/cable_mpicommon.F90 +++ b/src/offline/cable_mpicommon.F90 @@ -27,6 +27,10 @@ MODULE cable_mpicommon PUBLIC + ! MPI commicator and rank. These get initialised in cable_driver_init_mod. + ! TODO(Sean): there is likely a better place + INTEGER :: comm, rank + ! base number of input fields: must correspond to CALLS to ! MPI_address (field ) in *_mpimaster/ *_mpiworker INTEGER, PARAMETER :: nparam = 330 diff --git a/src/offline/cable_mpidrv.F90 b/src/offline/cable_mpidrv.F90 index 0f2019b391..085824f0f8 100644 --- a/src/offline/cable_mpidrv.F90 +++ b/src/offline/cable_mpidrv.F90 @@ -23,15 +23,15 @@ PROGRAM mpi_driver USE cable_driver_init_mod USE cable_mpicommon - USE cable_mpimaster + USE cable_mpimaster, ONLY : comm, rank USE cable_mpiworker IMPLICIT NONE - INTEGER :: comm, rank, ierr + INTEGER :: ierr REAL :: etime ! Declare the type of etime() - CALL cable_driver_init(comm, rank) + CALL cable_driver_init() IF (rank == 0) THEN CALL mpidrv_master (comm)