Skip to content

Commit f2879de

Browse files
committed
Merge branch 'bugfix/re-enable-fapi-test'
2 parents bae27cf + 0f350e7 commit f2879de

File tree

4 files changed

+21
-32
lines changed

4 files changed

+21
-32
lines changed

Diff for: CMakeLists.txt

-3
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

Diff for: src/multio/tools/CMakeLists.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ ecbuild_add_executable( TARGET multio-feed
4848
NO_AS_NEEDED
4949
LIBS multio-api )
5050

51-
# # TODO ADD SOME FCKIT condition; this currently breaks GitHub CI
52-
# ecbuild_add_executable( TARGET multio-replay-nemo-fapi
53-
# CONDITION HAVE_FORTRAN
54-
# SOURCES multio-replay-nemo-fapi.f90
55-
# LIBS multio-fapi fckit MPI::MPI_Fortran )
51+
# TODO ADD SOME FCKIT condition; this currently breaks GitHub CI
52+
ecbuild_add_executable( TARGET multio-replay-nemo-fapi
53+
CONDITION HAVE_FORTRAN
54+
SOURCES multio-replay-nemo-fapi.f90
55+
LIBS multio-fapi fckit )
5656

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

Diff for: src/multio/tools/multio-replay-nemo-fapi.f90

+15-21
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,10 +23,10 @@ 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" ]
30-
integer, dimension(4) :: grib_param_id = [262101, 262137, 262138, 212202 ]
29+
integer, dimension(4) :: grib_param_id = [262101, 262138, 262137, 212202 ]
3130
character(len=6), dimension(4) :: grib_grid_type = ["T grid", "U grid", "V grid", "W grid" ]
3231
character(len=12), dimension(4) :: grib_level_type = ["oceanSurface", "oceanSurface", "oceanSurface", "oceanSurface" ]
3332

@@ -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

@@ -254,10 +248,10 @@ subroutine run(mio, rank, client_count, &
254248
integer, intent(in) :: level
255249
integer, intent(in) :: step
256250
logical, intent(in) :: singlePrecision
257-
character(*), dimension(2), intent(in) :: nemo_parameters
258-
integer, dimension(2), intent(in) :: grib_param_id
259-
character(*), dimension(2), intent(in) :: grib_grid_type
260-
character(*), dimension(2), intent(in) :: grib_level_type
251+
character(*), dimension(4), intent(in) :: nemo_parameters
252+
integer, dimension(4), intent(in) :: grib_param_id
253+
character(*), dimension(4), intent(in) :: grib_grid_type
254+
character(*), dimension(4), intent(in) :: grib_level_type
261255

262256

263257
write(0,*) "Run..."
@@ -347,10 +341,10 @@ subroutine write_fields(mio, rank, client_count, nemo_parameters, grib_param_id,
347341
integer, intent(in) :: client_count
348342
type(multio_metadata) :: md
349343
integer, dimension(11) :: buffer
350-
character(*), dimension(2), intent(in) :: nemo_parameters
351-
integer, dimension(2), intent(in) :: grib_param_id
352-
character(*), dimension(2), intent(in) :: grib_grid_type
353-
character(*), dimension(2), intent(in) :: grib_level_type
344+
character(*), dimension(4), intent(in) :: nemo_parameters
345+
integer, dimension(4), intent(in) :: grib_param_id
346+
character(*), dimension(4), intent(in) :: grib_grid_type
347+
character(*), dimension(4), intent(in) :: grib_level_type
354348
integer, intent(in):: global_size
355349
integer, intent(in):: level
356350
integer, intent(in):: step
@@ -481,10 +475,10 @@ subroutine test_data(rank, &
481475
integer, intent(in) :: global_size
482476
integer, intent(in) :: level
483477
integer, intent(in) :: step
484-
character(*), dimension(2), intent(in) :: nemo_parameters
485-
integer, dimension(2), intent(in) :: grib_param_id
486-
character(*), dimension(2), intent(in) :: grib_grid_type
487-
character(*), dimension(2), intent(in) :: grib_level_type
478+
character(*), dimension(4), intent(in) :: nemo_parameters
479+
integer, dimension(4), intent(in) :: grib_param_id
480+
character(*), dimension(4), intent(in) :: grib_grid_type
481+
character(*), dimension(4), intent(in) :: grib_level_type
488482

489483
type(fckit_mpi_comm) :: comm
490484

Diff for: tests/multio/CMakeLists.txt

+1-3
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
@@ -246,7 +245,6 @@ ecbuild_add_test( TARGET test_multio_replay_nemo_fapi
246245
ARGS $<TARGET_FILE:multio-replay-nemo-fapi>
247246
$<TARGET_FILE:multio-probe> ${MPIEXEC_EXECUTABLE} ${MPI_ARGS}
248247
ENVIRONMENT "${_test_environment}"
249-
ENABLED OFF
250248
)
251249

252250
ecbuild_add_test( TARGET test_multio_replay_nemo_capi_masked

0 commit comments

Comments
 (0)