-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There is now only one executable being built: either cable-mpi or cable, depending if MPI support is available or not. When MPI support is available, the code will now automatically run the serial driver if using only one MPI process, instead of stopping with an error like before.
- Loading branch information
1 parent
823cc89
commit e6b19d9
Showing
22 changed files
with
133 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
! twice per timestep in the ACCESS case. Not all parts of cbm | ||
! are executed in each of the ACCESS calls. | ||
! | ||
! Called from: cable_driver for offline version | ||
! Called from: cable_serial for offline version | ||
! cable_explicit_driver, cable_implicit_driver for ACCESS | ||
! | ||
! Contact: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
! CSIRO Open Source Software License Agreement (variation of the BSD / MIT License) | ||
! Copyright (c) 2015, Commonwealth Scientific and Industrial Research Organisation | ||
! (CSIRO) ABN 41 687 119 230. | ||
|
||
MODULE cable_mpimaster | ||
!! Stub for the master driver when MPI is not available. | ||
IMPLICIT NONE | ||
|
||
PRIVATE | ||
PUBLIC :: mpidrv_master | ||
|
||
CONTAINS | ||
|
||
SUBROUTINE mpidrv_master(comm) | ||
!! Stub for when MPI is not available | ||
INTEGER, INTENT(IN) :: comm | ||
|
||
! This should never be called! | ||
STOP | ||
|
||
END SUBROUTINE mpidrv_master | ||
|
||
END MODULE cable_mpimaster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
! CSIRO Open Source Software License Agreement (variation of the BSD / MIT License) | ||
! Copyright (c) 2015, Commonwealth Scientific and Industrial Research Organisation | ||
! (CSIRO) ABN 41 687 119 230. | ||
|
||
MODULE cable_mpiworker | ||
!! Stub for the worker driver when MPI is not available. | ||
IMPLICIT NONE | ||
|
||
PRIVATE | ||
PUBLIC :: mpidrv_worker | ||
|
||
CONTAINS | ||
|
||
SUBROUTINE mpidrv_worker(comm) | ||
!! Stub for when MPI is not available | ||
INTEGER, INTENT(IN) :: comm | ||
|
||
! This should never be called! | ||
STOP | ||
|
||
END SUBROUTINE mpidrv_worker | ||
|
||
END MODULE cable_mpiworker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
! CSIRO Open Source Software License Agreement (variation of the BSD / MIT License) | ||
! Copyright (c) 2015, Commonwealth Scientific and Industrial Research Organisation | ||
! (CSIRO) ABN 41 687 119 230. | ||
PROGRAM cable_offline_driver | ||
USE cable_mpi_mod, ONLY : mpi_grp_t, mpi_mod_init, mpi_mod_end | ||
USE cable_driver_init_mod | ||
USE cable_serial | ||
USE cable_mpimaster | ||
USE cable_mpiworker | ||
|
||
IMPLICIT NONE | ||
|
||
REAL :: etime ! Declare the type of etime() | ||
TYPE(mpi_grp_t) :: mpi_grp | ||
|
||
call mpi_mod_init() | ||
mpi_grp = mpi_grp_t() | ||
|
||
CALL cable_driver_init(mpi_grp) | ||
|
||
IF (mpi_grp%size == 1) THEN | ||
CALL serialdrv() | ||
ELSE | ||
IF (mpi_grp%rank == 0) THEN | ||
CALL mpidrv_master(mpi_grp%comm) | ||
ELSE | ||
CALL mpidrv_worker(mpi_grp%comm) | ||
END IF | ||
END IF | ||
|
||
CALL mpi_mod_end() | ||
|
||
CALL CPU_TIME(etime) | ||
PRINT *, 'Finished. ', etime, ' seconds needed for ' | ||
|
||
END PROGRAM cable_offline_driver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
! Purpose: | ||
! sumcflux - accumulating carbon fluxes (not required for UM) | ||
! | ||
! Called from: cable_driver for offline version | ||
! Called from: cable_serial for offline version | ||
! Not currently called/available for ACCESS version | ||
! | ||
! Contact: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
! twice per timestep in the ACCESS case. Not all parts of cbm | ||
! are executed in each of the ACCESS calls. | ||
! | ||
! Called from: cable_driver for offline version | ||
! Called from: cable_serial for offline version | ||
! cable_explicit_driver, cable_implicit_driver for ACCESS | ||
! | ||
! Contact: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
! Purpose: bgcdriver - interface between casacnp and cable | ||
! sumcflux - accumulating carbon fluxes (not required for UM) | ||
! | ||
! Called from: cable_driver for offline version | ||
! Called from: cable_serial for offline version | ||
! Not currently called/available for ACCESS version | ||
! | ||
! Contact: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
! Purpose: bgcdriver - interface between casacnp and cable | ||
! sumcflux - accumulating carbon fluxes (not required for UM) | ||
! | ||
! Called from: cable_driver for offline version | ||
! Called from: cable_serial for offline version | ||
! Not currently called/available for ACCESS version | ||
! | ||
! Contact: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.