Working Library Build and Installation#6
Conversation
* Add src/errors_warnings/assert.F90 to CMakeLists.txt * Correct MPI_comm to MPI_Comm to match MPI casing of types. * Remove indentation of #ifdef directives * TODO: work out why MPI_COMM_DUP() call is coming up as missing a specific subroutine for the passed arguments and argument types.
…sing variables. -DMPI08=On should be the default (set in CMake if no argument given). Still looks like there's an issue with correct use of release and debug flags.
| if(CMAKE_BUILD_TYPE MATCHES Debug) | ||
| # Preprocessor variable "DEBUG" in the code | ||
| set_property(TARGET ${TARGET} APPEND PROPERTY | ||
| COMPILE_DEFINITIONS "DEBUG") |
There was a problem hiding this comment.
Probs change back to USE_ASSERT. More descriptive
| subroutine assert_true(logical_condition, message) | ||
| !> Condition to test | ||
| logical, intent(in) :: logical_condition | ||
| #ifdef DEBUG |
There was a problem hiding this comment.
Probs change back to USE_ASSRT
…v assuming that the test framework has already done so
…etting-up and are currently disabled in the build system)
AlexBuccheri
left a comment
There was a problem hiding this comment.
I'm broadly happy with this. Tested and it all compiles. CMake will stop the old MPI from being used for the time-being. Will add the testing on the next MR: Need to try manually linking to test code before using the test framework and automating test builds with CMake
| @@ -0,0 +1,19 @@ | |||
| !> Driver program to test mpilib20_init_finalise.f90 | |||
There was a problem hiding this comment.
Not tested yet but also not used in the build. Will get on next MR
| @@ -0,0 +1,20 @@ | |||
| !> Driver program to test mpilib20_init_finalise.f90 | |||
There was a problem hiding this comment.
Not tested yet but also not used in the build. Will get on next MR
| @@ -0,0 +1,53 @@ | |||
| !> Test initialisation and finalisation of the MPI environment | |||
There was a problem hiding this comment.
Not tested yet but also not used in the build. Will get on next MR
| public :: mpilib20_init, mpilib20_init_thread, mpilib20_finalize | ||
|
|
||
| contains | ||
|
|
There was a problem hiding this comment.
Implemented but not yet used
| procedure, public :: finalize => finalise_mpi_env !! Terminate instance of MPI environment object | ||
| procedure, public :: get_comm => get_communicator !! Get the communicator | ||
| ! Private routines | ||
| !procedure :: set_comm !! Set the communicator... may not need |
There was a problem hiding this comment.
Not sure if private data can be accessed within the module in which the type is defined. Would assume not but then this is fortran.
| module mpilib20_init_finalise | ||
| use, intrinsic :: iso_fortran_env, only: error_unit | ||
| use mpi_bindings, only: MPI_comm, MPI_Group | ||
| use mpi_bindings, only : MPI_Comm, MPI_Group, MPI_INIT, MPI_COMM_DUP, & |
There was a problem hiding this comment.
Moved them up here - thought it looked a bit cleaner
| @@ -0,0 +1,204 @@ | |||
| #!/usr/bin/python3 | |||
There was a problem hiding this comment.
We may not use this. Either way, not worth reviewing this file. Copied and pasted from a different project
…n the module located in the same file
…up to use zofus mpi object (hence the test report returns for every process with no process id. One could assert input and output on master only, but would be better to have more flexibility. Move to setup and teardowns
…ur test modules. Same error - wondering if I built zofu with a different MPI version or flavour
…gs. Got alot to do
…viour needs to be consistent though
… preprocessing details
maxwilliams94
left a comment
There was a problem hiding this comment.
Nice work on the setters and getters. Agree that private routines separate from the public api can be cut down.
…eri/mpilib20 into fix_proposed_structure
Code is ready to be reviewed. We'll get the tests running on the next PR.
Also note that MPI08=off does not work. We need to write setters for the class.