Skip to content

Commit

Permalink
IOSS: Add flag to enable/disable building of exonull
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsjaar committed Aug 7, 2024
1 parent e2ec7b5 commit 94536d0
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 13 deletions.
1 change: 1 addition & 0 deletions cmake-config
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ cmake -G "${GENERATOR}" \
-D BUILD_SHARED_LIBS:BOOL=${SHARED} \
-D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
${SUBSET_OPTIONS} \
-D ENABLE_ExoNull:BOOL=YES \
-D Seacas_ENABLE_Zoltan:BOOL=${ZOLTAN} \
-D Seacas_ENABLE_TESTS=ON \
-D CMAKE_INSTALL_PREFIX:PATH=${INSTALL_PATH} \
Expand Down
1 change: 1 addition & 0 deletions cmake-exodus
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ cmake -G "${GENERATOR}" \
-D BUILD_SHARED_LIBS:BOOL=${SHARED} \
-D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
-D Seacas_ENABLE_SEACASExodus=YES \
-D ENABLE_ExoNull=YES \
-D Seacas_ENABLE_SEACASExodus_for=${FORTRAN} \
-D Seacas_ENABLE_SEACASExoIIv2for32=${FORTRAN} \
-D Seacas_ENABLE_TESTS=YES \
Expand Down
2 changes: 2 additions & 0 deletions packages/seacas/libraries/ioss/cmake/SEACASIoss_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

#cmakedefine SEACAS_HAVE_EXODUS

#cmakedefine SEACAS_HAVE_EXONULL

#cmakedefine SEACAS_HAVE_CGNS

#cmakedefine SEACAS_HAVE_PAMGEN
Expand Down
9 changes: 8 additions & 1 deletion packages/seacas/libraries/ioss/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ ENDIF()

IF (${PACKAGE_NAME}_ENABLE_SEACASExodus)
SET(SEACAS_HAVE_EXODUS ON)
IF (ENABLE_ExoNull)
SET(SEACAS_HAVE_EXONULL ON)
ENDIF()
ENDIF()


TRIBITS_CONFIGURE_FILE(${PACKAGE_NAME}_config.h)

SET(HEADERS "")
Expand Down Expand Up @@ -111,9 +115,12 @@ endif()

IF (${PACKAGE_NAME}_ENABLE_SEACASExodus)
ADD_SUBDIRECTORY(exodus)
ADD_SUBDIRECTORY(exonull)
IF (ENABLE_ExoNull)
ADD_SUBDIRECTORY(exonull)
ENDIF()
ENDIF()


IF (TPL_ENABLE_Pamgen OR Trilinos_ENABLE_Pamgen )
ADD_SUBDIRECTORY(pamgen)
ENDIF()
Expand Down
1 change: 1 addition & 0 deletions packages/seacas/libraries/ioss/src/Ioss_CodeTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ inline std::string IOSS_SYM_TENSOR() { return {"sym_tensor_33"}; }
/* #undef IOSS_THREADSAFE */
/* #undef SEACAS_HAVE_KOKKOS */
#define SEACAS_HAVE_EXODUS
#define SEACAS_HAVE_EXONULL
#define SEACAS_HAVE_CGNS
/* #undef SEACAS_HAVE_FAODEL */
#define SEACAS_HAVE_PAMGEN
Expand Down
6 changes: 5 additions & 1 deletion packages/seacas/libraries/ioss/src/init/Ionit_Initializer.C
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright(C) 1999-2020, 2023 National Technology & Engineering Solutions
// Copyright(C) 1999-2020, 2023, 2024 National Technology & Engineering Solutions
// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
// NTESS, the U.S. Government retains certain rights in this software.
//
Expand All @@ -10,8 +10,10 @@

#if defined(SEACAS_HAVE_EXODUS)
#include "exodus/Ioex_IOFactory.h"
#if defined(SECAS_HAVE_EXONULL)
#include "exonull/Ioexnl_IOFactory.h"
#endif
#endif

#include "gen_struc/Iogs_DatabaseIO.h"
#include "generated/Iogn_DatabaseIO.h"
Expand Down Expand Up @@ -74,8 +76,10 @@ namespace Ioss::Init {

#if defined(SEACAS_HAVE_EXODUS)
Ioex::IOFactory::factory(); // Exodus
#if defined(SECAS_HAVE_EXONULL)
Ioexnl::IOFactory::factory();
#endif
#endif
#if defined(SEACAS_HAVE_PAMGEN)
Iopg::IOFactory::factory(); // Pamgen
#endif
Expand Down
26 changes: 15 additions & 11 deletions packages/seacas/libraries/ioss/src/main/shell_interface.C
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,17 @@ void IOShell::Interface::enroll_options()
"Database type for output file:"
#if defined(SEACAS_HAVE_EXODUS)
" exodus"
#if defined(SEACAS_HAVE_EXONULL)
" exonull"
#endif
#endif
#if defined(SEACAS_HAVE_CGNS)
" cgns"
#endif
#if defined(SEACAS_HAVE_FAODEL)
" faodel"
#endif
".\n\t\tIf not specified, guess from extension or exodus is the default.",
" null.\n\t\tIf not specified, guess from extension or exodus is the default.",
"unknown");
options_.enroll("compare", Ioss::GetLongOption::NoValue,
"Compare the contents of the INPUT and OUTPUT files.", nullptr);
Expand Down Expand Up @@ -215,10 +218,10 @@ void IOShell::Interface::enroll_options()
"Files are decomposed externally into a file-per-processor in a parallel run.",
nullptr);

options_.enroll(
"add_processor_id_field", Ioss::GetLongOption::NoValue,
"Add a cell-centered field whose value is the processor id of that cell", nullptr);
options_.enroll("add_processor_id_field", Ioss::GetLongOption::NoValue,
"Add a cell-centered field whose value is the processor id of that cell",
nullptr);

options_.enroll("serialize_io_size", Ioss::GetLongOption::MandatoryValue,
"Number of processors that can perform simultaneous IO operations in "
"a parallel run;\n\t\t0 to disable",
Expand All @@ -233,10 +236,11 @@ void IOShell::Interface::enroll_options()
"If non-zero, then put <$val> timesteps in each file. Then close file and start new file.",
nullptr);

options_.enroll("split_cyclic", Ioss::GetLongOption::MandatoryValue,
"If non-zero, then the `split_times` timesteps will be put into <$val> files\n\t\tand "
"then recycle filenames.",
nullptr);
options_.enroll(
"split_cyclic", Ioss::GetLongOption::MandatoryValue,
"If non-zero, then the `split_times` timesteps will be put into <$val> files\n\t\tand "
"then recycle filenames.",
nullptr);

options_.enroll("file_per_state", Ioss::GetLongOption::NoValue,
"put transient data for each timestep in separate file (EXPERIMENTAL)", nullptr);
Expand Down Expand Up @@ -320,7 +324,7 @@ void IOShell::Interface::enroll_options()

options_.enroll("omit_sets", Ioss::GetLongOption::MandatoryValue,
"comma-separated list of nodeset/edgeset/faceset/elemset/sideset names\n"
"\t\tthat should NOT be transferred to output database",
"\t\tthat should NOT be transferred to output database",
nullptr);

options_.enroll("boundary_sideset", Ioss::GetLongOption::NoValue,
Expand Down Expand Up @@ -560,7 +564,7 @@ bool IOShell::Interface::parse_options(int argc, char **argv, int my_processor)
}

if (options_.retrieve("line_decomp") != nullptr) {
line_decomp = true;
line_decomp = true;
decomp_extra = options_.get_option_value("line_decomp", decomp_extra);
}

Expand Down

0 comments on commit 94536d0

Please sign in to comment.