Skip to content

Commit 0f350e7

Browse files
committed
MUL-142: Remove fapi test's dependence on MPI_Fortran
1 parent 64bcd07 commit 0f350e7

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ ecbuild_add_option( FEATURE MULTIO_DUMMY_API
7373
if( HAVE_FORTRAN )
7474
ecbuild_enable_fortran( REQUIRED MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/module)
7575
ecbuild_find_package( NAME fckit VERSION 0.10.0 REQUIRED )
76-
if (eckit_HAVE_MPI)
77-
find_package( MPI COMPONENTS Fortran) # Add explicit mpi for errorcodes -- isn't there a better way?
78-
endif (eckit_HAVE_MPI)
7976
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/fortran_compile_flags.cmake)
8077
endif()
8178

src/multio/tools/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ ecbuild_add_executable( TARGET multio-feed
5252
ecbuild_add_executable( TARGET multio-replay-nemo-fapi
5353
CONDITION HAVE_FORTRAN
5454
SOURCES multio-replay-nemo-fapi.f90
55-
LIBS multio-fapi fckit MPI::MPI_Fortran )
55+
LIBS multio-fapi fckit )
5656

5757
# TODO: add atlas condition/dependency
5858
ecbuild_add_executable( TARGET multio-generate-grib-template

src/multio/tools/multio-replay-nemo-fapi.f90

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ program multio_replay_nemo_fapi
1212
use multio_api
1313
use fckit_module
1414
use fckit_mpi_module
15-
use mpi ! for error codes
1615
implicit none
1716

1817
integer :: rank, client_count, server_count
@@ -24,7 +23,7 @@ program multio_replay_nemo_fapi
2423
logical singlePrecision
2524

2625
type(multio_handle) :: mio
27-
integer(int64) :: mio_parent_comm = MPI_UNDEFINED
26+
integer(int64) :: mio_parent_comm
2827

2928
character(len=3), dimension(4) :: nemo_parameters = ["sst", "ssu", "ssv", "ssw" ]
3029
integer, dimension(4) :: grib_param_id = [262101, 262138, 262137, 212202 ]
@@ -87,12 +86,7 @@ subroutine multio_custom_error_handler(context, err, info)
8786
if (err /= MULTIO_SUCCESS) then
8887
write (error_unit, *) 'MULTIO ERROR: ',multio_error_string(err, info)
8988
write (error_unit, *) 'Abort mpi...'
90-
91-
if (context /= MPI_UNDEFINED) then
92-
comm = fckit_mpi_comm(int(context))
93-
call comm%abort(MPI_ERR_OTHER)
94-
context = MPI_UNDEFINED
95-
endif
89+
call fckit_mpi%abort()
9690
endif
9791
end subroutine
9892

tests/multio/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,12 @@ ecbuild_add_test( TARGET test_multio_hammer_thread
146146
ARGS --transport=thread --nbclients=5 --nbservers=3
147147
ENVIRONMENT "${_test_environment}" )
148148

149-
if (eckit_HAVE_MPI)
150149
ecbuild_add_test( TARGET test_multio_hammer_mpi
150+
CONDITION eckit_HAVE_MPI
151151
COMMAND $<TARGET_FILE:multio-hammer>
152152
ARGS --transport=mpi --nbclients=5 --nbservers=3
153153
MPI 8
154154
ENVIRONMENT "${_test_environment}" )
155-
endif (eckit_HAVE_MPI)
156155

157156
ecbuild_add_test( TARGET test_multio_hammer_tcp
158157
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tcp-launch.sh

0 commit comments

Comments
 (0)