From 3a89e1f176a615711e8a4826cde809b3c836f09a Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Thu, 3 Jul 2025 22:59:18 -0400 Subject: [PATCH 01/18] cmake: rename PUMI_ENABLE_SIMMETRIX - CMakeLists.txt: rename ENABLE_SIMMETRIX to PUMI_ENABLE_SIMMETRIX as requested in #337. - allow unscoped ENABLE_SIMMETRIX to also enable it for PUMI. - CMakeLists.txt, apf_sim/CMakeLists.txt, gmi_sim/CMakeLists.txt, phasta/CMakeLists.txt, python_wrappers/CMakeLists.txt, test/CMakeLists.txt, test/testing.cmake: replace all the ENABLE_SIMMETRIXs with PUMI_ENABLE_SIMMETRIX. Signed-off-by: Aiden Woodruff --- CMakeLists.txt | 12 ++++++---- apf_sim/CMakeLists.txt | 2 +- gmi_sim/CMakeLists.txt | 2 +- phasta/CMakeLists.txt | 8 +++---- python_wrappers/CMakeLists.txt | 6 ++--- test/CMakeLists.txt | 12 +++++----- test/testing.cmake | 44 +++++++++++++++++----------------- 7 files changed, 45 insertions(+), 41 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 99a80b291..6b91f332e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,8 +103,12 @@ 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_SIMMETRIX "Build with Simmetrix support" OFF) +# For compatibility and to inherit from owning projects: +if(ENABLE_SIMMETRIX) + set(PUMI_ENABLE_SIMMETRIX ON) +endif() +message(STATUS "PUMI_ENABLE_SIMMETRIX: ${PUMI_ENABLE_SIMMETRIX}") option(PUMI_ENABLE_CAPSTONE "Build PUMI with Capstone support" OFF) # For compatibility and to inherit from owning projects: if(ENABLE_CAPSTONE) @@ -112,7 +116,7 @@ if(ENABLE_CAPSTONE) endif() message(STATUS "PUMI_ENABLE_CAPSTONE: ${PUMI_ENABLE_CAPSTONE}") -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) add_definitions(-DHAVE_SIMMETRIX) endif() if(PUMI_ENABLE_CAPSTONE) @@ -144,7 +148,7 @@ macro(scorec_export_library target) endif() endmacro(scorec_export_library) -if(ENABLE_SIMMETRIX) +if(PUMI_ENABLE_SIMMETRIX) find_package(SimModSuite MODULE REQUIRED) endif() diff --git a/apf_sim/CMakeLists.txt b/apf_sim/CMakeLists.txt index 17fba445c..2121883c9 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() 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/phasta/CMakeLists.txt b/phasta/CMakeLists.txt index 25b45144d..b83a56337 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) @@ -116,7 +116,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/python_wrappers/CMakeLists.txt b/python_wrappers/CMakeLists.txt index e007ec0e9..b7dc03e5e 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}) @@ -32,7 +32,7 @@ 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) +if(PUMI_ENABLE_SIMMETRIX) set_property(TARGET pyCore PROPERTY SWIG_COMPILE_DEFINITIONS HAVE_SIMMETRIX) endif() set_property(TARGET pyCore @@ -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/test/CMakeLists.txt b/test/CMakeLists.txt index 99bb8c571..f9dc5533e 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) @@ -66,11 +66,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) @@ -128,7 +128,7 @@ 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() @@ -201,7 +201,7 @@ if(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(aniso_adapt_sim aniso_adapt_sim.cc) test_exe_func(curve_to_bezier curve_to_bezier.cc) @@ -248,7 +248,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) diff --git a/test/testing.cmake b/test/testing.cmake index 67f75b948..89c25af5d 100644 --- a/test/testing.cmake +++ b/test/testing.cmake @@ -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,10 +174,10 @@ 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 +if(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 @@ -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}" @@ -405,7 +405,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" @@ -428,7 +428,7 @@ 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) @@ -456,7 +456,7 @@ 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 @@ -603,7 +603,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(ENABLE_ZOLTAN AND PUMI_ENABLE_SIMMETRIX AND SIM_PARASOLID) set(MDIR ${MESHES}/annular) mpi_test(simZBalance_4 4 ./simZBalance @@ -839,7 +839,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 @@ -927,7 +927,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) @@ -940,7 +940,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}) @@ -960,7 +960,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}) @@ -970,7 +970,7 @@ 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(ENABLE_ZOLTAN AND PUMI_ENABLE_SIMMETRIX) mpi_test(chef9 2 ${CMAKE_CURRENT_BINARY_DIR}/chef WORKING_DIRECTORY ${MESHES}/phasta/simModelAndAttributes) endif() From 2cd48b40f6c253d1b52d3f08b651942ac25ed336 Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Thu, 3 Jul 2025 23:19:56 -0400 Subject: [PATCH 02/18] rename HAVE_SIMMETRIX to PUMI_HAS_SIMMETRIX - CMakeLists.txt: change HAVE_SIMMETRIX compile definition to PUMI_HAS_SIMMETRIX. - git grep HAVE_SIMMETRIX | cut -d: -f1 | uniq | xargs sed -i 's/HAVE_SIMMETRIX/PUMI_HAS_SIMMETRIX/' Signed-off-by: Aiden Woodruff --- CMakeLists.txt | 2 +- phasta/adaptLvlSet_loop.cc | 6 +++--- phasta/chef.cc | 6 +++--- phasta/chefStream.cc | 6 +++--- phasta/condense.cc | 6 +++--- phasta/cut_interface.cc | 8 ++++---- phasta/migrate_interface.cc | 6 +++--- phasta/ph.cc | 4 ++-- phasta/phBC.cc | 6 +++--- phasta/phCook.cc | 4 ++-- phasta/phInterfaceCutter.cc | 4 ++-- phasta/phMeshQuality.cc | 6 +++--- phasta/phOutput.cc | 2 +- phasta/phPartition.cc | 6 +++--- phasta/phRestart.cc | 4 ++-- phasta/threshold.cc | 6 +++--- python_wrappers/CMakeLists.txt | 4 ++-- python_wrappers/apf.i | 8 ++++---- test/collapse.cc | 6 +++--- test/crack_test.cc | 6 +++--- test/degenerateSurfs.cc | 6 +++--- test/describe.cc | 6 +++--- test/dg_ma_test.cc | 6 +++--- test/elmBalance.cc | 6 +++--- test/fieldReduce.cc | 6 +++--- test/fixlayer.cc | 6 +++--- test/fixshape.cc | 6 +++--- test/gap.cc | 6 +++--- test/highOrderSizeFields.cc | 6 +++--- test/highOrderSolutionTransfer.cc | 6 +++--- test/inClosureOf_test.cc | 6 +++--- test/ma_test.cc | 6 +++--- test/makeAllCavities.cc | 6 +++--- test/measureAnisoStats.cc | 10 +++++----- test/measureIsoStats.cc | 10 +++++----- test/modelInfo.cc | 6 +++--- test/msplit.cc | 6 +++--- test/nektar_align.cc | 6 +++--- test/ph_adapt.cc | 6 +++--- test/print_pumipic_partition.cc | 6 +++--- test/ptnParma.cc | 6 +++--- test/refine2x.cc | 6 +++--- test/render.cc | 6 +++--- test/renderClass.cc | 6 +++--- test/render_ascii.cc | 6 +++--- test/reorder.cc | 6 +++--- test/residualErrorEstimation_test.cc | 6 +++--- test/serialize.cc | 6 +++--- test/simDiscrete.cc | 2 +- test/sim_part.cc | 2 +- test/split.cc | 6 +++--- test/tetrahedronize.cc | 6 +++--- test/uniform.cc | 6 +++--- test/verify.cc | 6 +++--- test/verify_2nd_order_shapes.cc | 6 +++--- test/visualizeAnisoSizes.cc | 10 +++++----- test/vtxBalance.cc | 6 +++--- test/vtxEdgeElmBalance.cc | 6 +++--- test/vtxElmMixedBalance.cc | 6 +++--- test/zbalance.cc | 6 +++--- test/zsplit.cc | 6 +++--- 61 files changed, 178 insertions(+), 178 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b91f332e..a1f7b7a6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,7 +117,7 @@ endif() message(STATUS "PUMI_ENABLE_CAPSTONE: ${PUMI_ENABLE_CAPSTONE}") if(PUMI_ENABLE_SIMMETRIX) - add_definitions(-DHAVE_SIMMETRIX) + add_definitions(-DPUMI_HAS_SIMMETRIX) endif() if(PUMI_ENABLE_CAPSTONE) add_definitions(-DPUMI_HAS_CAPSTONE) 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..855456b3f 100644 --- a/phasta/chef.cc +++ b/phasta/chef.cc @@ -3,7 +3,7 @@ #include #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -38,7 +38,7 @@ 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); @@ -58,7 +58,7 @@ 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 SimAdvMeshing_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..1ca3163f9 100644 --- a/phasta/cut_interface.cc +++ b/phasta/cut_interface.cc @@ -2,7 +2,7 @@ #include "phInterfaceCutter.h" #include "phAttrib.h" #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -34,7 +34,7 @@ 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); @@ -62,7 +62,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,7 +72,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(); #ifdef HAVE_SIMADVMESHING SimAdvMeshing_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..315aa5f10 100644 --- a/phasta/phMeshQuality.cc +++ b/phasta/phMeshQuality.cc @@ -9,7 +9,7 @@ #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -40,7 +40,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 +95,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 { 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 b7dc03e5e..ad3d6571d 100644 --- a/python_wrappers/CMakeLists.txt +++ b/python_wrappers/CMakeLists.txt @@ -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 +# let swig know about the PUMI_HAS_SIMMETRIX if(PUMI_ENABLE_SIMMETRIX) - set_property(TARGET pyCore PROPERTY SWIG_COMPILE_DEFINITIONS HAVE_SIMMETRIX) + set_property(TARGET pyCore PROPERTY SWIG_COMPILE_DEFINITIONS PUMI_HAS_SIMMETRIX) endif() set_property(TARGET pyCore PROPERTY SWIG_INCLUDE_DIRECTORIES 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/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..6c83c8502 100644 --- a/test/measureAnisoStats.cc +++ b/test/measureAnisoStats.cc @@ -7,7 +7,7 @@ #include #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include #include #include @@ -56,7 +56,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); @@ -79,7 +79,7 @@ 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 SimAdvMeshing_stop(); @@ -128,7 +128,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 +143,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")); diff --git a/test/measureIsoStats.cc b/test/measureIsoStats.cc index cef3d410f..7b5ec5ba6 100644 --- a/test/measureIsoStats.cc +++ b/test/measureIsoStats.cc @@ -7,7 +7,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); @@ -79,7 +79,7 @@ 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 SimAdvMeshing_stop(); @@ -128,7 +128,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 +142,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")); 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..27a527f45 100644 --- a/test/sim_part.cc +++ b/test/sim_part.cc @@ -26,7 +26,7 @@ #include "gmi_sim_config.h" #include -#ifdef HAVE_SIMMETRIX +#ifdef PUMI_HAS_SIMMETRIX #include "SimPartitionedMesh.h" #include "SimModel.h" #include "SimUtil.h" 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/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(); From db0b2a4cff5241d51f885f8d33195fbff7cae6f6 Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Wed, 9 Jul 2025 13:36:31 -0400 Subject: [PATCH 03/18] rename SCOREC_NO_MPI TO PUMI_NO_MPI - git grep SCOREC_NO_MPI | cut -d: -f1 | uniq | xargs sed -i 's/SCOREC_NO_MPI/PUMI_NO_MPI/' - doc/myprogram.cpp: remove #ifdef PUMI_NO_MPI by using pcu::Init. Signed-off-by: Aiden Woodruff --- .github/workflows/cmake.yml | 4 ++-- .github/workflows/doxygen-gh-pages.yml | 2 +- CMakeLists.txt | 8 ++++---- SCOREC_config.h.in | 2 +- apf/apfCGNS.cc | 4 ++-- doc/myprogram.cpp | 8 ++------ example/mpi-nompi/README.md | 6 +++--- example/mpi-nompi/test_coll.cc | 2 +- mds/mdsCGNS.cc | 2 +- pcu/CMakeLists.txt | 2 +- pcu/PCU.cc | 8 ++++---- pcu/PCU.h | 6 +++--- pcu/pcu_defines.h | 4 ++-- pcu/pkg_tribits.cmake | 4 ++-- test/smokeTesting.cmake | 2 +- test/testing.cmake | 4 ++-- zoltan/CMakeLists.txt | 4 ++-- 17 files changed, 34 insertions(+), 38 deletions(-) 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 a1f7b7a6a..9d7e60dbd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,10 +39,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: ${SCOREC_NO_MPI}") +if(PUMI_NO_MPI AND ENABLE_CGNS) + message(FATAL_ERROR "PUMI_NO_MPI is incompatible with CGNS.") endif() # Set some default compiler flags that should always be used 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/apfCGNS.cc b/apf/apfCGNS.cc index da01cd99b..0ff91efb1 100644 --- a/apf/apfCGNS.cc +++ b/apf/apfCGNS.cc @@ -705,7 +705,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 +1138,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 } 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/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/mds/mdsCGNS.cc b/mds/mdsCGNS.cc index 6062eb4b9..026300e44 100644 --- a/mds/mdsCGNS.cc +++ b/mds/mdsCGNS.cc @@ -1637,7 +1637,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 diff --git a/pcu/CMakeLists.txt b/pcu/CMakeLists.txt index 1d5f39624..b8006903e 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/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/testing.cmake b/test/testing.cmake index 89c25af5d..f7555bf07 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 diff --git a/zoltan/CMakeLists.txt b/zoltan/CMakeLists.txt index 92e9638a2..0032c9c40 100644 --- a/zoltan/CMakeLists.txt +++ b/zoltan/CMakeLists.txt @@ -9,8 +9,8 @@ xsdk_add_tpl(ZOLTAN) xsdk_add_tpl(PARMETIS) message(STATUS "ENABLE_ZOLTAN: " ${ENABLE_ZOLTAN}) -if(SCOREC_NO_MPI AND ENABLE_ZOLTAN) - message(FATAL_ERROR "SCOREC_NO_MPI is incompatible with Zoltan.") +if(PUMI_NO_MPI AND ENABLE_ZOLTAN) + message(FATAL_ERROR "PUMI_NO_MPI is incompatible with Zoltan.") endif() # Let CMake know where to find custom find package implementations From 6d8eca7cc2cca8b2bca5c561a4633aa4fb29559e Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Mon, 14 Jul 2025 10:44:17 -0400 Subject: [PATCH 04/18] prefix flags for CGNS and Omega_h and rename NOMPI - CMakeLists.txt: rename ENABLE_CGNS to PUMI_ENABLE_CGNS and use old ENABLE_CGNS as the default value. - rename ENABLE_OMEGA_H to PUMI_ENABLE_OMEGA_H and use old name as default value. - change all conditionals to use the new scoped name. - rename SCOREC_NO_MPI to PUMI_NO_MPI. - change PUMI_ENABLE_SIMMETRIX to use ENABLE_SIMMETRIX as the default value like with cgns/omega_h. - don't rename SCOREC_USE_Omega_h_DEFAULT yet because that is input for bob.cmake based on the project name. - apf/CMakeLists.txt: add apfCGNSempty.cc file when CGNS is not enabled. - apf/pkg_tribits.cmake: same thing as CMakeLists.txt. - apf/apfCGNS.cc: remove HAVE_CGNS conditionals since the whole file is conditionally compiled based on PUMI_ENABLE_CGNS. - apf/apfCGNSempty.cc: move #else cases for HAVE_CGNS here so that they are compiled. otherwise they never would be. - cmake/bob.cmake: add documentation - mds/CMakeLists.txt: add mdsCGNSempty.cc without PUMI_ENABLE_CGNS. - mds/pkg_tribits.cmake: same thing. - mds/mdsCGNS: remove #ifdef HAVE_CGNS since the whole file is conditionally compiled. move #else branches to mdsCGNSempty.cc. - mds/mdsCGNSempty.cc: new file with empty functions that always fail. - test/CMakeLists.txt: rename ENABLE_CGNS to PUMI_ENABLE_CGNS and ENABLE_OMEGA_H to PUMI_ENABLE_OMEGA_H. - test/testing.cmake: same thing. Signed-off-by: Aiden Woodruff --- CMakeLists.txt | 60 ++++++++++++++++++++++-------------------- apf/CMakeLists.txt | 6 +++-- apf/apfCGNS.cc | 13 +-------- apf/apfCGNSempty.cc | 9 +++++++ apf/pkg_tribits.cmake | 6 +++-- cmake/bob.cmake | 5 +++- mds/CMakeLists.txt | 10 ++++--- mds/mdsCGNS.cc | 26 +++--------------- mds/mdsCGNSempty.cc | 18 +++++++++++++ mds/pkg_tribits.cmake | 6 +++-- omega_h/CMakeLists.txt | 2 +- test/CMakeLists.txt | 4 +-- test/cgns.cc | 10 +++---- test/testing.cmake | 6 ++--- 14 files changed, 93 insertions(+), 88 deletions(-) create mode 100644 apf/apfCGNSempty.cc create mode 100644 mds/mdsCGNSempty.cc diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d7e60dbd..f2df0a4ce 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() @@ -40,8 +42,8 @@ endif() # option related to MPI # option(PUMI_NO_MPI "Disable MPI support. When enabled only serial execution is supported." OFF) -message(STATUS "PUMI_NO_MPI: ${SCOREC_NO_MPI}") -if(PUMI_NO_MPI AND ENABLE_CGNS) +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() @@ -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,22 +105,21 @@ 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(PUMI_ENABLE_SIMMETRIX "Build with Simmetrix support" OFF) -# For compatibility and to inherit from owning projects: -if(ENABLE_SIMMETRIX) - set(PUMI_ENABLE_SIMMETRIX 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}") -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() -message(STATUS "PUMI_ENABLE_CAPSTONE: ${PUMI_ENABLE_CAPSTONE}") - 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(PUMI_ENABLE_CAPSTONE) add_definitions(-DPUMI_HAS_CAPSTONE) endif() @@ -126,6 +127,7 @@ 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) endif() @@ -157,23 +159,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) @@ -222,7 +224,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/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 0ff91efb1..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 @@ -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/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/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 026300e44..aa18eab89 100644 --- a/mds/mdsCGNS.cc +++ b/mds/mdsCGNS.cc @@ -34,13 +34,8 @@ #include #include #include -// -#ifdef HAVE_CGNS -// #include #include -// -#endif namespace { @@ -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/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/test/CMakeLists.txt b/test/CMakeLists.txt index f9dc5533e..c3f330dcd 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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() diff --git a/test/cgns.cc b/test/cgns.cc index 11e89cc8b..4b4b2c6da 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/testing.cmake b/test/testing.cmake index f7555bf07..59e194be9 100644 --- a/test/testing.cmake +++ b/test/testing.cmake @@ -194,7 +194,7 @@ if(ENABLE_ZOLTAN) ${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 @@ -621,7 +621,7 @@ if(ENABLE_ZOLTAN) ) endif() -if(ENABLE_CGNS AND ENABLE_ZOLTAN) +if(PUMI_ENABLE_CGNS AND ENABLE_ZOLTAN) # # sort of an arbitrary choice set(numProcs 4) @@ -706,7 +706,7 @@ mpi_test(cgns_bcs_3 ${numProcs} bcs3.smb additional) -endif(ENABLE_CGNS AND ENABLE_ZOLTAN) +endif(PUMI_ENABLE_CGNS AND ENABLE_ZOLTAN) mpi_test(construct 4 ./construct From d3539c3d44e0b70b702eac8f9a9996c9d2f3cbcb Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Fri, 29 Aug 2025 11:35:25 -0400 Subject: [PATCH 05/18] add PUMI_ prefix to ENABLE_FPP - CMakeLists.txt: rename option to PUMI_ENABLE_FPP and make default value ENABLE_FPP for compatibility. - rename preprocessor definition to PUMI_DO_FPP. - ma/maSnapper.cc: use PUMI_DO_FPP. Signed-off-by: Aiden Woodruff --- CMakeLists.txt | 13 ++++++++----- ma/maSnapper.cc | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f2df0a4ce..7626f3b5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,11 +124,14 @@ 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) diff --git a/ma/maSnapper.cc b/ma/maSnapper.cc index 2f3a426d2..20f54cd34 100644 --- a/ma/maSnapper.cc +++ b/ma/maSnapper.cc @@ -633,7 +633,7 @@ bool Snapper::run() mesh->removeTag(vert,snapTag); clearFlag(adapt, vert, SNAP); } - #if defined(DEBUG_FPP) + #if defined(PUMI_DEBUG_FPP) if (!success && ++DEBUGFAILED == 1) printFPP(adapt, FPP); #endif if (FPP) delete FPP; From d92cc921e84bf109d86824ed9344f6a383ea64ab Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Tue, 2 Sep 2025 12:01:29 -0400 Subject: [PATCH 06/18] prefix simmetrix feature options/macros - CMakeLists.txt: add PUMI_ prefix to simmetrix feature macros (fieldsim and advanced meshing). - apf_sim/apfSIM.cc: use prefixed macros. - pumi_simModSuiteConfig.h.in: use prefixed macros. Signed-off-by: Aiden Woodruff --- CMakeLists.txt | 18 +++++++++++------- apf_sim/apfSIM.cc | 2 +- pumi_simModSuiteConfig.h.in | 4 ++-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7626f3b5e..c7da36e1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,14 +184,18 @@ endif() configure_file(SCOREC_config.h.in SCOREC_config.h) install(FILES "${CMAKE_BINARY_DIR}/SCOREC_config.h" DESTINATION include) -if(ENABLE_SIMMETRIX) - 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) +if(PUMI_ENABLE_SIMMETRIX) + 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 ${SIMMODSUITE_SimAdvMeshing_FOUND}) + set(PUMI_USE_SIM_ADVMESHING ${SIMMODSUITE_SimAdvMeshing_FOUND}) configure_file(pumi_simModSuiteConfig.h.in pumi_simModSuiteConfig.h) install(FILES "${CMAKE_BINARY_DIR}/pumi_simModSuiteConfig.h" DESTINATION include) endif() diff --git a/apf_sim/apfSIM.cc b/apf_sim/apfSIM.cc index 6b501ef45..5273916b4 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/pumi_simModSuiteConfig.h.in b/pumi_simModSuiteConfig.h.in index 0138f07cd..b3ed2b740 100644 --- a/pumi_simModSuiteConfig.h.in +++ b/pumi_simModSuiteConfig.h.in @@ -1,4 +1,4 @@ -#cmakedefine USE_FIELDSIM -#cmakedefine USE_SIM_ADVMESHING +#cmakedefine PUMI_USE_FIELDSIM +#cmakedefine PUMI_USE_SIM_ADVMESHING #cmakedefine SIMMODSUITE_MAJOR_VERSION @SIMMODSUITE_MAJOR_VERSION@ #cmakedefine SIMMODSUITE_MINOR_VERSION @SIMMODSUITE_MINOR_VERSION@ From de6e258be6f8fd92b7e7f2c19095a25ff91ca5e4 Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Tue, 2 Sep 2025 12:10:09 -0400 Subject: [PATCH 07/18] add PUMI_ prefix to ENABLE_DSP option Signed-off-by: Aiden Woodruff --- dsp/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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() From dc432f757af3833b95a355a9921984e09ca3cb8f Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Tue, 2 Sep 2025 13:33:06 -0400 Subject: [PATCH 08/18] add PUMI_ prefix to ENABLE_METIS - metis/CMakeLists.txt: update option name and if statements. - ma/maInput.cc: update error message to reference new option name. - test/CMakeLists.txt: update if statements. - test/testing.cmake: update if statements. Signed-off-by: Aiden Woodruff --- ma/maInput.cc | 2 +- metis/CMakeLists.txt | 10 +++++----- test/CMakeLists.txt | 4 ++-- test/testing.cmake | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ma/maInput.cc b/ma/maInput.cc index e153f31b9..cd7355de3 100644 --- a/ma/maInput.cc +++ b/ma/maInput.cc @@ -165,7 +165,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/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/test/CMakeLists.txt b/test/CMakeLists.txt index c3f330dcd..67e28199a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -85,7 +85,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) @@ -107,7 +107,7 @@ if(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() diff --git a/test/testing.cmake b/test/testing.cmake index 59e194be9..5aab8bef0 100644 --- a/test/testing.cmake +++ b/test/testing.cmake @@ -431,7 +431,7 @@ mpi_test(collapse_2 2 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" @@ -546,7 +546,7 @@ if(ENABLE_ZOLTAN) "${MDIR}/4imb/torus.smb" "torusZbal4p/") endif() -if(ENABLE_METIS) +if(PUMI_ENABLE_METIS) mpi_test(mbalance 4 ./mbalance "${MDIR}/torus.dmg" From 1a42c31b4bcf65545d31ac27ff4cc37ade93980c Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Tue, 2 Sep 2025 17:36:10 -0400 Subject: [PATCH 09/18] add PUMI_ prefix to STK options - stk/CMakeLists.txt: add PUMI_ prefix to ENABLE_STK and ENABLE_STK_MESH. - stk/apf_stkConfig.h.in: add PUMI_ prefix to HAS_STK and use PUMI_ENABLE_STK_MESH. - stk/apfExodusOutput.cc: change HAS_STK to PUMI_HAS_STK. - stk/apfMeshSTK.cc: use PUMI_HAS_STK. - stk/apfSTK.cc: use PUMI_HAS_STK. Signed-off-by: Aiden Woodruff --- stk/CMakeLists.txt | 30 +++++++++++++++++++----------- stk/apfExodusOutput.cc | 2 +- stk/apfMeshSTK.cc | 4 ++-- stk/apfSTK.cc | 6 +++--- stk/apf_stkConfig.h.in | 2 +- stk/pkg_tribits.cmake | 6 +++--- 6 files changed, 29 insertions(+), 21 deletions(-) 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() From 764fb766a9aa003909b698261242a49a6a16c9df Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Thu, 11 Sep 2025 16:36:40 -0400 Subject: [PATCH 10/18] add PUMI_ prefix to zoltan options - zoltan/CMakeLists.txt: add PUMI_ prefix to ENABLE_ZOLTAN and make ENABLE_ZOLTAN value the default to inherit and for compatability. - update message and if statements. - zoltan/pkg_tribits.cmake: change variable to PUMI_ENABLE_ZOLTAN. - test/capVol.cc (makeSplitter): fix typo in zoltan call. - ma/maInput.cc: update error message when trying to run MeshAdapt with Zoltan but without compiling the support. Signed-off-by: Aiden Woodruff --- ma/maInput.cc | 5 ++++- zoltan/CMakeLists.txt | 16 ++++++++++------ zoltan/pkg_tribits.cmake | 4 ++-- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ma/maInput.cc b/ma/maInput.cc index cd7355de3..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 ( diff --git a/zoltan/CMakeLists.txt b/zoltan/CMakeLists.txt index 0032c9c40..1c3f7b93c 100644 --- a/zoltan/CMakeLists.txt +++ b/zoltan/CMakeLists.txt @@ -4,12 +4,16 @@ 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(PUMI_NO_MPI AND ENABLE_ZOLTAN) +if(PUMI_NO_MPI AND PUMI_ENABLE_ZOLTAN) message(FATAL_ERROR "PUMI_NO_MPI is incompatible with Zoltan.") endif() @@ -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 From 95b120fccfcd1d7cf48d66cd13c16d23ed35b001 Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Thu, 11 Sep 2025 17:15:15 -0400 Subject: [PATCH 11/18] fix ENABLE_ZOLTAN in test/ CMake files - test/CMakeLists.txt: rename ENABLE_ZOLTAN to PUMI_ENABLE_ZOLTAN wherever found. - test/testing.cmake: replace ENABLE_ZOLTAN to PUMI_ENABLE_ZOLTAN. Signed-off-by: Aiden Woodruff --- test/CMakeLists.txt | 4 ++-- test/testing.cmake | 34 +++++++++++++++++----------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 67e28199a..b24d5044d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -103,7 +103,7 @@ 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() @@ -197,7 +197,7 @@ 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() diff --git a/test/testing.cmake b/test/testing.cmake index 5aab8bef0..0302a0bdf 100644 --- a/test/testing.cmake +++ b/test/testing.cmake @@ -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 @@ -177,8 +177,8 @@ if(PUMI_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 PUMI_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,7 +187,7 @@ if(ENABLE_ZOLTAN AND PUMI_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 @@ -369,7 +369,7 @@ if(PUMI_ENABLE_SIMMETRIX) "${MESHES}/deformedSlab/sim_model.smd" "${MESHES}/deformedSlab/sim_mesh.sms") endif() -if(ENABLE_ZOLTAN) +if(PUMI_ENABLE_ZOLTAN) mpi_test(ma_serial 1 ./ma_test "${MDIR}/pipe.${GXT}" @@ -463,7 +463,7 @@ if(PUMI_ENABLE_METIS) ) endif() endif() -if(ENABLE_ZOLTAN) +if(PUMI_ENABLE_ZOLTAN) mpi_test(refineX 2 ./refine2x "${MDIR}/pipe.${GXT}" @@ -500,7 +500,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}" @@ -539,7 +539,7 @@ 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" @@ -603,7 +603,7 @@ mpi_test(parmaSerial 1 "${MESHES}/cube/cube.dmg" "${MESHES}/cube/pumi670/cube.smb" "cubeBal.smb/") -if(ENABLE_ZOLTAN AND PUMI_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 @@ -611,7 +611,7 @@ if(ENABLE_ZOLTAN AND PUMI_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" @@ -621,7 +621,7 @@ if(ENABLE_ZOLTAN) ) endif() -if(PUMI_ENABLE_CGNS AND ENABLE_ZOLTAN) +if(PUMI_ENABLE_CGNS AND PUMI_ENABLE_ZOLTAN) # # sort of an arbitrary choice set(numProcs 4) @@ -706,7 +706,7 @@ mpi_test(cgns_bcs_3 ${numProcs} bcs3.smb additional) -endif(PUMI_ENABLE_CGNS AND ENABLE_ZOLTAN) +endif(PUMI_ENABLE_CGNS AND PUMI_ENABLE_ZOLTAN) mpi_test(construct 4 ./construct @@ -827,7 +827,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") @@ -865,7 +865,7 @@ if(PUMI_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 @@ -949,7 +949,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 @@ -970,14 +970,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 PUMI_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) From b0d31b884e1a9b9ff3a26b5dfb6f61c93c348d20 Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Thu, 11 Sep 2025 17:40:16 -0400 Subject: [PATCH 12/18] rename HAVE_SIMADVMESHING to PUMI_HAS_SIMADVMESHING - apf_sim/CMakeLists.txt: rename PUMI_USE_SIMADVMESHING to PUMI_HAS_SIMADVMESHING. Cameron (in 330ec29) and then I (in d92cc921) changed it because I could not find the input variable HAVE_SIMADVMESHING. turns out it was the name being used as a C macro. - apf_sim/apf_simConfig.h.in: change #cmakedefine line - phasta/CMakeLists.txt: remove HAVE_SIMADVMESHING from compile definitions since it should now be read from apf_simConfig.h. - phasta/chef.cc: #include apf_simConfig.h and replace HAVE_SIMADVMESHING with PUMI_HAS_SIMADVMESHING. - phasta/cut_interface.cc: #include apf_simConfig.h and replace HAVE_SIMADVMESHING with PUMI_HAS_SIMADVMESHING. - phasta/phMeshQuality.cc: #include apf_simConfig.h and replace HAVE_SIMADVMESHING with PUMI_HAS_SIMADVMESHING. - test/CMakeLists.txt: remove HAVE_SIMADVMESHING as a private compile definition since it shoudl be read from apf_simConfig.h - test/measureAnisoStats.cc: #include apf_simConfig.h and replace HAVE_SIMADVMESHING with PUMI_HAS_SIMADVMESHING. - test/measureIsoStats.cc: #include apf_simConfig.h and replace HAVE_SIMADVMESHING with PUMI_HAS_SIMADVMESHING. - test/sim_part.cc: #include apf_simConfig.h and replace HAVE_SIMADVMESHING with PUMI_HAS_SIMADVMESHING. Signed-off-by: Aiden Woodruff --- CMakeLists.txt | 2 +- phasta/CMakeLists.txt | 5 ----- phasta/chef.cc | 7 ++++--- phasta/cut_interface.cc | 7 ++++--- phasta/phMeshQuality.cc | 7 ++++--- pumi_simModSuiteConfig.h.in | 2 +- test/CMakeLists.txt | 6 ------ test/measureAnisoStats.cc | 9 +++++---- test/measureIsoStats.cc | 9 +++++---- test/sim_part.cc | 7 ++++--- 10 files changed, 28 insertions(+), 33 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c7da36e1c..1e8b15718 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -195,7 +195,7 @@ if(PUMI_ENABLE_SIMMETRIX) if(SIMMODSUITE_SimField_FOUND AND PUMI_ENABLE_FIELDSIM) set(PUMI_USE_FIELDSIM TRUE) endif() - set(PUMI_USE_SIM_ADVMESHING ${SIMMODSUITE_SimAdvMeshing_FOUND}) + set(PUMI_HAS_SIM_ADVMESHING ${SIMMODSUITE_SimAdvMeshing_FOUND}) configure_file(pumi_simModSuiteConfig.h.in pumi_simModSuiteConfig.h) install(FILES "${CMAKE_BINARY_DIR}/pumi_simModSuiteConfig.h" DESTINATION include) endif() diff --git a/phasta/CMakeLists.txt b/phasta/CMakeLists.txt index b83a56337..f3bc822d0 100644 --- a/phasta/CMakeLists.txt +++ b/phasta/CMakeLists.txt @@ -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) diff --git a/phasta/chef.cc b/phasta/chef.cc index 855456b3f..d09633377 100644 --- a/phasta/chef.cc +++ b/phasta/chef.cc @@ -5,11 +5,12 @@ #include #ifdef PUMI_HAS_SIMMETRIX #include +#include #include #include #include #include -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING #include #endif #endif @@ -43,7 +44,7 @@ int main(int argc, char** argv) SimModel_start(); Sim_readLicenseFile(0); SimPartitionedMesh_start(0, 0); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_start(); #endif gmi_sim_start(); @@ -60,7 +61,7 @@ int main(int argc, char** argv) freeMesh(m); #ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_stop(); #endif SimPartitionedMesh_stop(); diff --git a/phasta/cut_interface.cc b/phasta/cut_interface.cc index 1ca3163f9..eceff1841 100644 --- a/phasta/cut_interface.cc +++ b/phasta/cut_interface.cc @@ -7,7 +7,8 @@ #include #include #include -#ifdef HAVE_SIMADVMESHING +#include +#ifdef PUMI_HAS_SIMADVMESHING #include #endif #endif @@ -38,7 +39,7 @@ int main(int argc, char** argv) SimModel_start(); Sim_readLicenseFile(0); SimPartitionedMesh_start(0, 0); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_start(); #endif gmi_sim_start(); @@ -74,7 +75,7 @@ int main(int argc, char** argv) apf::destroyMesh(m); #ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_stop(); #endif SimPartitionedMesh_stop(); diff --git a/phasta/phMeshQuality.cc b/phasta/phMeshQuality.cc index 315aa5f10..dc887e118 100644 --- a/phasta/phMeshQuality.cc +++ b/phasta/phMeshQuality.cc @@ -10,11 +10,12 @@ #include #ifdef PUMI_HAS_SIMMETRIX +#include #include #include #include #include -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING #include #endif #endif @@ -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/pumi_simModSuiteConfig.h.in b/pumi_simModSuiteConfig.h.in index b3ed2b740..105a1eb90 100644 --- a/pumi_simModSuiteConfig.h.in +++ b/pumi_simModSuiteConfig.h.in @@ -1,4 +1,4 @@ #cmakedefine PUMI_USE_FIELDSIM -#cmakedefine PUMI_USE_SIM_ADVMESHING +#cmakedefine PUMI_HAS_SIMADVMESHING #cmakedefine SIMMODSUITE_MAJOR_VERSION @SIMMODSUITE_MAJOR_VERSION@ #cmakedefine SIMMODSUITE_MINOR_VERSION @SIMMODSUITE_MINOR_VERSION@ diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b24d5044d..731c3c3ad 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -132,10 +132,6 @@ 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) @@ -256,8 +252,6 @@ if(PUMI_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/measureAnisoStats.cc b/test/measureAnisoStats.cc index 6c83c8502..05ba3f596 100644 --- a/test/measureAnisoStats.cc +++ b/test/measureAnisoStats.cc @@ -10,10 +10,11 @@ #ifdef PUMI_HAS_SIMMETRIX #include #include +#include #include #include #include -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING #include #endif #endif @@ -60,7 +61,7 @@ int main(int argc, char** argv) SimModel_start(); Sim_readLicenseFile(0); SimPartitionedMesh_start(0, 0); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_start(); #endif gmi_sim_start(); @@ -81,7 +82,7 @@ int main(int argc, char** argv) #ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_stop(); #endif SimPartitionedMesh_stop(); @@ -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 7b5ec5ba6..55cf3076a 100644 --- a/test/measureIsoStats.cc +++ b/test/measureIsoStats.cc @@ -10,10 +10,11 @@ #ifdef PUMI_HAS_SIMMETRIX #include #include +#include #include #include #include -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING #include #endif #endif @@ -61,7 +62,7 @@ int main(int argc, char** argv) SimModel_start(); Sim_readLicenseFile(0); SimPartitionedMesh_start(0, 0); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_start(); #endif gmi_sim_start(); @@ -81,7 +82,7 @@ int main(int argc, char** argv) #ifdef PUMI_HAS_SIMMETRIX gmi_sim_stop(); -#ifdef HAVE_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING SimAdvMeshing_stop(); #endif SimPartitionedMesh_stop(); @@ -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/sim_part.cc b/test/sim_part.cc index 27a527f45..31718f7b3 100644 --- a/test/sim_part.cc +++ b/test/sim_part.cc @@ -25,6 +25,7 @@ #include #include "gmi_sim_config.h" #include +#include #ifdef PUMI_HAS_SIMMETRIX #include "SimPartitionedMesh.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); From ac006abc14a9e24ee2ebc404a4511b39613391b4 Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Sun, 15 Mar 2026 21:30:47 -0400 Subject: [PATCH 13/18] add PUMI_ prefix to DEBUG_FPP macro - ma/maSnapper.cc: Angel added DEBUG_FPP in 62b50f20a. Change it to PUMI_DEBUG_FPP. - CMakeLists.txt: replace PUMI_ENABLE_FPP with PUMI_DEBUG_FPP since DO_FPP no longer exists. Signed-off-by: Aiden Woodruff --- CMakeLists.txt | 12 ++++++------ ma/maSnapper.cc | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e8b15718..4e47c9ec6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,13 +125,13 @@ if(PUMI_ENABLE_CAPSTONE) endif() option( - PUMI_ENABLE_FPP - "Build with snapping to first problem plane" - ${ENABLE_FPP} # Inherit default value + PUMI_DEBUG_FPP + "Build with debugging for snapping to first problem plane" + ${DEBUG_FPP} # Inherit default value ) -message(STATUS "PUMI_ENABLE_FPP: ${PUMI_ENABLE_FPP}") -if(PUMI_ENABLE_FPP) - add_definitions(-DPUMI_DO_FPP) +message(STATUS "PUMI_DEBUG_FPP: ${PUMI_DEBUG_FPP}") +if(PUMI_DEBUG_FPP) + add_definitions(-DPUMI_DEBUG_FPP) endif() macro(scorec_export_library target) diff --git a/ma/maSnapper.cc b/ma/maSnapper.cc index 20f54cd34..f619f9807 100644 --- a/ma/maSnapper.cc +++ b/ma/maSnapper.cc @@ -70,7 +70,7 @@ bool Snapper::requestLocality(apf::CavityOp* o) //Write snapping data to files for debugging purposes //In order to view relevant information it is neccessary to hide entities with relevent flag in vtk viewer -#if defined(DEBUG_FPP) +#if defined(PUMI_DEBUG_FPP) static void flagAndPrint(Adapt* a, Entity* ent, int dim, const char* name) { setFlag(a, ent, CHECKED); @@ -80,7 +80,7 @@ static void flagAndPrint(Adapt* a, Entity* ent, int dim, const char* name) #endif //Write snapping data to files for debugging purposes -#if defined(DEBUG_FPP) +#if defined(PUMI_DEBUG_FPP) static void printFPP(Adapt* a, FirstProblemPlane* FPP) { ma_dbg::addTargetLocation(a, "snap_target"); @@ -598,7 +598,7 @@ bool Snapper::trySimpleSnap() apf::Up invalid; return tryReposition(adapt, vert, snapTag, invalid); } -#if defined(DEBUG_FPP) +#if defined(PUMI_DEBUG_FPP) static int DEBUGFAILED=0; #endif From 463ba0eb4e4f0cf6c64830c2a1fabea6e511f82f Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Sun, 15 Mar 2026 22:45:20 -0400 Subject: [PATCH 14/18] prefix phasta macros with PUMI_and update ph cmake - phasta/CMakeLists.txt: add PUMI_ prefix to cmake variables and macros. - remove add_definitions and change INTERFACE to PUBLIC. - the effect of doing add_definitions and then adding INTERFACE definitions is the same as adding PRIVATE and then INTERFACE. adding both PRIVATE and INTERFACE is the same as PUBLIC. - phasta/phiotimer.h, phasta/phiotimer.cc: use PUMI_ prefixed macros. Signed-off-by: Aiden Woodruff --- phasta/CMakeLists.txt | 20 ++++++++------------ phasta/phiotimer.cc | 6 +++--- phasta/phiotimer.h | 6 +++--- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/phasta/CMakeLists.txt b/phasta/CMakeLists.txt index f3bc822d0..2983755eb 100644 --- a/phasta/CMakeLists.txt +++ b/phasta/CMakeLists.txt @@ -72,25 +72,21 @@ add_library(ph ${SOURCES}) #determine which timer to use based on the target system and compiler if(CMAKE_SYSTEM_NAME MATCHES BlueGeneQ*) - add_definitions(-DUSE_PCU_TIME) - target_compile_definitions(ph INTERFACE -DUSE_PCU_TIME) + target_compile_definitions(ph PUBLIC -DPUMI_USE_PCU_TIME) elseif(CMAKE_CXX_COMPILER_ID MATCHES Intel) - add_definitions(-DHAVE_INTEL_RDTSC) - target_compile_definitions(ph INTERFACE -DHAVE_INTEL_RDTSC) + target_compile_definitions(ph PUBLIC -DPUMI_HAVE_INTEL_RDTSC) else() #from https://github.com/abduld/libwb/issues/5 include(CheckFunctionExists) - CHECK_FUNCTION_EXISTS(clock_gettime HAVE_CLOCK_GETTIME) - if(NOT HAVE_CLOCK_GETTIME) + CHECK_FUNCTION_EXISTS(clock_gettime PUMI_HAVE_CLOCK_GETTIME) + if(NOT PUMI_HAVE_CLOCK_GETTIME) find_library(LIBRT_LIBRARIES rt) message(STATUS "librt: ${LIBRT_LIBRARIES}") - endif(NOT HAVE_CLOCK_GETTIME) - if( HAVE_CLOCK_GETTIME OR LIBRT_LIBRARIES ) - add_definitions(-DHAVE_CLOCK_GETTIME) - target_compile_definitions(ph INTERFACE -DHAVE_CLOCK_GETTIME) + endif(NOT PUMI_HAVE_CLOCK_GETTIME) + if( PUMI_HAVE_CLOCK_GETTIME OR LIBRT_LIBRARIES ) + target_compile_definitions(ph PUBLIC -DPUMI_HAVE_CLOCK_GETTIME) else() - add_definitions(-DUSE_PCU_TIME) - target_compile_definitions(ph INTERFACE -DUSE_PCU_TIME) + target_compile_definitions(ph PUBLIC -DPUMI_USE_PCU_TIME) endif() endif() diff --git a/phasta/phiotimer.cc b/phasta/phiotimer.cc index b4b4ffc0d..d1f190dc5 100644 --- a/phasta/phiotimer.cc +++ b/phasta/phiotimer.cc @@ -27,7 +27,7 @@ struct phastaio_stats { }; static struct phastaio_stats phastaio_global_stats; -#if defined(HAVE_INTEL_RDTSC) +#if defined(PUMI_HAVE_INTEL_RDTSC) /* return the cycle count */ void phastaio_time(phastaioTime* t) { *t = _rdtsc(); //intel intrinsic @@ -60,7 +60,7 @@ size_t phastaio_time_diff(phastaioTime* start, phastaioTime* end) { size_t us = ((double)cycles)/phastaio_global_stats.cpus; return us; } -#elif defined(USE_PCU_TIME) +#elif defined(PUMI_USE_PCU_TIME) void phastaio_time(phastaioTime* t) { *t = pcu::Time(); } @@ -69,7 +69,7 @@ size_t phastaio_time_diff(phastaioTime* start, phastaioTime* end) { size_t elapsed = static_cast((*end-*start)*MILLION); return elapsed; } -#elif defined(HAVE_CLOCK_GETTIME) +#elif defined(PUMI_HAVE_CLOCK_GETTIME) void phastaio_time(phastaioTime* t) { int err; err = clock_gettime(CLOCK_MONOTONIC,t); diff --git a/phasta/phiotimer.h b/phasta/phiotimer.h index ec1dc3dcd..de57ac38e 100644 --- a/phasta/phiotimer.h +++ b/phasta/phiotimer.h @@ -59,11 +59,11 @@ enum phastaio_file { NUM_PHASTAIO_MODES }; -#if defined(HAVE_INTEL_RDTSC) +#if defined(PUMI_HAVE_INTEL_RDTSC) typedef size_t phastaioTime; -#elif defined(USE_PCU_TIME) +#elif defined(PUMI_USE_PCU_TIME) typedef double phastaioTime; -#elif defined(HAVE_CLOCK_GETTIME) +#elif defined(PUMI_HAVE_CLOCK_GETTIME) #include typedef struct timespec phastaioTime; #endif From 2883f8f983ff3cae864a48674068d3a3c55934b6 Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Fri, 20 Mar 2026 09:31:34 -0400 Subject: [PATCH 15/18] add deprecation and compatibility for pumi_no_mpi Signed-off-by: Aiden Woodruff --- CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e47c9ec6..f21db751d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,16 @@ endif() # # option related to MPI # -option(PUMI_NO_MPI "Disable MPI support. When enabled only serial execution is supported." OFF) +if(SCOREC_NO_MPI) + message(DEPRECATION + "The SCOREC_NO_MPI option has been renamed to" + " PUMI_NO_MPI. Please update your configuration to use the new name.") + set(PUMI_NO_MPI_DEFAULT ON) +endif() +option(PUMI_NO_MPI + "Disable MPI support. When enabled only serial execution is supported." + ${PUMI_NO_MPI_DEFAULT} +) 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.") From 012d184b841ce173ca4ba467544e54019c866227 Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Wed, 6 May 2026 14:55:12 -0400 Subject: [PATCH 16/18] add old non-prefixed simmetrix macros - pumi_simModSuiteConfig.h.in: replace USE_FIELDSIM and USE_SIM_ADVMESHING when the new prefixed ones are defined. Signed-off-by: Aiden Woodruff --- pumi_simModSuiteConfig.h.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pumi_simModSuiteConfig.h.in b/pumi_simModSuiteConfig.h.in index 105a1eb90..722b6f72a 100644 --- a/pumi_simModSuiteConfig.h.in +++ b/pumi_simModSuiteConfig.h.in @@ -1,4 +1,10 @@ #cmakedefine PUMI_USE_FIELDSIM +#ifdef PUMI_USE_FIELDSIM +#define USE_FIELDSIM +#endif #cmakedefine PUMI_HAS_SIMADVMESHING +#ifdef PUMI_HAS_SIMADVMESHING +#define USE_SIM_ADVMESHING +#endif #cmakedefine SIMMODSUITE_MAJOR_VERSION @SIMMODSUITE_MAJOR_VERSION@ #cmakedefine SIMMODSUITE_MINOR_VERSION @SIMMODSUITE_MINOR_VERSION@ From a7e58acb234e41f3ca2858b1b419f7168a9ea285 Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Wed, 6 May 2026 21:17:48 -0400 Subject: [PATCH 17/18] rename project and bump minor version - CMakeLists.txt: rename project and bump minor version. - rename bob.cmake type variables to use PUMI as project name. - add SCORECConfig.cmake and SCORECConfigVersion.cmake after adding PUMIConfig.cmake. - cmake/SCORECConfig.cmake.in: hand-coded transition package configuration file. - should export all PUMI:: targets as SCOREC:: targets and alert users to change the project name that they use in find_package. - https://discourse.cmake.org/t/exporting-renamed-multiple-named-configs/2586/2 Signed-off-by: Aiden Woodruff --- CMakeLists.txt | 27 ++++++-- cmake/SCORECConfig.cmake.in | 120 ++++++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+), 6 deletions(-) create mode 100644 cmake/SCORECConfig.cmake.in diff --git a/CMakeLists.txt b/CMakeLists.txt index f21db751d..87d8f54dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ endif() # This is the top level CMake file for the SCOREC build cmake_minimum_required(VERSION 3.12) -project(SCOREC VERSION 4.2.0 LANGUAGES CXX C) +project(PUMI VERSION 4.3.0 LANGUAGES CXX C) include(cmake/bob.cmake) include(cmake/xsdk.cmake) @@ -167,7 +167,7 @@ if(PUMI_ENABLE_SIMMETRIX) endif() if(PUMI_ENABLE_CAPSTONE) - set(SCOREC_USE_CreateMG_DEFAULT ${PUMI_ENABLE_CAPSTONE}) + set(PUMI_USE_CreateMG_DEFAULT ${PUMI_ENABLE_CAPSTONE}) bob_public_dep(CreateMG) endif() @@ -175,17 +175,17 @@ if(PUMI_ENABLE_OMEGA_H) bob_cxx17_flags() bob_set_cxx_standard(17) # find the omega_h library - set(SCOREC_USE_Omega_h_DEFAULT ${PUMI_ENABLE_OMEGA_H}) + set(PUMI_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(PUMI_ENABLE_CGNS) - set(SCOREC_USE_CGNS_DEFAULT ${PUMI_ENABLE_CGNS}) + set(PUMI_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 ${PUMI_ENABLE_CGNS}) + set(PUMI_USE_HDF5_DEFAULT ${PUMI_ENABLE_CGNS}) bob_public_dep(HDF5) add_definitions(-DPUMI_HAS_CGNS) endif() @@ -239,7 +239,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}) +target_link_libraries(core INTERFACE ${PUMI_EXPORTED_TARGETS}) if(PUMI_ENABLE_CGNS) target_link_libraries(core INTERFACE ${CMAKE_DL_LIBS}) #HDF5 uses dlopen endif() @@ -279,3 +279,18 @@ if(DOXYGEN_FOUND) endif() bob_end_package() + +# The following is included for compatibility with PUMI<4.3 when the project +# was named SCOREC: +configure_file(cmake/SCORECConfig.cmake.in SCORECConfig.cmake @ONLY) +include(CMakePackageConfigHelpers) +write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/SCORECConfigVersion.cmake" + VERSION ${PROJECT_VERSION} + COMPATIBILITY SameMajorVersion +) +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/SCORECConfigVersion.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/SCORECConfig.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/SCOREC" +) diff --git a/cmake/SCORECConfig.cmake.in b/cmake/SCORECConfig.cmake.in new file mode 100644 index 000000000..498fbc5f2 --- /dev/null +++ b/cmake/SCORECConfig.cmake.in @@ -0,0 +1,120 @@ +if(CMAKE_VERSION VERSION_LESS "3.12") + set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 0) + set("${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE" + "SCOREC requires CMake 3.12 in order to reliably be used.") + return() +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 3.12) + +# Included to deprecate old package name +if(NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION) + if(NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) + message(DEPRECATION "The new name for the SCOREC package is PUMI.") + endif() +elseif(${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION VERSION_LESS 4.3) + # Ignore for compatibility + if(NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) + message(AUTHOR_WARNING + "The new name for the SCOREC package is PUMI. Consider updating your" + " find_package() call." + ) + endif() +else() + message(FATAL_ERROR + "The new name for the SCOREC package is PUMI. By requesting at least" + " version 4.3, the new name is now required." + ) +endif() + +set(PUMI_FIND_ARGS "") +if(${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_COMPLETE) + set(PUMI_FIND_ARGS + ${PUMI_FIND_ARGS} ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_COMPLETE} + ) +endif() +if(${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_EXACT) + set(PUMI_FIND_ARGS ${PUMI_FIND_ARGS} EXACT) +endif() +if(${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_QUIETLY) + set(PUMI_FIND_ARGS ${PUMI_FIND_ARGS} QUIET) +endif() +if(${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_REQUIRED) + set(PUMI_FIND_ARGS ${PUMI_FIND_ARGS} REQUIRED) +endif() +if(${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS) + set(PUMI_FIND_COMP_REQUIRED) + set(PUMI_FIND_COMP_OPTIONAL) + foreach(_comp in LISTS ${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS) + if(${CMAKE_FIND_PACKAGE_NAME}_REQUIRED_${_comp}) + set(PUMI_FIND_COMP_REQUIRED ${PUMI_FIND_COMP_REQUIRED} ${_comp}) + else() + set(PUMI_FIND_COMP_OPTIONAL ${PUMI_FIND_COMP_OPTIONAL} ${_comp}) + endif() + endforeach() + if(PUMI_FIND_COMP_REQUIRED) + set(PUMI_FIND_ARGS + ${PUMI_FIND_ARGS} COMPONENTS ${PUMI_FIND_COMP_REQUIRED} + ) + endif() + if(PUMI_FIND_COMP_OPTIONAL) + set(PUMI_FIND_ARGS + ${PUMI_FIND_ARGS} OPTIONAL_COMPONENTS ${PUMI_FIND_COMP_OPTIONAL} + ) + endif() +endif() + +if(SCOREC_ROOT) + set(PUMI_ROOT "${SCOREC_ROOT}") +endif() +if(SCOREC_DIR) + set(PUMI_DIR "${SCOREC_DIR}") +endif() +if(SCOREC_PREFIX) + set(PUMI_PREFIX "${PUMI_PREFIX}") +endif() + +get_filename_component(_PUMI_HINT "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_PUMI_HINT "${_PUMI_HINT}" PATH) +get_filename_component(_PUMI_HINT "${_PUMI_HINT}" PATH) +get_filename_component(_PUMI_HINT "${_PUMI_HINT}" PATH) + +find_package(PUMI ${PUMI_FIND_ARGS} HINTS "${_PUMI_HINT}") +if(NOT PUMI_FOUND) + set(SCOREC_FOUND 0) + set(SCOREC_NOT_FOUND_MESSAGE "PUMI not found: ${PUMI_NOT_FOUND_MESSAGE}") + cmake_policy(POP) + return() +endif() + +set(PUMI_EXPORTED_TARGETS "@PUMI_EXPORTED_TARGETS@") +foreach(target IN LISTS PUMI_EXPORTED_TARGETS) + if(NOT TARGET SCOREC::${target} AND TARGET PUMI::${target}) + get_target_property(target_type PUMI::${target} TYPE) + if(target_type STREQUAL "EXECUTABLE") + add_executable(SCOREC::${target} IMPORTED) + get_target_property(target_location PUMI::${target} IMPORTED_LOCATION) + set_target_properties(SCOREC::${target} PROPERTIES + IMPORTED_LOCATION "${target_location}" + ) + get_target_property(target_configs PUMI::${target} + IMPORTED_CONFIGURATIONS + ) + foreach(cfg IN LISTS target_configs) + get_target_property(target_location PUMI::${target} + IMPORTED_LOCATION_${cfg} + ) + set_target_properties(SCOREC::${target} PROPERTIES + IMPORTED_LOCATION_${cfg} "${target_location}" + ) + endforeach() + else() + add_library(SCOREC::${target} IMPORTED INTERFACE) + set_target_properties(SCOREC::${target} PROPERTIES + INTERFACE_LINK_LIBRARIES "PUMI::${target}" + ) + endif() + endif() +endforeach() + +cmake_policy(POP) From f2b48b44f4f23d60c73f0855f09eb0f8b9eef5fd Mon Sep 17 00:00:00 2001 From: Aiden Woodruff Date: Wed, 6 May 2026 21:34:32 -0400 Subject: [PATCH 18/18] be compatible with SCOREC_CXX_OPTIMIZE, etc. from bob - CMakeLists.txt: add compatibility with and deprecation notices for SCOREC_CXX_OPTIMIZE, SCOREC_CXX_SYMBOLS, SCOREC_CXX_WARNINGS, SCOREC_CXX_FLAGS, and SCOREC_EXTRA_CXX_FLAGS. Signed-off-by: Aiden Woodruff --- CMakeLists.txt | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 87d8f54dc..8b3185323 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,6 +59,41 @@ endif() # Set some default compiler flags that should always be used if(NOT USE_XSDK_DEFAULTS) bob_set_shared_libs() + if(SCOREC_CXX_OPTIMIZE) + message(DEPRECATION + "The SCOREC project is now called PUMI. Please update your" + "configuration to use the new name (i.e. PUMI_CXX_OPTIMIZE)." + ) + set(PUMI_CXX_OPTIMIZE ${SCOREC_CXX_OPTIMIZE}) + endif() + if(SCOREC_CXX_SYMBOLS) + message(DEPRECATION + "The SCOREC project is now called PUMI. Please update your" + "configuration to use the new name (i.e. PUMI_CXX_SYMBOLS)." + ) + set(PUMI_CXX_SYMBOLS ${SCOREC_CXX_SYMBOLS}) + endif() + if(SCOREC_CXX_WARNINGS) + message(DEPRECATION + "The SCOREC project is now called PUMI. Please update your" + "configuration to use the new name (i.e. PUMI_CXX_WARNINGS)." + ) + set(PUMI_CXX_WARNINGS ${SCOREC_CXX_WARNINGS}) + endif() + if(SCOREC_CXX_FLAGS) + message(DEPRECATION + "The SCOREC project is now called PUMI. Please update your" + "configuration to use the new name (i.e. PUMI_CXX_FLAGS)." + ) + set(PUMI_CXX_FLAGS ${SCOREC_CXX_FLAGS}) + endif() + if(SCOREC_EXTRA_CXX_FLAGS) + message(DEPRECATION + "The SCOREC project is now called PUMI. Please update your" + "configuration to use the new name (i.e. PUMI_EXTRA_CXX_FLAGS)." + ) + set(PUMI_EXTRA_CXX_FLAGS ${SCOREC_EXTRA_CXX_FLAGS}) + endif() bob_begin_cxx_flags() bob_end_cxx_flags() set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}")