diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 5129fd87d..9d9d03e0e 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -94,7 +94,7 @@ jobs: -DSCOREC_CXX_WARNINGS=ON -DIS_TESTING=ON -DMESHES=${{github.workspace}}/pumi-meshes - -DSCOREC_NO_MPI=${{matrix.no_mpi}} + -DPUMI_NO_MPI=${{matrix.no_mpi}} -DENABLE_METIS=${{matrix.metis}} - name: Build @@ -124,7 +124,7 @@ jobs: cmake --build ${{github.workspace}}/buildExample - name: Build MPI-NoMPI Example - # Test if a SCOREC_NO_MPI build works with MPI applications. + # Test if a PUMI_NO_MPI build works with MPI applications. if: >- matrix.compiler.name == 'GNU' && matrix.build_type == 'Release' && matrix.no_mpi == 'ON' diff --git a/.github/workflows/doxygen-gh-pages.yml b/.github/workflows/doxygen-gh-pages.yml index 63a85c5f4..2f44f892a 100644 --- a/.github/workflows/doxygen-gh-pages.yml +++ b/.github/workflows/doxygen-gh-pages.yml @@ -26,7 +26,7 @@ jobs: env: MPICH_CXX: g++-10 MPICH_CC: gcc-10 - run: cmake -S ${{github.workspace}} -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_C_COMPILER=mpicc -DCMAKE_VERBOSE_MAKEFILE=ON -DMESHES=${{github.workspace}}/pumi-meshes -DIS_TESTING=ON -DSCOREC_CXX_WARNINGS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install -DSCOREC_NO_MPI=ON + run: cmake -S ${{github.workspace}} -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_C_COMPILER=mpicc -DCMAKE_VERBOSE_MAKEFILE=ON -DMESHES=${{github.workspace}}/pumi-meshes -DIS_TESTING=ON -DSCOREC_CXX_WARNINGS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install -DPUMI_NO_MPI=ON - name: Generate Doc run: doxygen ${{github.workspace}}/build/Doxyfile diff --git a/CMakeLists.txt b/CMakeLists.txt index 621afc77b..7fc270ca0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,18 +20,20 @@ if(USE_XSDK_DEFAULTS) xsdk_compiler_flags() endif() -option(ENABLE_CGNS "Enable the CGNS reader: requires c++14 extensions" OFF) -message(STATUS "ENABLE_CGNS: ${ENABLE_CGNS}") -option(ENABLE_OMEGA_H "Enable the Omega_h interface" OFF) +option(PUMI_ENABLE_CGNS + "Enable the CGNS reader (requires c++14 extensions)" ${ENABLE_CGNS} +) +message(STATUS "PUMI_ENABLE_CGNS: ${PUMI_ENABLE_CGNS}") +option(PUMI_ENABLE_OMEGA_H "Enable the Omega_h interface" ${ENABLE_OMEGA_H}) set(PUMI_USE_OMEGA_H_VERSION "10.0.0" CACHE STRING "Specify the Omega_h version PUMI should use") -message(STATUS "ENABLE_OMEGA_H: ${ENABLE_OMEGA_H}") -if(NOT ENABLE_CGNS AND NOT ENABLE_OMEGA_H) +message(STATUS "PUMI_ENABLE_OMEGA_H: ${PUMI_ENABLE_OMEGA_H}") +if(NOT PUMI_ENABLE_CGNS AND NOT PUMI_ENABLE_OMEGA_H) message(STATUS "enabling cxx11") bob_set_cxx_standard(11) -elseif(ENABLE_CGNS) +elseif(PUMI_ENABLE_CGNS) message(STATUS "enabling cxx14") bob_set_cxx_standard(14) -elseif(ENABLE_OMEGA_H) +elseif(PUMI_ENABLE_OMEGA_H) message(STATUS "enabling cxx17") bob_set_cxx_standard(17) endif() @@ -39,10 +41,10 @@ endif() # # option related to MPI # -option(SCOREC_NO_MPI "Disable MPI support. When enabled only serial execution is supported." OFF) -message(STATUS "SCOREC_NO_MPI: ${SCOREC_NO_MPI}") -if(SCOREC_NO_MPI AND ENABLE_CGNS) - message(FATAL_ERROR "SCOREC_NO_MPI is incompatible with CGNS.") +option(PUMI_NO_MPI "Disable MPI support. When enabled only serial execution is supported." OFF) +message(STATUS "PUMI_NO_MPI: ${PUMI_NO_MPI}") +if(PUMI_NO_MPI AND PUMI_ENABLE_CGNS) + message(FATAL_ERROR "PUMI_NO_MPI is incompatible with CGNS.") endif() # Set some default compiler flags that should always be used @@ -51,7 +53,7 @@ if(NOT USE_XSDK_DEFAULTS) bob_begin_cxx_flags() bob_end_cxx_flags() set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}") - if(ENABLE_CGNS) + if(PUMI_ENABLE_CGNS) bob_cxx14_flags() else() bob_cxx11_flags() @@ -103,26 +105,33 @@ add_custom_target(check set(Trilinos_PREFIX "" CACHE STRING "Trilinos installation directory") option(SKIP_SIMMETRIX_VERSION_CHECK "enable at your own risk; it may result in undefined behavior" OFF) -option(ENABLE_SIMMETRIX "Build with Simmetrix support" OFF) -message(STATUS "ENABLE_SIMMETRIX: ${ENABLE_SIMMETRIX}") -option(PUMI_ENABLE_CAPSTONE "Build PUMI with Capstone support" OFF) -# For compatibility and to inherit from owning projects: -if(ENABLE_CAPSTONE) - set(PUMI_ENABLE_CAPSTONE ON) -endif() +option( + PUMI_ENABLE_SIMMETRIX + "Build PUMI with Simmetrix support" + ${ENABLE_SIMMETRIX} # For compatibility and to inherit from owning projects +) +message(STATUS "PUMI_ENABLE_SIMMETRIX: ${PUMI_ENABLE_SIMMETRIX}") +if(PUMI_ENABLE_SIMMETRIX) + add_definitions(-DPUMI_HAS_SIMMETRIX) +endif() +option( + PUMI_ENABLE_CAPSTONE + "Build PUMI with Capstone support" + ${ENABLE_CAPSTONE} +) message(STATUS "PUMI_ENABLE_CAPSTONE: ${PUMI_ENABLE_CAPSTONE}") - -if(ENABLE_SIMMETRIX) - add_definitions(-DHAVE_SIMMETRIX) -endif() if(PUMI_ENABLE_CAPSTONE) add_definitions(-DPUMI_HAS_CAPSTONE) endif() -option(ENABLE_FPP "Build with snapping to first problem plane" OFF) -message(STATUS "ENABLE_FPP: ${ENABLE_FPP}") -if(ENABLE_FPP) - add_definitions(-DDO_FPP) +option( + PUMI_ENABLE_FPP + "Build with snapping to first problem plane" + ${ENABLE_FPP} # Inherit default value +) +message(STATUS "PUMI_ENABLE_FPP: ${PUMI_ENABLE_FPP}") +if(PUMI_ENABLE_FPP) + add_definitions(-DPUMI_DO_FPP) endif() macro(scorec_export_library target) @@ -144,7 +153,7 @@ macro(scorec_export_library target) endif() endmacro(scorec_export_library) -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) find_package(SimModSuite MODULE REQUIRED) endif() @@ -153,23 +162,23 @@ if(PUMI_ENABLE_CAPSTONE) bob_public_dep(CreateMG) endif() -if(ENABLE_OMEGA_H) +if(PUMI_ENABLE_OMEGA_H) bob_cxx17_flags() bob_set_cxx_standard(17) # find the omega_h library - set(SCOREC_USE_Omega_h_DEFAULT ${ENABLE_OMEGA_H}) + set(SCOREC_USE_Omega_h_DEFAULT ${PUMI_ENABLE_OMEGA_H}) set(Omega_h_REQUIRED_VERSION ${PUMI_USE_OMEGA_H_VERSION}) bob_public_dep(Omega_h) endif() -if(ENABLE_CGNS) - set(SCOREC_USE_CGNS_DEFAULT ${ENABLE_CGNS}) +if(PUMI_ENABLE_CGNS) + set(SCOREC_USE_CGNS_DEFAULT ${PUMI_ENABLE_CGNS}) bob_public_dep(CGNS) #CGNS does not provide cmake targets :( include_directories(SYSTEM ${CGNS_INCLUDE_DIR}) - set(SCOREC_USE_HDF5_DEFAULT ${ENABLE_CGNS}) + set(SCOREC_USE_HDF5_DEFAULT ${PUMI_ENABLE_CGNS}) bob_public_dep(HDF5) - add_definitions(-DHAVE_CGNS) + add_definitions(-DPUMI_HAS_CGNS) endif() configure_file(SCOREC_config.h.in SCOREC_config.h) @@ -205,7 +214,7 @@ add_subdirectory(apf_cap) # this INTERFACE target bundles all the enabled libraries together add_library(core INTERFACE) target_link_libraries(core INTERFACE ${SCOREC_EXPORTED_TARGETS}) -if(ENABLE_CGNS) +if(PUMI_ENABLE_CGNS) target_link_libraries(core INTERFACE ${CMAKE_DL_LIBS}) #HDF5 uses dlopen endif() scorec_export_library(core) diff --git a/SCOREC_config.h.in b/SCOREC_config.h.in index 7fe11839b..d8b98dfed 100644 --- a/SCOREC_config.h.in +++ b/SCOREC_config.h.in @@ -1,7 +1,7 @@ #ifndef SCOREC_CONFIG_H #define SCOREC_CONFIG_H -#cmakedefine SCOREC_NO_MPI +#cmakedefine PUMI_NO_MPI #endif // SCOREC_CONFIG_H diff --git a/apf/CMakeLists.txt b/apf/CMakeLists.txt index a50f56d88..f4e728e44 100644 --- a/apf/CMakeLists.txt +++ b/apf/CMakeLists.txt @@ -57,9 +57,11 @@ set(SOURCES apfMIS.cc ) -if(ENABLE_CGNS) +if(PUMI_ENABLE_CGNS) set(SOURCES ${SOURCES} apfCGNS.cc) -endif(ENABLE_CGNS) +else() + set(SOURCES ${SOURCES} apfCGNSempty.cc) +endif() # Package headers set(HEADERS diff --git a/apf/apfCGNS.cc b/apf/apfCGNS.cc index da01cd99b..927f3e89f 100644 --- a/apf/apfCGNS.cc +++ b/apf/apfCGNS.cc @@ -28,12 +28,8 @@ #include /* for checking the error from mkdir */ // =============================== -#ifdef HAVE_CGNS -// #include #include -// -#endif // Note: currently, even in 2D or 1D a full 3D vector and matrix are written out to the file @@ -705,7 +701,7 @@ void AddBocosToMainBase(const CGNS &cgns, const CellElementReturn &cellResults, displacement[i] = displacement[i - 1] + sizes[i - 1]; allElements.resize(totalLength); - #ifndef SCOREC_NO_MPI + #ifndef PUMI_NO_MPI PCU_Comm comm; m->getPCU()->DupComm(&comm); MPI_Allgatherv(bcList.data(), bcList.size(), MPI_INT, allElements.data(), @@ -1138,7 +1134,7 @@ void WriteCGNS(const char *prefix, apf::Mesh *m, const apf::CGNSBCMap &cgnsBCMap destroyGlobalNumbering(gcn); // cgp_close(cgns.index); - #ifndef SCOREC_NO_MPI + #ifndef PUMI_NO_MPI MPI_Comm_free(&communicator); #endif } @@ -1147,15 +1143,8 @@ void WriteCGNS(const char *prefix, apf::Mesh *m, const apf::CGNSBCMap &cgnsBCMap namespace apf { -void writeCGNS(const char *prefix, Mesh *m, const apf::CGNSBCMap &cgnsBCMap) -{ -#ifdef HAVE_CGNS +void writeCGNS(const char *prefix, Mesh *m, const apf::CGNSBCMap &cgnsBCMap) { WriteCGNS(prefix, m, cgnsBCMap); -#else - PCU_ALWAYS_ASSERT_VERBOSE(true == false, - "Build with ENABLE_CGNS to allow this functionality."); - exit(EXIT_FAILURE); -#endif } } // namespace apf diff --git a/apf/apfCGNSempty.cc b/apf/apfCGNSempty.cc new file mode 100644 index 000000000..8af2266e6 --- /dev/null +++ b/apf/apfCGNSempty.cc @@ -0,0 +1,9 @@ +#include + +namespace apf { + +void writeCGNS(const char*, Mesh*, const apf::CGNSBCMap&) { + fail("Build with PUMI_ENABLE_CGNS to enable apf::writeCGNS."); +} + +} // namespace apf diff --git a/apf/pkg_tribits.cmake b/apf/pkg_tribits.cmake index e558ab4dc..3cea4d8ed 100644 --- a/apf/pkg_tribits.cmake +++ b/apf/pkg_tribits.cmake @@ -57,9 +57,11 @@ set(APF_SOURCES apfFile.cc ) -if(ENABLE_CGNS) +if(PUMI_ENABLE_CGNS) set(APF_SOURCES ${APF_SOURCES} apfCGNS.cc) -endif(ENABLE_CGNS) +else() + set(APF_SOURCES ${APF_SOURCES} apfCGNSempty.cc) +endif() set(APF_HEADERS apf.h diff --git a/apf_sim/CMakeLists.txt b/apf_sim/CMakeLists.txt index 7606ef720..02d3913ed 100644 --- a/apf_sim/CMakeLists.txt +++ b/apf_sim/CMakeLists.txt @@ -3,7 +3,7 @@ if(DEFINED TRIBITS_PACKAGE) return() endif() -if(NOT ENABLE_SIMMETRIX) +if(NOT PUMI_ENABLE_SIMMETRIX) return() endif() @@ -21,13 +21,17 @@ target_include_directories(apf_sim PUBLIC $ ) -option(ENABLE_FIELDSIM "Enable use of FieldSim from Simmetrix SimModSuite" FALSE) -message(STATUS "ENABLE_FIELDSIM: ${ENABLE_FIELDSIM}") -set(USE_FIELDSIM FALSE) -if( ${SIMMODSUITE_SimField_FOUND} AND ENABLE_FIELDSIM ) - set(USE_FIELDSIM TRUE) +option( + PUMI_ENABLE_FIELDSIM + "Request use of FieldSim from Simmetrix SimModSuite (only used if found)" + ${ENABLE_FIELDSIM} # Inherit default value +) +message(STATUS "PUMI_ENABLE_FIELDSIM: ${PUMI_ENABLE_FIELDSIM}") +set(PUMI_USE_FIELDSIM FALSE) +if( ${SIMMODSUITE_SimField_FOUND} AND PUMI_ENABLE_FIELDSIM ) + set(PUMI_USE_FIELDSIM TRUE) endif() -set(USE_SIM_ADVMESHING ${HAVE_SIMADVMESHING}) +set(PUMI_HAS_SIMADVMESHING ${SIMMODSUITE_SimAdvMeshing_FOUND}) configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/apf_simConfig.h.in" diff --git a/apf_sim/apfSIM.cc b/apf_sim/apfSIM.cc index 09a447a19..0b7457f34 100644 --- a/apf_sim/apfSIM.cc +++ b/apf_sim/apfSIM.cc @@ -12,7 +12,7 @@ #include #include -#ifdef USE_FIELDSIM +#ifdef PUMI_USE_FIELDSIM #include "apfSIMDataOf.h" diff --git a/apf_sim/apf_simConfig.h.in b/apf_sim/apf_simConfig.h.in index 0138f07cd..105a1eb90 100644 --- a/apf_sim/apf_simConfig.h.in +++ b/apf_sim/apf_simConfig.h.in @@ -1,4 +1,4 @@ -#cmakedefine USE_FIELDSIM -#cmakedefine USE_SIM_ADVMESHING +#cmakedefine PUMI_USE_FIELDSIM +#cmakedefine PUMI_HAS_SIMADVMESHING #cmakedefine SIMMODSUITE_MAJOR_VERSION @SIMMODSUITE_MAJOR_VERSION@ #cmakedefine SIMMODSUITE_MINOR_VERSION @SIMMODSUITE_MINOR_VERSION@ diff --git a/cmake/bob.cmake b/cmake/bob.cmake index 2b2fb8934..eb8289542 100644 --- a/cmake/bob.cmake +++ b/cmake/bob.cmake @@ -47,6 +47,9 @@ macro(bob_set_shared_libs) message(STATUS "BUILD_SHARED_LIBS: ${BUILD_SHARED_LIBS}") endmacro(bob_set_shared_libs) +# Flags can be set either by bob's three flags or by CMAKE_BUILD_TYPE. The +# advantage of CMAKE_BUILD_TYPE is that you get modern defaults, but the +# USE_DEFAULT_XSDK flag always sets the CMAKE_BUILD_TYPE to "DEBUG". function(bob_begin_cxx_flags) option(${PROJECT_NAME}_CXX_OPTIMIZE "Compile C++ with optimization" ON) option(${PROJECT_NAME}_CXX_SYMBOLS "Compile C++ with debug symbols" ON) @@ -74,7 +77,7 @@ function(bob_begin_cxx_flags) else() message(WARNING "Unexpected compiler type ${CMAKE_CXX_COMPILER_ID}") endif() - set(CMAKE_CXX_FLAGS "${FLAGS}" PARENT_SCOPE) + set(CMAKE_CXX_FLAGS "${FLAGS}" PARENT_SCOPE) # Upgrade to directory scope endfunction(bob_begin_cxx_flags) # The following is from the book,"Professional CMake: 19th edition" diff --git a/doc/myprogram.cpp b/doc/myprogram.cpp index 59df0f823..6471ac83a 100644 --- a/doc/myprogram.cpp +++ b/doc/myprogram.cpp @@ -1,13 +1,9 @@ #include #include "mylibrary.h" int main(int argc, char** argv) { -#ifndef SCOREC_NO_MPI - MPI_Init(&argc,&argv); -#endif + pcu::Init(&argc, &argv); pcu::PCU PCUObj; makeMesh(&PCUObj); -#ifndef SCOREC_NO_MPI - MPI_Finalize(); -#endif + pcu::Finalize(); return 0; } diff --git a/dsp/CMakeLists.txt b/dsp/CMakeLists.txt index 62ec50144..b3c07cffe 100644 --- a/dsp/CMakeLists.txt +++ b/dsp/CMakeLists.txt @@ -1,9 +1,13 @@ # Component options -option(ENABLE_DSP "Enable the dsp package [ON|OFF]" OFF) -message(STATUS "ENABLE_DSP: " ${ENABLE_DSP}) +option( + PUMI_ENABLE_DSP + "Enable the dsp package [ON|OFF]" + ${ENABLE_DSP} # compatability with PUMI < 5.0 and/or inherit from parent +) +message(STATUS "PUMI_ENABLE_DSP: " ${PUMI_ENABLE_DSP}) # Only install the package if enabled -if(NOT ENABLE_DSP) +if(NOT PUMI_ENABLE_DSP) return() endif() diff --git a/example/mpi-nompi/README.md b/example/mpi-nompi/README.md index 582e4ea3e..c96fe538a 100644 --- a/example/mpi-nompi/README.md +++ b/example/mpi-nompi/README.md @@ -1,6 +1,6 @@ -# Example: Using SCOREC_NO_MPI in an MPI application +# Example: Using PUMI_NO_MPI in an MPI application -This example demonstrates how to combine a SCOREC_NO_MPI build of core with an -application that is using MPI. This is the prime use case for the SCOREC_NO_MPI +This example demonstrates how to combine a PUMI_NO_MPI build of core with an +application that is using MPI. This is the prime use case for the PUMI_NO_MPI option. diff --git a/example/mpi-nompi/test_coll.cc b/example/mpi-nompi/test_coll.cc index 246b74d82..9368de7df 100644 --- a/example/mpi-nompi/test_coll.cc +++ b/example/mpi-nompi/test_coll.cc @@ -16,7 +16,7 @@ int main(int argc, char** argv) { if (rank == 0) std::cout << "MPI size: " << size << "; PCU size: " << PCUObj.Peers() << std::endl; - #ifdef SCOREC_NO_MPI + #ifdef PUMI_NO_MPI PCU_ALWAYS_ASSERT(PCUObj.Self() == 0); PCU_ALWAYS_ASSERT(PCUObj.Peers() == 1); #else diff --git a/gmi_sim/CMakeLists.txt b/gmi_sim/CMakeLists.txt index 17df8ba74..0b5560997 100644 --- a/gmi_sim/CMakeLists.txt +++ b/gmi_sim/CMakeLists.txt @@ -3,7 +3,7 @@ if(DEFINED TRIBITS_PACKAGE) return() endif() -if(NOT ENABLE_SIMMETRIX) +if(NOT PUMI_ENABLE_SIMMETRIX) return() endif() diff --git a/ma/maInput.cc b/ma/maInput.cc index e153f31b9..a0a24133f 100644 --- a/ma/maInput.cc +++ b/ma/maInput.cc @@ -157,7 +157,10 @@ void validateInput(Input* in) if (in->shouldRunPreZoltan || in->shouldRunPreZoltanRib || in->shouldRunMidZoltan) - rejectInput("core is not compiled with Zoltan. Use a different balancer or compile core with ENABLE_ZOLTAN=ON!", in->mesh->getPCU()); + rejectInput( + "core is not compiled with Zoltan. Use a different balancer or compile " + "core with PUMI_ENABLE_ZOLTAN=ON!", in->mesh->getPCU() + ); #endif #ifndef PUMI_HAS_METIS if ( @@ -165,7 +168,7 @@ void validateInput(Input* in) ) { rejectInput( "PUMI was not compiled with METIS. Use a different balancer or compile " - "PUMI with ENABLE_METIS=ON!", in->mesh->getPCU() + "with PUMI_ENABLE_METIS=ON!", in->mesh->getPCU() ); } #endif diff --git a/ma/maSnapper.cc b/ma/maSnapper.cc index 14c9a1651..1efafe962 100644 --- a/ma/maSnapper.cc +++ b/ma/maSnapper.cc @@ -263,7 +263,7 @@ bool Snapper::run() // there is no need for the following if there exists no bad elements if (badElements.n == 0) return true; FirstProblemPlane* FPP; -#ifdef DO_FPP +#ifdef PUMI_DO_FPP FPP = new FirstProblemPlane(adapter, snapTag); FPP->setVertex(vert); #else diff --git a/mds/CMakeLists.txt b/mds/CMakeLists.txt index a2d9f8197..c6f78b7c5 100644 --- a/mds/CMakeLists.txt +++ b/mds/CMakeLists.txt @@ -31,9 +31,11 @@ set(SOURCES mdsUgrid.cc ) -if(ENABLE_CGNS) +if(PUMI_ENABLE_CGNS) set(SOURCES ${SOURCES} mdsCGNS.cc) -endif(ENABLE_CGNS) +else() + set(SOURCES ${SOURCES} mdsCGNSempty.cc) +endif() # Package headers set(HEADERS @@ -62,10 +64,10 @@ target_link_libraries(mds apf ) -if(ENABLE_CGNS) +if(PUMI_ENABLE_CGNS) message(STATUS ${CGNS_LIBRARIES}) target_link_libraries(mds PRIVATE ${CGNS_LIBRARIES} ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES}) -endif(ENABLE_CGNS) +endif(PUMI_ENABLE_CGNS) scorec_export_library(mds) diff --git a/mds/mdsCGNS.cc b/mds/mdsCGNS.cc index 54f483607..86322f499 100644 --- a/mds/mdsCGNS.cc +++ b/mds/mdsCGNS.cc @@ -34,13 +34,8 @@ #include #include #include -// -#ifdef HAVE_CGNS -// #include #include -// -#endif namespace { @@ -1637,7 +1632,7 @@ apf::Mesh2 *DoIt(PCU_t h, gmi_model *g, const std::string &fname, apf::CGNSBCMap cgp_close(cgid); else cg_close(cgid); -#ifndef SCOREC_NO_MPI +#ifndef PUMI_NO_MPI MPI_Comm_free(&comm); #endif @@ -1729,31 +1724,16 @@ namespace apf // caller needs to bring up and pull down mpi/pcu: mpi/pcu is required and assumed. Mesh2 *loadMdsFromCGNS(PCU_t h, gmi_model *g, const char *fname, apf::CGNSBCMap &cgnsBCMap, const std::vector> &meshData) { -#ifdef HAVE_CGNS Mesh2 *m = DoIt(h, g, fname, cgnsBCMap, meshData); return m; -#else - Mesh2 *m = nullptr; - PCU_ALWAYS_ASSERT_VERBOSE(m != nullptr, - "Build with ENABLE_CGNS to allow this functionality."); - exit(EXIT_FAILURE); - return m; -#endif } // caller needs to bring up and pull down mpi/pcu: mpi/pcu is required and assumed. -Mesh2 *loadMdsFromCGNS(PCU_t h, gmi_model *g, const char *fname, apf::CGNSBCMap &cgnsBCMap) -{ -#ifdef HAVE_CGNS +Mesh2 *loadMdsFromCGNS( + PCU_t h, gmi_model *g, const char *fname, apf::CGNSBCMap &cgnsBCMap +) { Mesh2 *m = DoIt(h, g, fname, cgnsBCMap); return m; -#else - Mesh2 *m = nullptr; - PCU_ALWAYS_ASSERT_VERBOSE(m != nullptr, - "Build with ENABLE_CGNS to allow this functionality."); - exit(EXIT_FAILURE); - return m; -#endif } } // namespace apf diff --git a/mds/mdsCGNSempty.cc b/mds/mdsCGNSempty.cc new file mode 100644 index 000000000..5697392e4 --- /dev/null +++ b/mds/mdsCGNSempty.cc @@ -0,0 +1,18 @@ +#include "apfMDS.h" + +namespace apf { + +Mesh2 *loadMdsFromCGNS( + PCU_t, gmi_model*, const char*, apf::CGNSBCMap&, + const std::vector>& +) { + fail("Build with PUMI_ENABLE_CGNS to enable loadMdsFromCGNS."); +} + +Mesh2 *loadMdsFromCGNS( + PCU_t, gmi_model*, const char*, apf::CGNSBCMap& +) { + fail("Build with PUMI_ENABLE_CGNS to enable loadMdsFromCGNS."); +} + +} // namespace apf diff --git a/mds/pkg_tribits.cmake b/mds/pkg_tribits.cmake index 07211c87b..e522df12f 100644 --- a/mds/pkg_tribits.cmake +++ b/mds/pkg_tribits.cmake @@ -22,9 +22,11 @@ set(MDS_SOURCES mdsGmsh.cc mdsUgrid.cc) -if(ENABLE_CGNS) +if(PUMI_ENABLE_CGNS) set(MDS_SOURCES ${MDS_SOURCES} mdsCGNS.cc) -endif(ENABLE_CGNS) +else() + set(MDS_SOURCES ${MDS_SOURCES} mdsCGNSempty.cc) +endif() set(MDS_HEADERS apfMDS.h diff --git a/metis/CMakeLists.txt b/metis/CMakeLists.txt index d5d1b0298..d819fc14c 100644 --- a/metis/CMakeLists.txt +++ b/metis/CMakeLists.txt @@ -3,15 +3,15 @@ if(DEFINED TRIBITS_PACKAGE) return() endif() -option(ENABLE_METIS "Enable METIS interface" OFF) -message(VERBOSE "ENABLE_METIS: ${ENABLE_METIS}") +option(PUMI_ENABLE_METIS "Enable METIS interface" ${ENABLE_METIS}) +message(VERBOSE "PUMI_ENABLE_METIS: ${PUMI_ENABLE_METIS}") xsdk_add_tpl(METIS) -if(ENABLE_METIS) +if(PUMI_ENABLE_METIS) find_package(METIS REQUIRED) endif() # Package sources -if(ENABLE_METIS) +if(PUMI_ENABLE_METIS) set(SOURCES apfMETIS.cc apfMETIScommon.cc @@ -31,7 +31,7 @@ target_include_directories(apf_metis INTERFACE $ ) target_link_libraries(apf_metis PUBLIC apf) -if(ENABLE_METIS) +if(PUMI_ENABLE_METIS) target_compile_definitions(apf_metis PUBLIC PUMI_HAS_METIS) target_link_libraries(apf_metis PRIVATE "${METIS_LIBRARIES}") target_include_directories(apf_metis PRIVATE "${METIS_INCLUDE_DIRS}") diff --git a/omega_h/CMakeLists.txt b/omega_h/CMakeLists.txt index a1918dbcd..8cb1ff1a2 100644 --- a/omega_h/CMakeLists.txt +++ b/omega_h/CMakeLists.txt @@ -1,7 +1,7 @@ # Package options # Only install the package if enabled -if (NOT ENABLE_OMEGA_H) +if (NOT PUMI_ENABLE_OMEGA_H) return() endif() diff --git a/pcu/CMakeLists.txt b/pcu/CMakeLists.txt index 79202f2a2..a984795c5 100644 --- a/pcu/CMakeLists.txt +++ b/pcu/CMakeLists.txt @@ -23,7 +23,7 @@ set(SOURCES reel/reel.c PCU.cc) -if(SCOREC_NO_MPI) +if(PUMI_NO_MPI) set(SOURCES ${SOURCES} pcu_pnompi.c) else() set(SOURCES ${SOURCES} pcu_pmpi.c) diff --git a/pcu/PCU.cc b/pcu/PCU.cc index bddddb95f..2541aaf57 100644 --- a/pcu/PCU.cc +++ b/pcu/PCU.cc @@ -15,7 +15,7 @@ namespace pcu { void Init(int *argc, char ***argv) { -#ifndef SCOREC_NO_MPI +#ifndef PUMI_NO_MPI int flag; MPI_Initialized(&flag); if (!flag) MPI_Init(argc, argv); @@ -25,7 +25,7 @@ void Init(int *argc, char ***argv) { } void Finalize() { -#ifndef SCOREC_NO_MPI +#ifndef PUMI_NO_MPI int flag; MPI_Finalized(&flag); if (!flag) MPI_Finalize(); @@ -186,7 +186,7 @@ void PCU::DebugOpen() noexcept { double GetMem() noexcept { return pcu_get_mem(); } void Protect() noexcept { reel_protect(); } double Time() noexcept { -#ifndef SCOREC_NO_MPI +#ifndef PUMI_NO_MPI return MPI_Wtime(); #else struct timespec now; @@ -208,7 +208,7 @@ void PCU::DebugPrint(const char *format, va_list args) noexcept { fflush(msg_->file); } PCU::PCU() : -#ifndef SCOREC_NO_MPI +#ifndef PUMI_NO_MPI PCU(MPI_COMM_WORLD) #else PCU(0) diff --git a/pcu/PCU.h b/pcu/PCU.h index 5d928aed1..ae04ec840 100644 --- a/pcu/PCU.h +++ b/pcu/PCU.h @@ -103,7 +103,7 @@ class PCU { * function may be used to initialize other libraries using the PCU-defined * communication group. * - * If SCOREC::core was compiled with the SCOREC_NO_MPI flag, the return value + * If SCOREC::core was compiled with the PUMI_NO_MPI flag, the return value * is not meaningful. * * \param[out] newcomm The output address for the new communicator copy. @@ -143,14 +143,14 @@ void Protect() noexcept; /** * \brief Initialize the underlying parallel library. * - * This may be MPI (or a stub, given SCOREC_NO_MPI). This function abstracts + * This may be MPI (or a stub, given PUMI_NO_MPI). This function abstracts * the difference. */ void Init(int *argc, char ***argv); /** * \brief Finalize the underlying parallel library. * - * This may be MPI (or a stub, given SCOREC_NO_MPI). This function abstracts + * This may be MPI (or a stub, given PUMI_NO_MPI). This function abstracts * the difference. */ void Finalize(); diff --git a/pcu/pcu_defines.h b/pcu/pcu_defines.h index fbe478daf..61b874faa 100644 --- a/pcu/pcu_defines.h +++ b/pcu/pcu_defines.h @@ -2,7 +2,7 @@ #define SCOREC_PCU_PCU_DEFINES_H #include -#ifndef SCOREC_NO_MPI +#ifndef PUMI_NO_MPI #include #endif @@ -19,7 +19,7 @@ extern "C"{ #endif -#ifndef SCOREC_NO_MPI +#ifndef PUMI_NO_MPI typedef MPI_Comm PCU_Comm; typedef MPI_Request PCU_Request; #define PCU_ANY_SOURCE MPI_ANY_SOURCE diff --git a/pcu/pkg_tribits.cmake b/pcu/pkg_tribits.cmake index 587e0633a..5c75ddcbf 100644 --- a/pcu/pkg_tribits.cmake +++ b/pcu/pkg_tribits.cmake @@ -47,7 +47,7 @@ set(SOURCES reel/reel.c PCU.cc) -if(SCOREC_NO_MPI) +if(PUMI_NO_MPI) set(SOURCES ${SOURCES} pcu_pnompi.c) else() set(SOURCES ${SOURCES} pcu_pmpi.c) @@ -62,7 +62,7 @@ set(HEADERS PCU.h ) -if(SCOREC_NO_MPI) +if(PUMI_NO_MPI) set(HEADERS ${HEADERS} pcu_pnompi_types.h) endif() tribits_add_library( diff --git a/phasta/CMakeLists.txt b/phasta/CMakeLists.txt index 25b45144d..f3bc822d0 100644 --- a/phasta/CMakeLists.txt +++ b/phasta/CMakeLists.txt @@ -23,7 +23,7 @@ set(SOURCES phiotimer.cc ) -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) if(SIM_DOT_VERSION VERSION_GREATER 12.0.180605) set(SOURCES ${SOURCES} splitMeshOnGFace_2arg.cpp) else() @@ -38,7 +38,7 @@ if(PUMI_FORTRAN_INTERFACE) install(DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/ DESTINATION include) endif() -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) set(SOURCES ${SOURCES} phAttrib.cc phSnap.cc @@ -50,7 +50,7 @@ endif() if(SIMMODSUITE_SimAdvMeshing_FOUND) # simmetrix enabled set(SOURCES ${SOURCES} phGrowthCurves.cc) endif() -if(NOT ENABLE_SIMMETRIX # no simmetrix +if(NOT PUMI_ENABLE_SIMMETRIX # no simmetrix OR NOT SIMMODSUITE_SimAdvMeshing_FOUND) # have simmetrix, but not advMeshing set(SOURCES ${SOURCES} phGrowthCurves_empty.cc) @@ -70,11 +70,6 @@ set(HEADERS # Add the ph library add_library(ph ${SOURCES}) -# Add the SimAdvMeshing flag -if(SIMMODSUITE_SimAdvMeshing_FOUND) # simmetrix enabled - target_compile_definitions(ph PRIVATE -DHAVE_SIMADVMESHING) -endif() - #determine which timer to use based on the target system and compiler if(CMAKE_SYSTEM_NAME MATCHES BlueGeneQ*) add_definitions(-DUSE_PCU_TIME) @@ -116,7 +111,7 @@ target_link_libraries(ph apf_zoltan pumi ) -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) target_link_libraries(ph PUBLIC gmi_sim apf_sim diff --git a/phasta/adaptLvlSet_loop.cc b/phasta/adaptLvlSet_loop.cc index b9c2bd3c2..57f25b9c8 100644 --- a/phasta/adaptLvlSet_loop.cc +++ b/phasta/adaptLvlSet_loop.cc @@ -13,7 +13,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #endif @@ -40,7 +40,7 @@ int main(int argc, char** argv) { { pcu::PCU PCUObj; pcu::Protect(); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX Sim_readLicenseFile(0); gmi_sim_start(); gmi_register_sim(); @@ -66,7 +66,7 @@ int main(int argc, char** argv) { destroyGRStream(grs,&PCUObj); destroyRStream(rs,&PCUObj); freeMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); #endif diff --git a/phasta/chef.cc b/phasta/chef.cc index 646038b14..d09633377 100644 --- a/phasta/chef.cc +++ b/phasta/chef.cc @@ -3,13 +3,14 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include +#include #include #include #include #include -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING #include #endif #endif @@ -38,12 +39,12 @@ int main(int argc, char** argv) lion_oprint(1,"PUMI Git hash %s\n", pumi_version()); lion_oprint(1,"PUMI version %s Git hash %s\n", pumi_version(), pumi_git_sha()); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); SimPartitionedMesh_start(0, 0); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_start(); #endif gmi_sim_start(); @@ -58,9 +59,9 @@ int main(int argc, char** argv) in.load(inputPath.c_str(), &PCUObj); chef::cook(g,m,in,&PCUObj); freeMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_stop(); #endif SimPartitionedMesh_stop(); diff --git a/phasta/chefStream.cc b/phasta/chefStream.cc index 1229b882f..cac1d4bb8 100644 --- a/phasta/chefStream.cc +++ b/phasta/chefStream.cc @@ -13,7 +13,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #endif @@ -36,7 +36,7 @@ int main(int argc, char** argv) { { pcu::PCU PCUObj; pcu::Protect(); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX Sim_readLicenseFile(0); gmi_sim_start(); gmi_register_sim(); @@ -55,7 +55,7 @@ int main(int argc, char** argv) { destroyGRStream(grs,&PCUObj); destroyRStream(rs,&PCUObj); freeMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); #endif diff --git a/phasta/condense.cc b/phasta/condense.cc index c21bc00cb..3b566b91a 100644 --- a/phasta/condense.cc +++ b/phasta/condense.cc @@ -3,7 +3,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #endif @@ -45,7 +45,7 @@ int main(int argc, char** argv) { pcu::Protect(); lion_set_verbosity(1); checkInputs(argc,argv,&pcu_obj); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX Sim_readLicenseFile(0); gmi_sim_start(); gmi_register_sim(); @@ -60,7 +60,7 @@ int main(int argc, char** argv) { apf::Unmodulo outMap(code.mesh->getPCU()->Self(), code.mesh->getPCU()->Peers()); code.ctrl = in; Parma_ShrinkPartition(code.mesh, atoi(argv[2]), code); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); #endif diff --git a/phasta/cut_interface.cc b/phasta/cut_interface.cc index 65bf458dc..eceff1841 100644 --- a/phasta/cut_interface.cc +++ b/phasta/cut_interface.cc @@ -2,12 +2,13 @@ #include "phInterfaceCutter.h" #include "phAttrib.h" #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include #include -#ifdef HAVE_SIMADVMESHING +#include +#ifdef PUMI_HAS_SIMADVMESHING #include #endif #endif @@ -34,11 +35,11 @@ int main(int argc, char** argv) { pcu::PCU PCUObj = pcu::PCU(MPI_COMM_WORLD); PCU_ALWAYS_ASSERT(PCUObj.Peers() == 1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX SimModel_start(); Sim_readLicenseFile(0); SimPartitionedMesh_start(0, 0); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_start(); #endif gmi_sim_start(); @@ -62,7 +63,7 @@ int main(int argc, char** argv) ph::getSimmetrixAttributes(gm, bcs); apf::Mesh2* m = ph::loadMesh(gm, meshfile, &PCUObj); m->verify(); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX if (ph::mesh_has_ext(meshfile, "sms")) ph::cutInterfaceSIM(m, bcs); else @@ -72,9 +73,9 @@ int main(int argc, char** argv) m->writeNative(outfile); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_stop(); #endif SimPartitionedMesh_stop(); diff --git a/phasta/migrate_interface.cc b/phasta/migrate_interface.cc index 980ede4b7..07656ded7 100644 --- a/phasta/migrate_interface.cc +++ b/phasta/migrate_interface.cc @@ -7,7 +7,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -60,7 +60,7 @@ int main(int argc, char** argv) { pcu::PCU pcu_obj = pcu::PCU(MPI_COMM_WORLD); lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -83,7 +83,7 @@ int main(int argc, char** argv) apf::writeVtkFiles("test", m); freeMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/phasta/ph.cc b/phasta/ph.cc index 417122b61..05742fb6d 100644 --- a/phasta/ph.cc +++ b/phasta/ph.cc @@ -11,7 +11,7 @@ #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -158,7 +158,7 @@ bool mesh_has_ext(const char* filename, const char* ext) apf::Mesh2* loadMesh(gmi_model*& g, const char* meshfile, pcu::PCU *PCUObj) { apf::Mesh2* mesh; -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX /* if it is a simmetrix mesh */ if (mesh_has_ext(meshfile, "sms")) { pProgress progress = Progress_new(); diff --git a/phasta/phBC.cc b/phasta/phBC.cc index f50836170..5ac94f801 100644 --- a/phasta/phBC.cc +++ b/phasta/phBC.cc @@ -1,6 +1,6 @@ #include #include "phBC.h" -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include "phAttrib.h" #include #endif @@ -114,7 +114,7 @@ void readBCs(gmi_model* m, const char* attFile, bool axisymmetry, BCs& bcs) either its an SPJ file or they came in with the model */ if (gmi_has_ext(attFile, "spj")) readBCsFromSPJ(attFile, bcs); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX else getSimmetrixAttributes(m, bcs); #endif @@ -131,7 +131,7 @@ void loadModelAndBCs(ph::Input& in, gmi_model*& m, BCs& bcs, pcu::PCU *PCUObj) /* case 1: meshmodel */ if (gmi_has_ext(modelfile, "dmg")) m = gmi_load(modelfile); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX /* cases 2: Simmetrix model (and possibly attributes) file */ else if (gmi_has_ext(modelfile, "smd")) m = gmi_sim_load(0, modelfile); diff --git a/phasta/phCook.cc b/phasta/phCook.cc index 6de8f399f..8d343aaf5 100644 --- a/phasta/phCook.cc +++ b/phasta/phCook.cc @@ -1,7 +1,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -218,7 +218,7 @@ namespace ph { if(!m->getPCU()->Self()) ph::writeAuxiliaryFiles(path, in.timeStepNumber, m->getPCU()); m->verify(); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_model* g = m->getModel(); ph::clearAttAssociation(g,in); #endif diff --git a/phasta/phInterfaceCutter.cc b/phasta/phInterfaceCutter.cc index 76d5513ea..ea62d4a2e 100644 --- a/phasta/phInterfaceCutter.cc +++ b/phasta/phInterfaceCutter.cc @@ -7,7 +7,7 @@ #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include "SimPartitionedMesh.h" #include "SimModel.h" @@ -178,7 +178,7 @@ void cutInterface(apf::Mesh2* m, BCs& bcs) cutEntities(m, fbcs, mm); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX int M_numVerticesInClosure(pMesh mesh, pGEntity model){ int counter = 0; pVertex meshVertex; diff --git a/phasta/phMeshQuality.cc b/phasta/phMeshQuality.cc index c96ac84ff..dc887e118 100644 --- a/phasta/phMeshQuality.cc +++ b/phasta/phMeshQuality.cc @@ -9,12 +9,13 @@ #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX +#include #include #include #include #include -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING #include #endif #endif @@ -40,7 +41,7 @@ void attachSIMSizeField(apf::Mesh2* m, apf::Field* sf_mag, apf::Field* sf_dir) { apf::MeshEntity* v; apf::MeshIterator* vit = m->begin(0); while ((v = m->iterate(vit))) { -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX // get sim size field // this is for simmetrix mesh, should be generalized { @@ -95,7 +96,7 @@ void attachSIMSizeField(apf::Mesh2* m, apf::Field* sf_mag) { apf::MeshEntity* v; apf::MeshIterator* vit = m->begin(0); while ((v = m->iterate(vit))) { -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX // get sim size field // this is for simmetrix mesh, should be generalized { @@ -191,7 +192,7 @@ void core_measure_mesh (double x1[], double x2[], double x3[], int numnp, /* not support other mesh region type */ if (m->getType(e) != apf::Mesh::TET) continue; -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING if (EN_isBLEntity(reinterpret_cast(e))) continue; #endif @@ -204,7 +205,7 @@ void core_measure_mesh (double x1[], double x2[], double x3[], int numnp, // measure mesh face in layered mesh minfq = 1.0; -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING if (in.simmetrixMesh == 1) { // get simmetrix mesh apf::MeshSIM* apf_msim = dynamic_cast(m); diff --git a/phasta/phOutput.cc b/phasta/phOutput.cc index 65bd3905f..1b64727d0 100644 --- a/phasta/phOutput.cc +++ b/phasta/phOutput.cc @@ -6,7 +6,7 @@ #include "phBubble.h" #include "phAxisymmetry.h" #include "phInterfaceCutter.h" -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include "apfSIM.h" #include "gmi_sim.h" #include diff --git a/phasta/phPartition.cc b/phasta/phPartition.cc index 0d310e8ca..366057a3c 100644 --- a/phasta/phPartition.cc +++ b/phasta/phPartition.cc @@ -10,7 +10,7 @@ -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include "SimPartitionedMesh.h" #include "SimModel.h" @@ -176,7 +176,7 @@ void zoltanBalance(apf::Mesh2* m, Input& in, int method) m, method, apf::REPARTITION, dbg)); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX void setEqualWeights(pParMesh pmesh, int desiredTotNumParts, pProgress progress) { pPartitionOpts pOpts = PartitionOpts_new(); @@ -229,7 +229,7 @@ void balance(Input& in, apf::Mesh2* m) zoltanBalance(m,in,apf::RIB); else if(in.prePhastaBalanceMethod == "graph" ) zoltanBalance(m,in,apf::GRAPH); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX else if(in.prePhastaBalanceMethod == "simmetrix" ) simmetrixBalance(m); #endif diff --git a/phasta/phRestart.cc b/phasta/phRestart.cc index c5fec0650..4129aad31 100644 --- a/phasta/phRestart.cc +++ b/phasta/phRestart.cc @@ -11,7 +11,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #endif @@ -41,7 +41,7 @@ apf::Field* extractField(apf::Mesh* m, numOfComp= 3; else PCU_ALWAYS_ASSERT(valueType == apf::SCALAR || valueType == apf::VECTOR); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX if (simField) { rf = apf::createSIMFieldOn(m, requestFieldname, valueType); } else diff --git a/phasta/threshold.cc b/phasta/threshold.cc index adc0ae740..350b85c8d 100644 --- a/phasta/threshold.cc +++ b/phasta/threshold.cc @@ -4,7 +4,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #endif @@ -21,7 +21,7 @@ int main(int argc, char** argv) pcu::Init(&argc, &argv); { pcu::PCU pcu_obj; -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX Sim_readLicenseFile(0); gmi_sim_start(); gmi_register_sim(); @@ -54,7 +54,7 @@ int main(int argc, char** argv) lion_oprint(1,"volume %f\n", total_volume); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); #endif diff --git a/python_wrappers/CMakeLists.txt b/python_wrappers/CMakeLists.txt index e007ec0e9..ad3d6571d 100644 --- a/python_wrappers/CMakeLists.txt +++ b/python_wrappers/CMakeLists.txt @@ -14,7 +14,7 @@ include(${SWIG_USE_FILE}) set(UseSWIG_TARGET_NAME_PREFERENCE STANDARD) # build simhelper if using Simmetrix -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) set(SOURCES sim_helper.cc) set(HEADERS sim_helper.h) add_library(simhelper SHARED ${SOURCES}) @@ -31,9 +31,9 @@ endif() set(PY_SOURCES apf.i) set_source_files_properties(${PY_SOURCES} PROPERTIES CPLUSPLUS ON) swig_add_library(pyCore LANGUAGE python SOURCES ${PY_SOURCES}) -# let swig know about the HAVE_SIMMETRIX -if(ENABLE_SIMMETRIX) - set_property(TARGET pyCore PROPERTY SWIG_COMPILE_DEFINITIONS HAVE_SIMMETRIX) +# let swig know about the PUMI_HAS_SIMMETRIX +if(PUMI_ENABLE_SIMMETRIX) + set_property(TARGET pyCore PROPERTY SWIG_COMPILE_DEFINITIONS PUMI_HAS_SIMMETRIX) endif() set_property(TARGET pyCore PROPERTY SWIG_INCLUDE_DIRECTORIES @@ -50,7 +50,7 @@ set(pyCoreDepLibs Python::Python core) -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) target_link_libraries(pyCore PUBLIC ${pyCoreDepLibs} simhelper) else() target_link_libraries(pyCore PUBLIC ${pyCoreDepLibs}) diff --git a/python_wrappers/apf.i b/python_wrappers/apf.i index c6a500402..9b8a42fef 100644 --- a/python_wrappers/apf.i +++ b/python_wrappers/apf.i @@ -10,7 +10,7 @@ #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #endif @@ -31,7 +31,7 @@ #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #endif %} @@ -82,7 +82,7 @@ void PCU_ALWAYS_ASSERT(int cond); void PCU_ALWAYS_ASSERT_VERBOSE(int cond, const char* msg); /* These are helper functions used to inintialize/finalize SimModSuite */ -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX void start_sim(const char* logfile = 0); void stop_sim(); bool is_sim_started(); @@ -92,7 +92,7 @@ void PCU_ALWAYS_ASSERT_VERBOSE(int cond, const char* msg); void gmi_register_mesh(void); void gmi_register_null(void); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX void gmi_register_sim(void); void gmi_sim_start(void); void gmi_sim_stop(void); diff --git a/stk/CMakeLists.txt b/stk/CMakeLists.txt index d4607b971..e615b6e4b 100644 --- a/stk/CMakeLists.txt +++ b/stk/CMakeLists.txt @@ -4,21 +4,29 @@ if(DEFINED TRIBITS_PACKAGE) endif() # Package options -option(ENABLE_STK "Enable the stk interface [ON|OFF]" OFF) -option(ENABLE_STK_MESH "Enable the stk mesh interface [ON|OFF]" OFF) -message(STATUS "ENABLE_STK: " ${ENABLE_STK}) -message(STATUS "ENABLE_STK_MESH: " ${ENABLE_STK_MESH}) +option( + PUMI_ENABLE_STK + "Enable the stk interface [ON|OFF]" + ${ENABLE_STK} +) +option( + PUMI_ENABLE_STK_MESH + "Enable the stk mesh interface [ON|OFF]" + ${ENABLE_STK_MESH} +) +message(STATUS "PUMI_ENABLE_STK: " ${PUMI_ENABLE_STK}) +message(STATUS "PUMI_ENABLE_STK_MESH: " ${PUMI_ENABLE_STK_MESH}) # Only install the package if enabled -if(NOT ENABLE_STK) +if(NOT PUMI_ENABLE_STK) return() endif() # Find the shards Trilinos package -set(SCOREC_USE_Shards_DEFAULT ${ENABLE_STK}) -set(SCOREC_USE_STKIO_DEFAULT ${ENABLE_STK_MESH}) -set(SCOREC_USE_STKMesh_DEFAULT ${ENABLE_STK_MESH}) -set(SCOREC_USE_SEACASIoss_DEFAULT ${ENABLE_STK_MESH}) +set(SCOREC_USE_Shards_DEFAULT ${PUMI_ENABLE_STK}) +set(SCOREC_USE_STKIO_DEFAULT ${PUMI_ENABLE_STK_MESH}) +set(SCOREC_USE_STKMesh_DEFAULT ${PUMI_ENABLE_STK_MESH}) +set(SCOREC_USE_SEACASIoss_DEFAULT ${PUMI_ENABLE_STK_MESH}) set(Shards_PREFIX_DEFAULT "${Trilinos_PREFIX}") set(STKIO_PREFIX_DEFAULT "${Trilinos_PREFIX}") set(STKMesh_PREFIX_DEFAULT "${Trilinos_PREFIX}") @@ -47,7 +55,7 @@ set(HEADERS apfAlbany.h ) -if(ENABLE_STK_MESH) +if(PUMI_ENABLE_STK_MESH) set(HEADERS ${HEADERS} apfSTK.h) set(SOURCES ${SOURCES} apfExodusOutput.cc) endif() @@ -71,7 +79,7 @@ target_include_directories(apf_stk PRIVATE ) # Do some extra work if has stk is on -if(ENABLE_STK_MESH) +if(PUMI_ENABLE_STK_MESH) target_link_libraries(apf_stk PUBLIC stk_io stk_io_util diff --git a/stk/apfExodusOutput.cc b/stk/apfExodusOutput.cc index 637d8ff0a..1f0fe26cd 100644 --- a/stk/apfExodusOutput.cc +++ b/stk/apfExodusOutput.cc @@ -6,7 +6,7 @@ */ #include -#if !HAS_STK +#if !PUMI_HAS_STK #error "configuration bug" #endif #include "apfSTK.h" diff --git a/stk/apfMeshSTK.cc b/stk/apfMeshSTK.cc index b97efefda..71110e0a2 100644 --- a/stk/apfMeshSTK.cc +++ b/stk/apfMeshSTK.cc @@ -11,7 +11,7 @@ #include #include -#if HAS_STK +#if PUMI_HAS_STK #include "apfSTK.h" #include #include @@ -69,7 +69,7 @@ int getLocalSideId(Mesh* m, MeshEntity* e, We use the face->vertex ordering of our mesh database, which is consistent. */ -#if HAS_STK +#if PUMI_HAS_STK static void special_declare_element_side( GlobalNumbering* nn, StkBulkData* bulk, diff --git a/stk/apfSTK.cc b/stk/apfSTK.cc index b89479cc7..fbb9e8d61 100644 --- a/stk/apfSTK.cc +++ b/stk/apfSTK.cc @@ -15,7 +15,7 @@ #include #include -#if HAS_STK +#if PUMI_HAS_STK #include "apfSTK.h" #include #include @@ -71,7 +71,7 @@ void collectEntityModels( gmi_free_set(s); } -#if HAS_STK +#if PUMI_HAS_STK /** * \brief Implement an shards::ArrayDimTag for Quadrature points * @@ -107,7 +107,7 @@ typedef stk::mesh::Field StkQPScalarField; typedef std::map GlobalMap; -#if HAS_STK +#if PUMI_HAS_STK template T* makeStkField( const char* name, diff --git a/stk/apf_stkConfig.h.in b/stk/apf_stkConfig.h.in index 3b1d1c016..76947d681 100644 --- a/stk/apf_stkConfig.h.in +++ b/stk/apf_stkConfig.h.in @@ -1,3 +1,3 @@ #define ON 1 #define OFF 0 -#define HAS_STK @ENABLE_STK_MESH@ +#define PUMI_HAS_STK @PUMI_ENABLE_STK_MESH@ diff --git a/stk/pkg_tribits.cmake b/stk/pkg_tribits.cmake index 114b287be..a3394f9c9 100644 --- a/stk/pkg_tribits.cmake +++ b/stk/pkg_tribits.cmake @@ -1,11 +1,11 @@ tribits_package(SCORECapf_stk) # determine if configured with stk -SET(ENABLE_STK_MESH OFF) +SET(PUMI_ENABLE_STK_MESH OFF) if(SCORECapf_stk_ENABLE_STKIO AND SCORECapf_stk_ENABLE_STKMesh AND SCORECapf_stk_ENABLE_SEACASIoss) - SET(ENABLE_STK_MESH ON) + SET(PUMI_ENABLE_STK_MESH ON) endif() include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -21,7 +21,7 @@ set(SOURCES apfSTK.cc) set(HEADERS apfAlbany.h) -if(ENABLE_STK_MESH) +if(PUMI_ENABLE_STK_MESH) set(HEADERS ${HEADERS} apfSTK.h) set(SOURCES ${SOURCES} apfExodusOutput.cc) endif() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f6d2ec6aa..f094d6b7d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -24,7 +24,7 @@ test_exe_func(verify_2nd_order_shapes verify_2nd_order_shapes.cc) test_exe_func(verify_convert verify_convert.cc) # Geometric model utilities -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) util_exe_func(mdlConvert mdlConvert.cc) endif() util_exe_func(mkmodel mkmodel.cc) @@ -42,7 +42,7 @@ util_exe_func(extrude extrude.cc) # Mesh conversion/formatting utilities util_exe_func(from_gmsh gmsh.cc) -if(ENABLE_CGNS) +if(PUMI_ENABLE_CGNS) util_exe_func(from_cgns cgns.cc) endif() util_exe_func(from_ansys ansys.cc) @@ -51,7 +51,7 @@ util_exe_func(from_ugrid ugrid.cc) util_exe_func(nektar_align nektar_align.cc) util_exe_func(icesheet icesheet.cc) util_exe_func(matchedNodeElmReader matchedNodeElmReader.cc) -if(ENABLE_OMEGA_H) +if(PUMI_ENABLE_OMEGA_H) util_exe_func(smb2osh smb2osh.cc) util_exe_func(osh2smb osh2smb.cc) endif() @@ -69,11 +69,11 @@ util_exe_func(measureAnisoStats measureAnisoStats.cc) util_exe_func(measureIsoStats measureIsoStats.cc) util_exe_func(visualizeAnisoSizes visualizeAnisoSizes.cc) test_exe_func(bezierShapeEval bezierShapeEval.cc) -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) util_exe_func(runSimxAnisoAdapt runSimxAnisoAdapt.cc) endif() -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) util_exe_func(convert convert.cc) util_exe_func(ph_convert ../phasta/ph_convert.cc) if(SIMMODSUITE_SimAdvMeshing_FOUND) @@ -88,7 +88,7 @@ endif() # Mesh partitioning utilities util_exe_func(split split.cc) util_exe_func(zsplit zsplit.cc) -if(ENABLE_METIS) +if(PUMI_ENABLE_METIS) util_exe_func(msplit msplit.cc) endif() util_exe_func(collapse collapse.cc) @@ -106,11 +106,11 @@ test_exe_func(loadPart loadPart.cc) test_exe_func(ugridptnstats ugridptnstats.cc) test_exe_func(gap gap.cc) test_exe_func(applyMatrixFunc applyMatrixFunc.cc) -if(ENABLE_ZOLTAN) +if(PUMI_ENABLE_ZOLTAN) util_exe_func(zbalance zbalance.cc) util_exe_func(ptnParma ptnParma.cc) endif() -if(ENABLE_METIS) +if(PUMI_ENABLE_METIS) util_exe_func(mbalance mbalance.cc) test_exe_func(mbalanceEmpty mbalanceEmpty.cc) endif() @@ -131,14 +131,10 @@ if(NOT APPLE) util_exe_func(chefStream ../phasta/chefStream.cc) util_exe_func(adaptLvlSetLoop ../phasta/adaptLvlSet_loop.cc) endif() -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) util_exe_func(cut_interface ../phasta/cut_interface.cc) util_exe_func(migrate_interface ../phasta/migrate_interface.cc) endif() -if(SIMMODSUITE_SimAdvMeshing_FOUND) - target_compile_definitions(chef PRIVATE -DHAVE_SIMADVMESHING) - target_compile_definitions(cut_interface PRIVATE -DHAVE_SIMADVMESHING) -endif() #PUMIPic print partition utility util_exe_func(print_pumipic_partition print_pumipic_partition.cc) @@ -199,11 +195,11 @@ test_exe_func(fieldReduce fieldReduce.cc) test_exe_func(test_integrator test_integrator.cc) test_exe_func(test_matrix_gradient test_matrix_grad.cc) -if(ENABLE_DSP) +if(PUMI_ENABLE_DSP) test_exe_func(graphdist graphdist.cc) test_exe_func(moving moving.cc) endif() -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) test_exe_func(curvetest curvetest.cc) test_exe_func(curve_to_bezier curve_to_bezier.cc) test_exe_func(make_all_cavities makeAllCavities.cc) @@ -248,7 +244,7 @@ if(IS_TESTING) include(testing.cmake) endif() -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) #executables which call only Simmetrix functions include_directories(${PROJECT_BINARY_DIR}/gmi_sim) util_exe_func(simTranslate simTranslate.cc) @@ -256,8 +252,6 @@ if(ENABLE_SIMMETRIX) util_exe_func(sim_part sim_part.cc) if(SIMMODSUITE_SimAdvMeshing_FOUND) util_exe_func(sim_countBL sim_countBL.cc) - target_compile_definitions(sim_part PRIVATE -DHAVE_SIMADVMESHING) - target_compile_definitions(sim_countBL PRIVATE -DHAVE_SIMADVMESHING) endif() util_exe_func(simSpjToSmd simSpjToSmd.cc) if(SIMMODSUITE_SimDiscrete_FOUND) diff --git a/test/capVol.cc b/test/capVol.cc index a6d0fc897..a7ccc0beb 100644 --- a/test/capVol.cc +++ b/test/capVol.cc @@ -241,7 +241,7 @@ apf::Splitter* makeSplitter(Args::Partitioner ptnr, apf::Mesh2* mesh) { default: #if defined(PUMI_HAS_ZOLTAN) return apf::makeZoltanSplitter( - adaptMesh, apf::GRAPH, apf::PARTITION + mesh, apf::GRAPH, apf::PARTITION ); #elif defined(PUMI_HAS_METIS) return apf::makeMETISsplitter(mesh); diff --git a/test/cgns.cc b/test/cgns.cc index 66ea7d439..c4db89051 100644 --- a/test/cgns.cc +++ b/test/cgns.cc @@ -477,7 +477,9 @@ std::string doit(apf::CGNSBCMap &cgnsBCMap, const std::string &argv1, const std: int main(int argc, char **argv) { -#ifdef HAVE_CGNS +#ifndef PUMI_HAS_CGNS + apf::fail("Build with PUMI_ENABLE_CGNS."); +#endif pcu::Init(&argc, &argv); { pcu::PCU PCUObj; @@ -548,10 +550,4 @@ int main(int argc, char **argv) } pcu::Finalize(); return 0; -#else - PCU_ALWAYS_ASSERT_VERBOSE(true == false, - "Build with ENABLE_CGNS to allow this functionality."); - exit(EXIT_FAILURE); - return -1; -#endif } diff --git a/test/collapse.cc b/test/collapse.cc index 818acb4f0..0d9aa8bb4 100644 --- a/test/collapse.cc +++ b/test/collapse.cc @@ -3,7 +3,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #endif @@ -49,7 +49,7 @@ int main(int argc, char** argv) { pcu::PCU pcu_obj; lion_set_verbosity(1); pcu::Protect(); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX Sim_readLicenseFile(0); gmi_sim_start(); gmi_register_sim(); @@ -62,7 +62,7 @@ int main(int argc, char** argv) { Parma_ShrinkPartition(code.mesh, partitionFactor, code); code.mesh->destroyNative(); apf::destroyMesh(code.mesh); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); #endif diff --git a/test/crack_test.cc b/test/crack_test.cc index f5b2c857f..575ba8870 100644 --- a/test/crack_test.cc +++ b/test/crack_test.cc @@ -1,5 +1,5 @@ #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -58,7 +58,7 @@ int main(int argc, char** argv) const char* modelFile = argv[1]; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -352,7 +352,7 @@ int main(int argc, char** argv) bCurver(modelFile, "crack_linear.smb", &PCUObj, i, output); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/degenerateSurfs.cc b/test/degenerateSurfs.cc index c36a59995..724da9b23 100644 --- a/test/degenerateSurfs.cc +++ b/test/degenerateSurfs.cc @@ -4,7 +4,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -39,7 +39,7 @@ int main(int argc, char** argv) { pcu::PCU PCUObj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -65,7 +65,7 @@ int main(int argc, char** argv) crv::writeCurvedWireFrame(m, order + 3, outFile); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/describe.cc b/test/describe.cc index e28e6da8f..17ad83949 100644 --- a/test/describe.cc +++ b/test/describe.cc @@ -4,7 +4,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -48,7 +48,7 @@ int main(int argc, char** argv) { pcu::PCU pcu_obj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -64,7 +64,7 @@ int main(int argc, char** argv) list_tags(m); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/dg_ma_test.cc b/test/dg_ma_test.cc index a33bd5b4d..1131350b5 100644 --- a/test/dg_ma_test.cc +++ b/test/dg_ma_test.cc @@ -4,7 +4,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -43,7 +43,7 @@ int main(int argc, char** argv) { pcu::PCU PCUObj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -70,7 +70,7 @@ int main(int argc, char** argv) apf::writeVtkFiles("after",m); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/elmBalance.cc b/test/elmBalance.cc index 157ecf396..4147e514c 100644 --- a/test/elmBalance.cc +++ b/test/elmBalance.cc @@ -4,7 +4,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -37,7 +37,7 @@ int main(int argc, char** argv) pcu::Finalize(); exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -61,7 +61,7 @@ int main(int argc, char** argv) m->writeNative(argv[3]); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/fieldReduce.cc b/test/fieldReduce.cc index 29ee782f5..feecf8b1c 100644 --- a/test/fieldReduce.cc +++ b/test/fieldReduce.cc @@ -5,7 +5,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -171,7 +171,7 @@ int main(int argc, char** argv) lion_set_verbosity(1); myrank = PCUObj.Self(); commsize = PCUObj.Peers(); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -190,7 +190,7 @@ int main(int argc, char** argv) failflag = failflag || testReduce(m, i); freeMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/fixlayer.cc b/test/fixlayer.cc index c0db6f462..713e6642d 100644 --- a/test/fixlayer.cc +++ b/test/fixlayer.cc @@ -3,7 +3,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -18,7 +18,7 @@ int main(int argc, char** argv) { pcu::PCU pcu_obj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -33,7 +33,7 @@ int main(int argc, char** argv) m->writeNative(argv[3]); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/fixshape.cc b/test/fixshape.cc index 830d316e4..f51c3c250 100644 --- a/test/fixshape.cc +++ b/test/fixshape.cc @@ -3,7 +3,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -18,7 +18,7 @@ int main(int argc, char** argv) { pcu::PCU pcu_obj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -33,7 +33,7 @@ int main(int argc, char** argv) m->writeNative(argv[3]); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/gap.cc b/test/gap.cc index 699cb92b0..1b80d8bdc 100644 --- a/test/gap.cc +++ b/test/gap.cc @@ -4,7 +4,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -38,7 +38,7 @@ int main(int argc, char** argv) pcu::Finalize(); exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -62,7 +62,7 @@ int main(int argc, char** argv) // destroy mds m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/highOrderSizeFields.cc b/test/highOrderSizeFields.cc index e299c0c56..7fadaf034 100644 --- a/test/highOrderSizeFields.cc +++ b/test/highOrderSizeFields.cc @@ -7,7 +7,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -40,7 +40,7 @@ int main(int argc, char** argv) pcu::PCU PCUObj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -63,7 +63,7 @@ int main(int argc, char** argv) } } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/highOrderSolutionTransfer.cc b/test/highOrderSolutionTransfer.cc index 638f426e3..f1ec30f4b 100644 --- a/test/highOrderSolutionTransfer.cc +++ b/test/highOrderSolutionTransfer.cc @@ -7,7 +7,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -45,7 +45,7 @@ int main(int argc, char** argv) { pcu::PCU PCUObj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -85,7 +85,7 @@ int main(int argc, char** argv) 6 /*field_order*/); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); MS_exit(); diff --git a/test/inClosureOf_test.cc b/test/inClosureOf_test.cc index 958a22541..d572b542f 100644 --- a/test/inClosureOf_test.cc +++ b/test/inClosureOf_test.cc @@ -4,7 +4,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -22,7 +22,7 @@ int main(int argc, char** argv) { pcu::PCU PCUObj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -88,7 +88,7 @@ int main(int argc, char** argv) gmi_destroy(model); // deleting the model } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/ma_test.cc b/test/ma_test.cc index 8a98f271d..9e1401f34 100644 --- a/test/ma_test.cc +++ b/test/ma_test.cc @@ -4,7 +4,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -47,7 +47,7 @@ int main(int argc, char** argv) { pcu::PCU PCUObj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -74,7 +74,7 @@ int main(int argc, char** argv) apf::writeVtkFiles("after",m); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/makeAllCavities.cc b/test/makeAllCavities.cc index ed82c9a58..bdf40a5f4 100644 --- a/test/makeAllCavities.cc +++ b/test/makeAllCavities.cc @@ -12,7 +12,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -91,7 +91,7 @@ int main(int argc, char** argv) exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -246,7 +246,7 @@ int main(int argc, char** argv) m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/measureAnisoStats.cc b/test/measureAnisoStats.cc index 198a8c916..05ba3f596 100644 --- a/test/measureAnisoStats.cc +++ b/test/measureAnisoStats.cc @@ -7,13 +7,14 @@ #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include +#include #include #include #include -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING #include #endif #endif @@ -56,11 +57,11 @@ int main(int argc, char** argv) exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX SimModel_start(); Sim_readLicenseFile(0); SimPartitionedMesh_start(0, 0); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_start(); #endif gmi_sim_start(); @@ -79,9 +80,9 @@ int main(int argc, char** argv) getStats(".null", meshFile, sizeName, frameName, inPrefix, &PCUObj); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_stop(); #endif SimPartitionedMesh_stop(); @@ -128,7 +129,7 @@ void getStats( { apf::Mesh2* m; -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX /* if it is a simmetrix mesh */ if (ph::mesh_has_ext(meshFile, "sms")) { pParMesh sim_mesh = PM_load(meshFile, NULL, NULL); @@ -143,7 +144,7 @@ void getStats( apf::Field* sizes; apf::Field* frames; -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX /* if it is a simmetrix mesh */ if (ph::mesh_has_ext(meshFile, "sms")) { if(m->findField("sizes")) apf::destroyField(m->findField("sizes")); @@ -244,7 +245,7 @@ void getStats( apf::writeVtkFiles(ssm.str().c_str(), m); // measure the triangular mesh face in the BL mesh -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING if (ph::mesh_has_ext(meshFile, "sms")) { // get simmetrix mesh apf::MeshSIM* apf_msim = dynamic_cast(m); diff --git a/test/measureIsoStats.cc b/test/measureIsoStats.cc index cef3d410f..55cf3076a 100644 --- a/test/measureIsoStats.cc +++ b/test/measureIsoStats.cc @@ -7,13 +7,14 @@ #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include +#include #include #include #include -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING #include #endif #endif @@ -57,11 +58,11 @@ int main(int argc, char** argv) exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX SimModel_start(); Sim_readLicenseFile(0); SimPartitionedMesh_start(0, 0); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_start(); #endif gmi_sim_start(); @@ -79,9 +80,9 @@ int main(int argc, char** argv) getStats(".null", meshFile, sizeName, inPrefix, &PCUObj); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_stop(); #endif SimPartitionedMesh_stop(); @@ -128,7 +129,7 @@ void getStats( { apf::Mesh2* m; -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX /* if it is a simmetrix mesh */ if (ph::mesh_has_ext(meshFile, "sms")) { pParMesh sim_mesh = PM_load(meshFile, NULL, NULL); @@ -142,7 +143,7 @@ void getStats( m->verify(); apf::Field* sizes; -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX /* if it is a simmetrix mesh */ if (ph::mesh_has_ext(meshFile, "sms")) { if(m->findField("sizes")) apf::destroyField(m->findField("sizes")); @@ -236,7 +237,7 @@ void getStats( apf::writeVtkFiles(ssm.str().c_str(), m); // measure the triangular mesh face in the BL mesh -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING if (ph::mesh_has_ext(meshFile, "sms")) { // get simmetrix mesh apf::MeshSIM* apf_msim = dynamic_cast(m); diff --git a/test/modelInfo.cc b/test/modelInfo.cc index bced288e7..1ab4b3f4e 100644 --- a/test/modelInfo.cc +++ b/test/modelInfo.cc @@ -2,7 +2,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -23,7 +23,7 @@ int main(int argc, char** argv) pcu::Finalize(); exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -70,7 +70,7 @@ int main(int argc, char** argv) } gmi_destroy(g); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/msplit.cc b/test/msplit.cc index fe61d7b54..657eb06d5 100644 --- a/test/msplit.cc +++ b/test/msplit.cc @@ -4,7 +4,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -63,7 +63,7 @@ int main(int argc, char* argv[]) { { pcu::PCU PCUObj; Args args = getConfig(argc, argv, PCUObj); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -87,7 +87,7 @@ int main(int argc, char* argv[]) { m->writeNative(args.outFile); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); MS_exit(); Sim_unregisterAllKeys(); diff --git a/test/nektar_align.cc b/test/nektar_align.cc index 9fb33e587..613d48506 100644 --- a/test/nektar_align.cc +++ b/test/nektar_align.cc @@ -6,7 +6,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -112,7 +112,7 @@ int main(int argc, char** argv) { pcu::PCU pcu_obj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -125,7 +125,7 @@ int main(int argc, char** argv) m->writeNative(argv[3]); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/ph_adapt.cc b/test/ph_adapt.cc index 640a202bf..f647b9b17 100644 --- a/test/ph_adapt.cc +++ b/test/ph_adapt.cc @@ -11,7 +11,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -50,7 +50,7 @@ int main(int argc, char** argv) { pcu::PCU PCUObj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -95,7 +95,7 @@ int main(int argc, char** argv) chef::preprocess(m,in); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/print_pumipic_partition.cc b/test/print_pumipic_partition.cc index f68d0d6f4..d0d8b8c51 100644 --- a/test/print_pumipic_partition.cc +++ b/test/print_pumipic_partition.cc @@ -5,7 +5,7 @@ #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -34,7 +34,7 @@ int main(int argc, char** argv) pcu::Finalize(); exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -74,7 +74,7 @@ int main(int argc, char** argv) m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/ptnParma.cc b/test/ptnParma.cc index 689e25b2c..1715212e4 100644 --- a/test/ptnParma.cc +++ b/test/ptnParma.cc @@ -7,7 +7,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -168,7 +168,7 @@ int main(int argc, char** argv) lion_set_verbosity(1); if( !PCUObj.Self() ) lion_oprint(1, "PUMI version %s Git hash %s\n", pumi_version(), pumi_git_sha()); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -182,7 +182,7 @@ int main(int argc, char** argv) mymain(false, &PCUObj); else mymain(true, &PCUObj); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/refine2x.cc b/test/refine2x.cc index 1de67e672..831fc0ec2 100644 --- a/test/refine2x.cc +++ b/test/refine2x.cc @@ -5,7 +5,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -93,7 +93,7 @@ int main(int argc, char** argv) << " \n"; return EXIT_FAILURE; } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -123,7 +123,7 @@ int main(int argc, char** argv) m->writeNative(argv[4]); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/render.cc b/test/render.cc index 91b92bedb..a21205586 100644 --- a/test/render.cc +++ b/test/render.cc @@ -5,7 +5,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -26,7 +26,7 @@ int main(int argc, char** argv) pcu::Finalize(); exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -53,7 +53,7 @@ int main(int argc, char** argv) apf::writeVtkFiles(argv[3], m); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/renderClass.cc b/test/renderClass.cc index 043ae61e8..feeb44634 100644 --- a/test/renderClass.cc +++ b/test/renderClass.cc @@ -5,7 +5,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -44,7 +44,7 @@ int main(int argc, char** argv) pcu::Finalize(); exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -69,7 +69,7 @@ int main(int argc, char** argv) apf::writeVtkFiles(vtkpath, m, dim); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/render_ascii.cc b/test/render_ascii.cc index b6cc32300..d549a77d0 100644 --- a/test/render_ascii.cc +++ b/test/render_ascii.cc @@ -3,7 +3,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -23,7 +23,7 @@ int main(int argc, char** argv) pcu::Finalize(); exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -35,7 +35,7 @@ int main(int argc, char** argv) apf::writeASCIIVtkFiles(argv[3], m); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/reorder.cc b/test/reorder.cc index 4e8878989..cab3ae5c7 100644 --- a/test/reorder.cc +++ b/test/reorder.cc @@ -5,7 +5,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -24,7 +24,7 @@ int main(int argc, char** argv) { pcu::Finalize(); exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -39,7 +39,7 @@ int main(int argc, char** argv) { m->writeNative(argv[3]); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/residualErrorEstimation_test.cc b/test/residualErrorEstimation_test.cc index effb87900..29ae96f8b 100644 --- a/test/residualErrorEstimation_test.cc +++ b/test/residualErrorEstimation_test.cc @@ -5,7 +5,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -29,7 +29,7 @@ int main(int argc, char** argv) { pcu::PCU PCUObj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -90,7 +90,7 @@ int main(int argc, char** argv) m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/serialize.cc b/test/serialize.cc index 080559509..a603eb4b1 100644 --- a/test/serialize.cc +++ b/test/serialize.cc @@ -4,7 +4,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -35,7 +35,7 @@ int main( int argc, char* argv[]) pcu::Finalize(); exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -52,7 +52,7 @@ int main( int argc, char* argv[]) Parma_ShrinkPartition(code.mesh, atoi(argv[4]), code); code.mesh->destroyNative(); apf::destroyMesh(code.mesh); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/simDiscrete.cc b/test/simDiscrete.cc index 9ec95e4c7..0b7f1e4e2 100644 --- a/test/simDiscrete.cc +++ b/test/simDiscrete.cc @@ -1,4 +1,4 @@ -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include "MeshSim.h" #include "SimDiscrete.h" #include "SimMessages.h" diff --git a/test/sim_part.cc b/test/sim_part.cc index 6981476a1..31718f7b3 100644 --- a/test/sim_part.cc +++ b/test/sim_part.cc @@ -25,8 +25,9 @@ #include #include "gmi_sim_config.h" #include +#include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include "SimPartitionedMesh.h" #include "SimModel.h" #include "SimUtil.h" @@ -34,7 +35,7 @@ #ifdef SIM_PARASOLID #include "SimParasolidKrnl.h" #endif -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING #include #endif #endif @@ -75,7 +76,7 @@ int main(int argc, char **argv) // Also initializes MPI in parallel SimPartitionedMesh_start(&argc, &argv); SimDiscrete_start(0); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_start(); #endif #ifdef SIM_PARASOLID @@ -167,7 +168,7 @@ int main(int argc, char **argv) SimParasolid_stop(1); #endif Sim_unregisterAllKeys(); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_stop(); #endif SimDiscrete_stop(0); diff --git a/test/smokeTesting.cmake b/test/smokeTesting.cmake index 4eb8e51df..e171f913f 100644 --- a/test/smokeTesting.cmake +++ b/test/smokeTesting.cmake @@ -1,6 +1,6 @@ function(smoke_test TESTNAME PROCS EXE) set(tname smoke_test_${TESTNAME}) - if(SCOREC_NO_MPI) + if(PUMI_NO_MPI) if(PROCS EQUAL "1") add_test(NAME ${tname} COMMAND ${VALGRIND} ${VALGRIND_ARGS} ${EXE} ${ARGN}) diff --git a/test/split.cc b/test/split.cc index 6fd4d430b..e9a27d869 100644 --- a/test/split.cc +++ b/test/split.cc @@ -4,7 +4,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -60,7 +60,7 @@ int main(int argc, char** argv) { pcu::PCU PCUObj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -88,7 +88,7 @@ int main(int argc, char** argv) Parma_PrintPtnStats(m, ""); m->writeNative(outFile); freeMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/testing.cmake b/test/testing.cmake index 507420cbe..67e2f3641 100644 --- a/test/testing.cmake +++ b/test/testing.cmake @@ -2,7 +2,7 @@ set(MESHES "" CACHE STRING "Extracted http://scorec.rpi.edu/pumi/pumi_test_meshes.tar.gz") function(mpi_test TESTNAME PROCS EXE) - if(SCOREC_NO_MPI) + if(PUMI_NO_MPI) if(${PROCS} EQUAL "1") add_test( NAME ${TESTNAME} @@ -25,7 +25,7 @@ function(set_test_depends) if (NOT DEFINED SET_TEST_DEPENDS_TESTS OR NOT DEFINED SET_TEST_DEPENDS_DEPENDS) return() endif() - if(SCOREC_NO_MPI) + if(PUMI_NO_MPI) # Check for test existence as it may be a multiproc test. if(TEST "${TESTNAME}") set_tests_properties(${SET_TEST_DEPENDS_TESTS} PROPERTIES @@ -48,7 +48,7 @@ mpi_test(bezierSubdivision 1 ./bezierSubdivision) mpi_test(bezierValidity 1 ./bezierValidity) mpi_test(ma_analytic 1 ./ma_test_analytic_model) -if(ENABLE_ZOLTAN) +if(PUMI_ENABLE_ZOLTAN) mpi_test(print_pumipic_partion 1 ./print_pumipic_partition ${MESHES}/cube/cube.dmg @@ -80,7 +80,7 @@ mpi_test(test_matrix_gradient 1 mpi_test(modelInfo_dmg 1 ./modelInfo "${MESHES}/cube/cube.dmg") -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) mpi_test(in_closure_of 1 ./inClosureOf_test "${MESHES}/cube/cube.smd") @@ -91,9 +91,9 @@ if(ENABLE_SIMMETRIX) ./highOrderSizeFields "${MESHES}/cube/cube.smd" "${MESHES}/cube/pumi11/cube.smb") -endif(ENABLE_SIMMETRIX) +endif(PUMI_ENABLE_SIMMETRIX) -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) set(GXT smd) else() set(GXT dmg) @@ -101,7 +101,7 @@ endif() set(MDIR ${MESHES}/phasta/dg) -if(ENABLE_SIMMETRIX AND SIM_PARASOLID AND SIMMODSUITE_SimAdvMeshing_FOUND) +if(PUMI_ENABLE_SIMMETRIX AND SIM_PARASOLID AND SIMMODSUITE_SimAdvMeshing_FOUND) set(MDIR ${MESHES}/phasta/BL_query) mpi_test(chef-BL_query 4 ${CMAKE_CURRENT_BINARY_DIR}/chef WORKING_DIRECTORY ${MDIR}/run_case) @@ -127,7 +127,7 @@ if(ENABLE_SIMMETRIX AND SIM_PARASOLID AND SIMMODSUITE_SimAdvMeshing_FOUND) ) endif() -if(ENABLE_SIMMETRIX AND SIM_PARASOLID AND SIMMODSUITE_SimAdvMeshing_FOUND) +if(PUMI_ENABLE_SIMMETRIX AND SIM_PARASOLID AND SIMMODSUITE_SimAdvMeshing_FOUND) if(SIM_DOT_VERSION VERSION_GREATER 12.0.171000) set(MDIR ${MESHES}/faceExtrusion) mpi_test(rm_extrusion 1 @@ -174,11 +174,11 @@ if(ENABLE_SIMMETRIX AND SIM_PARASOLID AND SIMMODSUITE_SimAdvMeshing_FOUND) set_test_depends(TESTS countBL_part_mesh DEPENDS partition_sim) endif() endif() -endif(ENABLE_SIMMETRIX AND SIM_PARASOLID AND SIMMODSUITE_SimAdvMeshing_FOUND) +endif(PUMI_ENABLE_SIMMETRIX AND SIM_PARASOLID AND SIMMODSUITE_SimAdvMeshing_FOUND) set(MDIR ${MESHES}/phasta/loopDriver) -if(ENABLE_ZOLTAN AND ENABLE_SIMMETRIX AND PCU_COMPRESS AND SIM_PARASOLID - AND SIMMODSUITE_SimAdvMeshing_FOUND) +if(PUMI_ENABLE_ZOLTAN AND PUMI_ENABLE_SIMMETRIX AND PCU_COMPRESS + AND SIM_PARASOLID AND SIMMODSUITE_SimAdvMeshing_FOUND) mpi_test(ph_adapt 1 ${CMAKE_CURRENT_BINARY_DIR}/ph_adapt "${MDIR}/model.smd" @@ -187,14 +187,14 @@ if(ENABLE_ZOLTAN AND ENABLE_SIMMETRIX AND PCU_COMPRESS AND SIM_PARASOLID endif() -if(ENABLE_ZOLTAN) +if(PUMI_ENABLE_ZOLTAN) mpi_test(pumi3d-1p 4 ./test_pumi ${MESHES}/pumi/3d-1p/model.dmg ${MESHES}/pumi/3d-1p/part.smb out.smb 1 0) endif() -if(ENABLE_OMEGA_H) +if(PUMI_ENABLE_OMEGA_H) mpi_test(mdsToOmega 1 ./smb2osh ${MESHES}/cube/cube.dmg @@ -306,7 +306,7 @@ mpi_test(inviscid_ghost 4 set_test_depends(TESTS inviscid_ghost DEPENDS inviscid_ugrid) set(MDIR ${SMOKE_TEST_MESHES}/pipe) -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) mpi_test(convert 1 ./convert "${MDIR}/pipe.smd" @@ -319,10 +319,10 @@ mpi_test(verify_serial 1 ./verify "${MDIR}/pipe.${GXT}" "pipe.smb") -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) set_test_depends(TESTS verify_serial DEPENDS convert) endif() -if(ENABLE_SIMMETRIX AND SIM_PARASOLID) +if(PUMI_ENABLE_SIMMETRIX AND SIM_PARASOLID) mpi_test(convert_2d_quads 1 ./convert "${MESHES}/disk/disk.smd" @@ -337,7 +337,7 @@ endif() mpi_test(verify_2nd_order_shape_quads 1 ./verify_2nd_order_shapes "disk_quad_mesh.smb") -if(ENABLE_SIMMETRIX AND SIM_PARASOLID) +if(PUMI_ENABLE_SIMMETRIX AND SIM_PARASOLID) set_test_depends(TESTS verify_2nd_order_shape_quads DEPENDS convert_2d_quads) else() file(COPY "${MESHES}/disk/disk_quad_mesh0.smb" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) @@ -345,7 +345,7 @@ endif() mpi_test(verify_2nd_order_shape_tris 1 ./verify_2nd_order_shapes "disk_tri_mesh.smb") -if(ENABLE_SIMMETRIX AND SIM_PARASOLID) +if(PUMI_ENABLE_SIMMETRIX AND SIM_PARASOLID) set_test_depends(TESTS verify_2nd_order_shape_tris DEPENDS convert_2d_tris) else() file(COPY "${MESHES}/disk/disk_tri_mesh0.smb" DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) @@ -356,7 +356,7 @@ mpi_test(uniform_serial 1 "pipe.smb" "pipe_unif.smb") mpi_test(classifyThenAdapt 1 ./classifyThenAdapt) -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) mpi_test(snap_serial 1 ./snap "${MDIR}/pipe.${GXT}" @@ -364,7 +364,7 @@ if(ENABLE_SIMMETRIX) "pipe.smb") set_test_depends(TESTS snap_serial DEPENDS uniform_serial) endif() -if(ENABLE_ZOLTAN) +if(PUMI_ENABLE_ZOLTAN) mpi_test(ma_serial 1 ./ma_test "${MDIR}/pipe.${GXT}" @@ -396,7 +396,7 @@ mpi_test(tet_serial 1 "${MDIR}/pipe.${GXT}" "pipe.smb" "tet.smb") -if(ENABLE_SIMMETRIX AND SIM_PARASOLID) +if(PUMI_ENABLE_SIMMETRIX AND SIM_PARASOLID) mpi_test(test_residual_error_estimate 1 ./residualErrorEstimation_test "${MESHES}/electromagnetic/fichera_geomSim.smd" @@ -419,10 +419,10 @@ mpi_test(collapse_2 2 ${MESHFILE} pipe_p1_.smb 2) -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) set_test_depends(TESTS split_2 collapse_2 tet_serial DEPENDS convert) endif() -if(ENABLE_METIS) +if(PUMI_ENABLE_METIS) mpi_test(msplit_2 2 ./msplit "${MDIR}/pipe.${GXT}" "pipe.smb" @@ -447,14 +447,14 @@ if(ENABLE_METIS) "${MDIR}/pipe.dmg" "pipe.smb" 1 "pipe_mbe_.smb" ) - if(ENABLE_SIMMETRIX) + if(PUMI_ENABLE_SIMMETRIX) set_test_depends( TESTS msplit_2 msplit_3 msplit_6 mbalanceEmpty DEPENDS convert ) endif() endif() -if(ENABLE_ZOLTAN) +if(PUMI_ENABLE_ZOLTAN) mpi_test(refineX 2 ./refine2x "${MDIR}/pipe.${GXT}" @@ -491,7 +491,7 @@ mpi_test(vtxElmMixedBalance 4 ./vtxElmMixedBalance "${MDIR}/pipe.${GXT}" "pipe_4_.smb") -if(ENABLE_ZOLTAN) +if(PUMI_ENABLE_ZOLTAN) mpi_test(ma_parallel 4 ./ma_test "${MDIR}/pipe.${GXT}" @@ -530,14 +530,14 @@ mpi_test(gap 4 set_test_depends(TESTS gap DEPENDS balance) mpi_test(applyMatrixFunc 1 ./applyMatrixFunc) -if(ENABLE_ZOLTAN) +if(PUMI_ENABLE_ZOLTAN) mpi_test(zbalance 4 ./zbalance "${MDIR}/torus.dmg" "${MDIR}/4imb/torus.smb" "torusZbal4p/") endif() -if(ENABLE_METIS) +if(PUMI_ENABLE_METIS) mpi_test(mbalance 4 ./mbalance "${MDIR}/torus.dmg" @@ -594,7 +594,7 @@ mpi_test(parmaSerial 1 "${MESHES}/cube/cube.dmg" "${MESHES}/cube/pumi670/cube.smb" "cubeBal.smb/") -if(ENABLE_ZOLTAN AND ENABLE_SIMMETRIX AND SIM_PARASOLID) +if(PUMI_ENABLE_ZOLTAN AND PUMI_ENABLE_SIMMETRIX AND SIM_PARASOLID) set(MDIR ${MESHES}/annular) mpi_test(simZBalance_4 4 ./simZBalance @@ -602,7 +602,7 @@ if(ENABLE_ZOLTAN AND ENABLE_SIMMETRIX AND SIM_PARASOLID) "${MDIR}/annular_4_part.sms") endif() set(MDIR ${MESHES}/cube) -if(ENABLE_ZOLTAN) +if(PUMI_ENABLE_ZOLTAN) mpi_test(ptnParma_cube 4 ./ptnParma "${MDIR}/cube.dmg" @@ -612,7 +612,7 @@ if(ENABLE_ZOLTAN) ) endif() -if(ENABLE_CGNS AND ENABLE_ZOLTAN) +if(PUMI_ENABLE_CGNS AND PUMI_ENABLE_ZOLTAN) # # sort of an arbitrary choice set(numProcs 4) @@ -697,7 +697,7 @@ mpi_test(cgns_bcs_3 ${numProcs} bcs3.smb additional) -endif(ENABLE_CGNS AND ENABLE_ZOLTAN) +endif(PUMI_ENABLE_CGNS AND PUMI_ENABLE_ZOLTAN) mpi_test(construct 4 ./construct @@ -818,7 +818,7 @@ mpi_test(split_fusion 2 set_test_depends(TESTS split_fusion DEPENDS mktopomodel_fusion) # the part count mismatch is intentional, # this test runs on half its procs -if(ENABLE_ZOLTAN) +if(PUMI_ENABLE_ZOLTAN) mpi_test(adapt_fusion 4 ./fusion "fusion_2_.smb") @@ -830,7 +830,7 @@ mpi_test(change_dim 1 ./newdim) mpi_test(ma_insphere 1 ./ma_insphere) -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) set(MDIR ${MESHES}/upright) if(SIMMODSUITE_SimAdvMeshing_FOUND) mpi_test(parallel_meshgen 4 @@ -856,7 +856,7 @@ if(ENABLE_SIMMETRIX) "${MDIR}/upright.smd" "67k") endif() - if(ENABLE_ZOLTAN) + if(PUMI_ENABLE_ZOLTAN) # adapt_meshgen uses the output of parallel_meshgen mpi_test(adapt_meshgen 4 ./ma_test @@ -918,7 +918,7 @@ if(ENABLE_SIMMETRIX) endif(SIM_PARASOLID) endif() if (PCU_COMPRESS) - if(ENABLE_SIMMETRIX) + if(PUMI_ENABLE_SIMMETRIX) set(RUNDIR run_sim) else() set(RUNDIR run) @@ -931,7 +931,7 @@ if (PCU_COMPRESS) mpi_test(chef0 1 ${CMAKE_CURRENT_BINARY_DIR}/chef WORKING_DIRECTORY ${MDIR}) set(MDIR ${MESHES}/phasta/1-1-Chef-Tet-Part) - if(ENABLE_SIMMETRIX) + if(PUMI_ENABLE_SIMMETRIX) add_test(NAME chef1 COMMAND diff -r ${RUNDIR}/1-procs_case/ good_phasta/ WORKING_DIRECTORY ${MDIR}) @@ -940,7 +940,7 @@ if (PCU_COMPRESS) add_test(NAME chef2 COMMAND diff -r out_mesh/ good_mesh/ WORKING_DIRECTORY ${MDIR}) - if(ENABLE_ZOLTAN) + if(PUMI_ENABLE_ZOLTAN) mpi_test(chef3 2 ${CMAKE_CURRENT_BINARY_DIR}/chef WORKING_DIRECTORY ${MESHES}/phasta/2-1-Chef-Tet-Part/${RUNDIR}) mpi_test(chef4 4 ${CMAKE_CURRENT_BINARY_DIR}/chef @@ -951,7 +951,7 @@ if (PCU_COMPRESS) set(MDIR ${MESHES}/phasta/4-1-Chef-Tet-Part/4-4-Chef-Part-ts20) mpi_test(chef6 4 ${CMAKE_CURRENT_BINARY_DIR}/chef WORKING_DIRECTORY ${MDIR}/${RUNDIR}) - if(ENABLE_SIMMETRIX) + if(PUMI_ENABLE_SIMMETRIX) add_test(NAME chef7 COMMAND diff -r ${RUNDIR}/4-procs_case/ good_phasta/ WORKING_DIRECTORY ${MDIR}) @@ -961,14 +961,14 @@ if (PCU_COMPRESS) COMMAND diff -r out_mesh/ good_mesh/ WORKING_DIRECTORY ${MDIR}) set_test_depends(TESTS chef8 DEPENDS chef6) - if(ENABLE_ZOLTAN AND ENABLE_SIMMETRIX) + if(PUMI_ENABLE_ZOLTAN AND PUMI_ENABLE_SIMMETRIX) mpi_test(chef9 2 ${CMAKE_CURRENT_BINARY_DIR}/chef WORKING_DIRECTORY ${MESHES}/phasta/simModelAndAttributes) endif() mpi_test(chefReadUrPrep 4 ${CMAKE_CURRENT_BINARY_DIR}/chefReadUrPrep ../../../model.dmg bz2:../good_mesh/ adapt.ur.inp WORKING_DIRECTORY ${MESHES}/phasta/4-1-Chef-Tet-Part/4-4-Chef-Part-ts20/run) - if(ENABLE_ZOLTAN) + if(PUMI_ENABLE_ZOLTAN) mpi_test(chefReadRibUrPrep 4 ${CMAKE_CURRENT_BINARY_DIR}/chefReadUrPrep ../../../model.dmg bz2:../good_mesh/ adapt.prerib.inp WORKING_DIRECTORY ${MESHES}/phasta/4-1-Chef-Tet-Part/4-4-Chef-Part-ts20/run) diff --git a/test/tetrahedronize.cc b/test/tetrahedronize.cc index ddcf2a6f8..6203633fb 100644 --- a/test/tetrahedronize.cc +++ b/test/tetrahedronize.cc @@ -3,7 +3,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -18,7 +18,7 @@ int main(int argc, char** argv) { pcu::PCU PCUObj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -33,7 +33,7 @@ int main(int argc, char** argv) m->writeNative(argv[3]); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/uniform.cc b/test/uniform.cc index 9ca428f12..cda920813 100644 --- a/test/uniform.cc +++ b/test/uniform.cc @@ -3,7 +3,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -36,7 +36,7 @@ int main(int argc, char** argv) { pcu::PCU PCUObj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -56,7 +56,7 @@ int main(int argc, char** argv) m->writeNative(outFile); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/verify.cc b/test/verify.cc index 1e12067c2..da8f344e1 100644 --- a/test/verify.cc +++ b/test/verify.cc @@ -3,7 +3,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -18,7 +18,7 @@ int main(int argc, char** argv) { pcu::PCU pcu_obj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -30,7 +30,7 @@ int main(int argc, char** argv) m->verify(); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/verify_2nd_order_shapes.cc b/test/verify_2nd_order_shapes.cc index 4afde62e6..61dd544df 100644 --- a/test/verify_2nd_order_shapes.cc +++ b/test/verify_2nd_order_shapes.cc @@ -6,7 +6,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -26,7 +26,7 @@ int main(int argc, char** argv) { pcu::Finalize(); exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -104,7 +104,7 @@ int main(int argc, char** argv) { m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/visualizeAnisoSizes.cc b/test/visualizeAnisoSizes.cc index 6f7ae0be3..f39932d54 100644 --- a/test/visualizeAnisoSizes.cc +++ b/test/visualizeAnisoSizes.cc @@ -6,7 +6,7 @@ #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -57,7 +57,7 @@ int main(int argc, char** argv) exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX SimModel_start(); Sim_readLicenseFile(0); SimPartitionedMesh_start(0, 0); @@ -80,7 +80,7 @@ int main(int argc, char** argv) safe_mkdir(inPrefix); visualizeSizeField(".null", meshFile, sizeName, frameName, sampleSize, scale, inPrefix, &PCUObj); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); SimPartitionedMesh_stop(); SimModel_stop(); @@ -136,7 +136,7 @@ void visualizeSizeField( pcu::PCU *PCUObj) { apf::Mesh2* m; -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX /* if it is a simmetrix mesh */ if (ph::mesh_has_ext(meshFile, "sms")) { pParMesh sim_mesh = PM_load(meshFile, NULL, NULL); @@ -151,7 +151,7 @@ void visualizeSizeField( apf::Field* sizes; apf::Field* frames; -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX /* if it is a simmetrix mesh */ if (ph::mesh_has_ext(meshFile, "sms")) { if(m->findField("sizes")) apf::destroyField(m->findField("sizes")); diff --git a/test/vtxBalance.cc b/test/vtxBalance.cc index bfa9ab570..bd33f10e2 100644 --- a/test/vtxBalance.cc +++ b/test/vtxBalance.cc @@ -4,7 +4,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -39,7 +39,7 @@ int main(int argc, char** argv) pcu::Finalize(); exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -62,7 +62,7 @@ int main(int argc, char** argv) // destroy mds m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/vtxEdgeElmBalance.cc b/test/vtxEdgeElmBalance.cc index 07421ce91..17f5dd73e 100644 --- a/test/vtxEdgeElmBalance.cc +++ b/test/vtxEdgeElmBalance.cc @@ -4,7 +4,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -54,7 +54,7 @@ int main(int argc, char** argv) pcu::Finalize(); exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -80,7 +80,7 @@ int main(int argc, char** argv) // destroy mds m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/vtxElmMixedBalance.cc b/test/vtxElmMixedBalance.cc index 53576b323..93ccea8b1 100644 --- a/test/vtxElmMixedBalance.cc +++ b/test/vtxElmMixedBalance.cc @@ -4,7 +4,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -20,7 +20,7 @@ int main(int argc, char** argv) { pcu::PCU PCUObj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -35,7 +35,7 @@ int main(int argc, char** argv) apf::writeVtkFiles("after",m); m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/zbalance.cc b/test/zbalance.cc index 163c29f8d..45f991f6b 100644 --- a/test/zbalance.cc +++ b/test/zbalance.cc @@ -8,7 +8,7 @@ #include #include #include // exit and EXIT_FAILURE -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -28,7 +28,7 @@ int main(int argc, char** argv) pcu::Finalize(); exit(EXIT_FAILURE); } -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(NULL); @@ -50,7 +50,7 @@ int main(int argc, char** argv) // destroy mds m->destroyNative(); apf::destroyMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/test/zsplit.cc b/test/zsplit.cc index 1b2bc5455..c1943055c 100644 --- a/test/zsplit.cc +++ b/test/zsplit.cc @@ -4,7 +4,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -62,7 +62,7 @@ int main(int argc, char** argv) { pcu::PCU PCUObj; lion_set_verbosity(1); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX MS_init(); SimModel_start(); Sim_readLicenseFile(0); @@ -90,7 +90,7 @@ int main(int argc, char** argv) Parma_PrintPtnStats(m, ""); m->writeNative(outFile); freeMesh(m); -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); Sim_unregisterAllKeys(); SimModel_stop(); diff --git a/zoltan/CMakeLists.txt b/zoltan/CMakeLists.txt index 92e9638a2..1c3f7b93c 100644 --- a/zoltan/CMakeLists.txt +++ b/zoltan/CMakeLists.txt @@ -4,13 +4,17 @@ if(DEFINED TRIBITS_PACKAGE) endif() # Package options -option(ENABLE_ZOLTAN "Enable Zoltan interface [ON|OFF]" OFF) +option( + PUMI_ENABLE_ZOLTAN + "Enable Zoltan interface [ON|OFF]" + ${ENABLE_ZOLTAN} # Inherit from parent project +) xsdk_add_tpl(ZOLTAN) xsdk_add_tpl(PARMETIS) -message(STATUS "ENABLE_ZOLTAN: " ${ENABLE_ZOLTAN}) +message(STATUS "PUMI_ENABLE_ZOLTAN: " ${PUMI_ENABLE_ZOLTAN}) -if(SCOREC_NO_MPI AND ENABLE_ZOLTAN) - message(FATAL_ERROR "SCOREC_NO_MPI is incompatible with Zoltan.") +if(PUMI_NO_MPI AND PUMI_ENABLE_ZOLTAN) + message(FATAL_ERROR "PUMI_NO_MPI is incompatible with Zoltan.") endif() # Let CMake know where to find custom find package implementations @@ -19,7 +23,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/") # Check for and enable zoltan support -if(ENABLE_ZOLTAN) +if(PUMI_ENABLE_ZOLTAN) if(Trilinos_PREFIX) set(ZOLTAN_PREFIX_DEFAULT "${Trilinos_PREFIX}") message(STATUS "ZOLTAN_PREFIX_DEFAULT ${ZOLTAN_PREFIX_DEFAULT}") @@ -28,7 +32,7 @@ if(ENABLE_ZOLTAN) endif() # Package sources -if(ENABLE_ZOLTAN) +if(PUMI_ENABLE_ZOLTAN) set(SOURCES apfInterElement.cc apfZoltan.cc @@ -57,7 +61,7 @@ target_include_directories(apf_zoltan INTERFACE target_link_libraries(apf_zoltan PUBLIC pcu apf) # Do extra work if zoltan is enabled -if(ENABLE_ZOLTAN) +if(PUMI_ENABLE_ZOLTAN) target_include_directories(apf_zoltan PRIVATE ${ZOLTAN_INCLUDE_DIRS} ${PARMETIS_INCLUDE_DIRS} diff --git a/zoltan/pkg_tribits.cmake b/zoltan/pkg_tribits.cmake index 9a7a67f34..baf790204 100644 --- a/zoltan/pkg_tribits.cmake +++ b/zoltan/pkg_tribits.cmake @@ -1,10 +1,10 @@ tribits_package(SCORECapf_zoltan) -set(ENABLE_ZOLTAN ON) +set(PUMI_ENABLE_ZOLTAN ON) include_directories("${CMAKE_CURRENT_SOURCE_DIR}") #Sources & Headers -if(ENABLE_ZOLTAN) +if(PUMI_ENABLE_ZOLTAN) set(SOURCES apfInterElement.cc apfZoltan.cc