diff --git a/CMakeLists.txt b/CMakeLists.txt index c396403579..a12a71b6fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -498,6 +498,28 @@ ELSE() SET(ALBANY_SEACAS FALSE) ENDIF() +# Check whether Exodus can access a file in parallel +include(CheckCSourceCompiles) +set(CMAKE_REQUIRED_LIBRARIES ${${PROJECT_NAME}_EXTRA_LINK_FLAGS}) +set(CMAKE_REQUIRED_INCLUDES ${Trilinos_INCLUDE_DIRS}) +check_c_source_compiles( + " + #include + int main() + { + return 0; + } + " + PARALLEL_EXODUS_SUPPORTED + ) + +IF (PARALLEL_EXODUS_SUPPORTED) + SET(ALBANY_PARALELL_EXODUS TRUE) + MESSAGE("-- ALBANY_PARALELL_EXODUS set to True") +ELSE() + SET(ALBANY_PARALELL_EXODUS FALSE) + MESSAGE("-- ALBANY_PARALELL_EXODUS set to False") +ENDIF() ########################################## ### Check Albany configuration options ### diff --git a/tests/small/CahnHillElast2D/CMakeLists.txt b/tests/small/CahnHillElast2D/CMakeLists.txt index 82156da3d9..377aaef1ff 100644 --- a/tests/small/CahnHillElast2D/CMakeLists.txt +++ b/tests/small/CahnHillElast2D/CMakeLists.txt @@ -1,4 +1,4 @@ -if (ALBANY_IOPX) +if (ALBANY_PARALELL_EXODUS) # Name the test with the directory name get_filename_component(testNameRoot ${CMAKE_CURRENT_SOURCE_DIR} NAME) @@ -22,4 +22,4 @@ if (ALBANY_IOPX) add_test(${testName} ${Albany.exe} inputT_tempus.yaml) set_tests_properties(${testName} PROPERTIES LABELS "Demo;Tpetra;Forward") endif() -endif(ALBANY_IOPX) +endif(ALBANY_PARALELL_EXODUS) diff --git a/tests/small/Ioss2D/CMakeLists.txt b/tests/small/Ioss2D/CMakeLists.txt index 0bc05be880..9a054da5cc 100644 --- a/tests/small/Ioss2D/CMakeLists.txt +++ b/tests/small/Ioss2D/CMakeLists.txt @@ -38,7 +38,7 @@ endif() ### Serial input tests ### #################################### -if (ALBANY_IOPX) +if (ALBANY_PARALELL_EXODUS) set(testName ${testNameRoot}_SerialInput) if (ALBANY_EPETRA) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/input_Serial.yaml diff --git a/tests/small/LandIce/Enthalpy/CMakeLists.txt b/tests/small/LandIce/Enthalpy/CMakeLists.txt index c211579356..d9ab6c9454 100644 --- a/tests/small/LandIce/Enthalpy/CMakeLists.txt +++ b/tests/small/LandIce/Enthalpy/CMakeLists.txt @@ -1,6 +1,6 @@ get_filename_component(testName ${CMAKE_CURRENT_SOURCE_DIR} NAME) -if (ALBANY_IOPX) +if (ALBANY_PARALELL_EXODUS) set (USE_SERIAL_MESH "true") else () # If there's no Iopx, we *must* have ALBANY_DECOMP defined (to decompose the mesh) @@ -18,7 +18,7 @@ endif() # Create the test add_test(${testName}_Humboldt ${Albany.exe} input_enthalpy_humboldt.yaml) # If Iopx is not present, we must decompose the input mesh first -if (NOT ALBANY_IOPX AND ALBANY_MPI) +if (NOT ALBANY_PARALELL_EXODUS AND ALBANY_MPI) add_test (NAME FO_GIS_HUMBOLDT_decompMesh COMMAND ${SEACAS_DECOMP} -processors ${MPIMNP} humboldt_2d.exo WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../AsciiMeshes/Humboldt) diff --git a/tests/small/LandIce/FO_AIS/CMakeLists.txt b/tests/small/LandIce/FO_AIS/CMakeLists.txt index 97c109d90a..bd4c33864c 100644 --- a/tests/small/LandIce/FO_AIS/CMakeLists.txt +++ b/tests/small/LandIce/FO_AIS/CMakeLists.txt @@ -1,7 +1,7 @@ get_filename_component(testNameRoot ${CMAKE_CURRENT_SOURCE_DIR}_16km NAME) # This variable will be set in the input files during the 'configure_file' call -if (ALBANY_IOPX) +if (ALBANY_PARALELL_EXODUS) set (USE_SERIAL_MESH "true") else () # If there's no Iopx, we *must* have ALBANY_DECOMP defined (to decompose the mesh) @@ -27,7 +27,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/basal_friction_reg.ascii configure_file(${CMAKE_CURRENT_SOURCE_DIR}/surface_velocity.ascii ${CMAKE_CURRENT_BINARY_DIR}/surface_velocity.ascii COPYONLY) -if (NOT ALBANY_IOPX AND ALBANY_MPI) +if (NOT ALBANY_PARALELL_EXODUS AND ALBANY_MPI) add_test (NAME FO_AIS_decompMesh COMMAND ${SEACAS_DECOMP} -processors ${MPIMNP} antarctica_2d.exo WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) @@ -40,7 +40,7 @@ if (ALBANY_EPETRA) ${CMAKE_CURRENT_BINARY_DIR}/inputML.yaml) add_test(${testNameRoot}_ML ${Albany8.exe} inputML.yaml) - if (NOT ALBANY_IOPX AND ALBANY_MPI) + if (NOT ALBANY_PARALELL_EXODUS AND ALBANY_MPI) set_tests_properties(${testNameRoot}_ML PROPERTIES LABELS "LandIce;Epetra;Forward" @@ -59,7 +59,7 @@ if(ALBANY_MUELU) ${CMAKE_CURRENT_BINARY_DIR}/inputMueLu.yaml) add_test(${testNameRoot}_MueLu ${Albany8.exe} inputMueLu.yaml) - if (NOT ALBANY_IOPX AND ALBANY_MPI) + if (NOT ALBANY_PARALELL_EXODUS AND ALBANY_MPI) set_tests_properties(${testNameRoot}_MueLuShortList PROPERTIES LABELS "LandIce;Tpetra;Forward" @@ -79,7 +79,7 @@ endif() # configure_file(${CMAKE_CURRENT_SOURCE_DIR}/input_FROSch.yaml # ${CMAKE_CURRENT_BINARY_DIR}/input_FROSch.yaml) # add_test(${testNameRoot}_FROSch ${Albany8.exe} input_FROSch.yaml) -# if (NOT ALBANY_IOPX AND ALBANY_MPI) +# if (NOT ALBANY_PARALELL_EXODUS AND ALBANY_MPI) # set_tests_properties(${testNameRoot}_FROSch # PROPERTIES # LABELS "LandIce;Tpetra;Forward" diff --git a/tests/small/LandIce/FO_GIS/CMakeLists.txt b/tests/small/LandIce/FO_GIS/CMakeLists.txt index 588760cac1..8d83e67349 100644 --- a/tests/small/LandIce/FO_GIS/CMakeLists.txt +++ b/tests/small/LandIce/FO_GIS/CMakeLists.txt @@ -2,7 +2,7 @@ get_filename_component(testNameRoot ${CMAKE_CURRENT_SOURCE_DIR} NAME) # This variable will be set in the input files during the 'configure_file' call -if (ALBANY_IOPX) +if (ALBANY_PARALELL_EXODUS) set (USE_SERIAL_MESH "true") #IKT 5/22/19 - commenting out for now as this is leading to compilation error else () @@ -24,7 +24,7 @@ set (testName ${testNameRoot}_Import2DAsciiMesh) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/input_create_exo_from_msh.yaml ${CMAKE_CURRENT_BINARY_DIR}/input_create_exo_from_msh.yaml) -IF (ALBANY_IOPX AND ALBANY_MPI) +IF (ALBANY_PARALELL_EXODUS AND ALBANY_MPI) add_test(${testName} ${Albany.exe} input_create_exo_from_msh.yaml) set_tests_properties(${testName} PROPERTIES @@ -49,7 +49,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/input_fo_gis_populate_meshes.yaml add_test(${testName} ${Albany.exe} input_fo_gis_populate_meshes.yaml) # If Iopx is not present, we must decompose the input mesh first -IF (NOT ALBANY_IOPX AND ALBANY_MPI) +IF (NOT ALBANY_PARALELL_EXODUS AND ALBANY_MPI) add_test (NAME FO_GIS_decompMesh COMMAND ${SEACAS_DECOMP} -processors ${MPIMNP} gis_unstruct_2d.exo WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../ExoMeshes) @@ -116,7 +116,7 @@ if (ALBANY_IFPACK2) FIXTURES_REQUIRED PopulateMeshes) endif() -if (NOT ALBANY_IOPX AND ALBANY_MPI) +if (NOT ALBANY_PARALELL_EXODUS AND ALBANY_MPI) add_test (NAME FO_GIS_HUMBOLDT_decompMesh COMMAND ${SEACAS_DECOMP} -processors ${MPIMNP} humboldt_2d.exo WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../AsciiMeshes/Humboldt) @@ -145,7 +145,7 @@ if (ALBANY_FROSCH) ${CMAKE_CURRENT_BINARY_DIR}/input_fo_humboldt_frosch_effect_press.yaml) add_test(${testNameRoot}_Humboldt_effectPress_Tpetra_FROSch ${Albany.exe} input_fo_humboldt_frosch_effect_press.yaml) - if (NOT ALBANY_IOPX AND ALBANY_MPI) + if (NOT ALBANY_PARALELL_EXODUS AND ALBANY_MPI) set_tests_properties(${testNameRoot}_Humboldt_Tpetra_FROSch PROPERTIES LABELS "LandIce;Epetra;Forward" @@ -184,7 +184,7 @@ if (ALBANY_MUELU) ${CMAKE_CURRENT_BINARY_DIR}/input_fo_humboldt_muelu.yaml) add_test(${testNameRoot}_Humboldt_Tpetra_MueLu ${Albany.exe} input_fo_humboldt_muelu.yaml) - if (NOT ALBANY_IOPX AND ALBANY_MPI) + if (NOT ALBANY_PARALELL_EXODUS AND ALBANY_MPI) set_tests_properties(${testNameRoot}_Humboldt_Tpetra_MueLu PROPERTIES LABELS "LandIce;Epetra;Forward" diff --git a/tests/small/LandIce/FO_Hydrology/CMakeLists.txt b/tests/small/LandIce/FO_Hydrology/CMakeLists.txt index af4f1b4963..90af660ded 100644 --- a/tests/small/LandIce/FO_Hydrology/CMakeLists.txt +++ b/tests/small/LandIce/FO_Hydrology/CMakeLists.txt @@ -2,7 +2,7 @@ get_filename_component(testNameRoot ${CMAKE_CURRENT_SOURCE_DIR} NAME) # This variable will be set in the input files during the 'configure_file' call -if (ALBANY_IOPX) +if (ALBANY_PARALELL_EXODUS) set (USE_SERIAL_MESH "true") #IKT 5/22/19 - commenting out for now as this is leading to compilation error else () diff --git a/tests/small/LandIce/FO_Thermo/CMakeLists.txt b/tests/small/LandIce/FO_Thermo/CMakeLists.txt index 45db6a717e..bd5f7775a4 100644 --- a/tests/small/LandIce/FO_Thermo/CMakeLists.txt +++ b/tests/small/LandIce/FO_Thermo/CMakeLists.txt @@ -1,6 +1,6 @@ get_filename_component(testNameRoot ${CMAKE_CURRENT_SOURCE_DIR} NAME) -if (ALBANY_IOPX) +if (ALBANY_PARALELL_EXODUS) set (USE_SERIAL_MESH "true") else () # If there's no Iopx, we *must* have ALBANY_DECOMP defined (to decompose the mesh) @@ -37,7 +37,7 @@ if (ALBANY_EPETRA) set (testName ${testNameRoot}_Humboldt_fluxDiv) add_test(${testName} ${Albany.exe} input_FO_Thermo_Humboldt_fluxDiv.yaml) # If Iopx is not present, we must decompose the input mesh first - if (NOT ALBANY_IOPX AND ALBANY_MPI) + if (NOT ALBANY_PARALELL_EXODUS AND ALBANY_MPI) add_test (NAME FO_GIS_HUMBOLDT_decompMesh COMMAND ${SEACAS_DECOMP} -processors ${MPIMNP} humboldt_2d.exo WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../AsciiMeshes/Humboldt) diff --git a/tests/small/SteadyHeatConstrainedOpt2D/CMakeLists.txt b/tests/small/SteadyHeatConstrainedOpt2D/CMakeLists.txt index ac9b7f6aff..ed0690ff9f 100644 --- a/tests/small/SteadyHeatConstrainedOpt2D/CMakeLists.txt +++ b/tests/small/SteadyHeatConstrainedOpt2D/CMakeLists.txt @@ -78,7 +78,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/input_conductivity_dist_paramT.yaml add_test(${testName}_Tpetra ${Albany.exe} input_conductivity_dist_paramT.yaml) set_tests_properties(${testName}_Tpetra PROPERTIES LABELS "Basic;Tpetra;Forward") -if (ALBANY_IOPX) +if (ALBANY_PARALELL_EXODUS) # Copy Input file from source to binary dir configure_file(${CMAKE_CURRENT_SOURCE_DIR}/input_conductivity_dist_param_restartT.yaml ${CMAKE_CURRENT_BINARY_DIR}/input_conductivity_dist_param_restartT.yaml COPYONLY) @@ -99,7 +99,7 @@ if (ALBANY_EPETRA) add_test(${testName}_Epetra ${Albany.exe} input_conductivity_dist_param.yaml) set_tests_properties(${testName}_Epetra PROPERTIES LABELS "Basic;Epetra;Forward") - if (ALBANY_IOPX) + if (ALBANY_PARALELL_EXODUS) # Copy Input file from source to binary dir configure_file(${CMAKE_CURRENT_SOURCE_DIR}/input_conductivity_dist_param_restart.yaml ${CMAKE_CURRENT_BINARY_DIR}/input_conductivity_dist_param_restart.yaml COPYONLY)