Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix enabling of Use Serial Mesh #762

Merged
merged 2 commits into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <exodusII_par.h>
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 ###
Expand Down
4 changes: 2 additions & 2 deletions tests/small/CahnHillElast2D/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

Expand All @@ -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)
2 changes: 1 addition & 1 deletion tests/small/Ioss2D/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/small/LandIce/Enthalpy/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions tests/small/LandIce/FO_AIS/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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})
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down
12 changes: 6 additions & 6 deletions tests/small/LandIce/FO_GIS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand All @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/small/LandIce/FO_Hydrology/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down
4 changes: 2 additions & 2 deletions tests/small/LandIce/FO_Thermo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tests/small/SteadyHeatConstrainedOpt2D/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down