Skip to content

Commit

Permalink
Fortran: Renamed submodules to have the full scope in their name.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuck Atkins committed Oct 22, 2020
1 parent b2aa787 commit 2ed6a38
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 22 deletions.
23 changes: 13 additions & 10 deletions bindings/Fortran/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ FortranCInterface_HEADER(FC.h MACRO_NAMESPACE "FC_")
FortranCInterface_VERIFY(CXX QUIET)

# Check whether the compiler supports Fortran submodule constructs we need.
if(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
# Cray submodules have naming issues so just don't use them for now
set(ADIOS2_HAVE_FORTRAN_SUBMODULES 0 CACHE INTERNAL "" FORCE)
else()
adios2_check_fortran_submodules(ADIOS2_HAVE_FORTRAN_SUBMODULES)
endif()
adios2_check_fortran_submodules(ADIOS2_HAVE_FORTRAN_SUBMODULES)

# Leaving this workaround in place but commented out just in case we need to
# re-enable it in the future
#
# Cray submodules have naming issues so just don't use them for now
#if(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
# set(ADIOS2_HAVE_FORTRAN_SUBMODULES 0 CACHE INTERNAL "" FORCE)
#endif()

if(ADIOS2_USE_Fortran_flag_argument_mismatch)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch")
Expand All @@ -34,12 +37,12 @@ add_library(adios2_fortran
modules/adios2_parameters_mod.f90
modules/adios2_adios_mod.f90
modules/adios2_adios_init_mod.F90
modules/adios2_adios_init_mod_serial.F90
modules/adios2_adios_init_serial_smod.F90
modules/adios2_attribute_mod.f90
modules/adios2_attribute_data_mod.f90
modules/adios2_io_mod.f90
modules/adios2_io_open_mod.F90
modules/adios2_io_open_mod_serial.F90
modules/adios2_io_open_serial_smod.F90
modules/adios2_io_define_variable_mod.f90
modules/adios2_io_define_attribute_mod.f90
modules/adios2_engine_mod.f90
Expand Down Expand Up @@ -84,8 +87,8 @@ if(ADIOS2_HAVE_MPI)
target_compile_definitions(adios2_fortran PRIVATE "$<$<COMPILE_LANGUAGE:Fortran>:ADIOS2_HAVE_MPI_F>")

set(adios2_fortran_mpi_srcs
modules/adios2_adios_init_mod_mpi.F90
modules/adios2_io_open_mod_mpi.F90
modules/adios2_adios_init_mpi_smod.F90
modules/adios2_io_open_mpi_smod.F90
f2c/adios2_f2c_adios_mpi.cpp
f2c/adios2_f2c_io_mpi.cpp
)
Expand Down
4 changes: 2 additions & 2 deletions bindings/Fortran/modules/adios2_adios_init_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ module subroutine adios2_init_config_debug_mpi(adios, config_file, comm, ierr)

#else

use adios2_adios_init_mod_serial
use adios2_adios_init_serial_mod
# ifdef ADIOS2_HAVE_MPI_F
use adios2_adios_init_mod_mpi
use adios2_adios_init_mpi_mod
# endif

#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#endif

#ifdef ADIOS2_HAVE_FORTRAN_SUBMODULES
submodule ( adios2_adios_init_mod ) mpi
submodule ( adios2_adios_init_mod ) adios2_adios_init_mpi_smod
#else
module adios2_adios_init_mod_mpi
module adios2_adios_init_mpi_mod
#endif

use adios2_parameters_mod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#endif

#ifdef ADIOS2_HAVE_FORTRAN_SUBMODULES
submodule ( adios2_adios_init_mod ) serial
submodule ( adios2_adios_init_mod ) adios2_adios_init_serial_smod
#else
module adios2_adios_init_mod_serial
module adios2_adios_init_serial_mod
#endif

use adios2_parameters_mod
Expand Down
4 changes: 2 additions & 2 deletions bindings/Fortran/modules/adios2_io_open_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ module subroutine adios2_open_new_comm(engine, io, name, adios2_mode, comm, ierr

#else

use adios2_io_open_mod_serial
use adios2_io_open_serial_mod
# ifdef ADIOS2_HAVE_MPI_F
use adios2_io_open_mod_mpi
use adios2_io_open_mpi_mod
# endif

#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#endif

#ifdef ADIOS2_HAVE_FORTRAN_SUBMODULES
submodule ( adios2_io_open_mod ) mpi
submodule ( adios2_io_open_mod ) adios2_io_open_mpi_smod
#else
module adios2_io_open_mod_mpi
module adios2_io_open_mpi_mod
#endif

use adios2_parameters_mod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#endif

#ifdef ADIOS2_HAVE_FORTRAN_SUBMODULES
submodule ( adios2_io_open_mod ) serial
submodule ( adios2_io_open_mod ) adios2_io_open_serial_smod
#else
module adios2_io_open_mod_serial
module adios2_io_open_serial_mod
#endif

use adios2_parameters_mod
Expand Down

0 comments on commit 2ed6a38

Please sign in to comment.