From e3cfc28718c2d423c4089fc2398d2a92031c0a3e Mon Sep 17 00:00:00 2001 From: stefanhenneking Date: Tue, 18 Feb 2025 23:17:55 -0600 Subject: [PATCH 01/19] add ofstream.is_open() checks --- fem/datacollection.cpp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/fem/datacollection.cpp b/fem/datacollection.cpp index 6b59727487..0681b3157e 100644 --- a/fem/datacollection.cpp +++ b/fem/datacollection.cpp @@ -482,6 +482,8 @@ void VisItDataCollection::SaveRootFile() to_padded_string(cycle, pad_digits_cycle) + ".mfem_root"; std::ofstream root_file(root_name); + MFEM_VERIFY(root_file.is_open(), + "Failed to open ofstream " << root_name); root_file << GetVisItRootString(); if (!root_file) { @@ -912,7 +914,10 @@ void ParaViewDataCollection::Save() // Save the local part of the mesh and grid functions fields to the local // VTU file { - std::ofstream os(vtu_prefix + GenerateVTUFileName("proc", myid)); + std::string os_str = vtu_prefix + GenerateVTUFileName("proc", myid); + std::ofstream os(os_str); + MFEM_VERIFY(os.is_open(), + "Failed to open ofstream " << os_str); os.precision(precision); SaveDataVTU(os, levels_of_detail); } @@ -921,7 +926,10 @@ void ParaViewDataCollection::Save() for (const auto &qfield : q_field_map) { const std::string &field_name = qfield.first; - std::ofstream os(vtu_prefix + GenerateVTUFileName(field_name, myid)); + std::string os_str = vtu_prefix + GenerateVTUFileName(field_name, myid); + std::ofstream os(os_str); + MFEM_VERIFY(os.is_open(), + "Failed to open ofstream " << os_str); qfield.second->SaveVTU(os, pv_data_format, GetCompressionLevel(), field_name); } @@ -932,7 +940,10 @@ void ParaViewDataCollection::Save() { // Create the main PVTU file { - std::ofstream pvtu_out(vtu_prefix + GeneratePVTUFileName("data")); + std::string os_str = vtu_prefix + GeneratePVTUFileName("data"); + std::ofstream pvtu_out(os_str); + MFEM_VERIFY(pvtu_out.is_open(), + "Failed to open ofstream " << os_str); WritePVTUHeader(pvtu_out); // Grid function fields @@ -970,8 +981,10 @@ void ParaViewDataCollection::Save() const std::string &q_field_name = q_field.first; std::string q_fname = GeneratePVTUPath() + "/" + GeneratePVTUFileName(q_field_name); - - std::ofstream pvtu_out(col_path + "/" + q_fname); + std::string os_str = col_path + "/" + q_fname; + std::ofstream pvtu_out(os_str); + MFEM_VERIFY(pvtu_out.is_open(), + "Failed to open ofstream " << os_str); WritePVTUHeader(pvtu_out); int vec_dim = q_field.second->GetVDim(); pvtu_out << "\n"; From 7330aca4e614529affa895c6919d06d6075e12f4 Mon Sep 17 00:00:00 2001 From: "Stowell, Mark L." Date: Tue, 7 Apr 2026 21:04:13 -0400 Subject: [PATCH 02/19] Fixing typoes in lorentz miniapp test runs --- miniapps/electromagnetics/makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniapps/electromagnetics/makefile b/miniapps/electromagnetics/makefile index daea936647..2fa9e155d0 100644 --- a/miniapps/electromagnetics/makefile +++ b/miniapps/electromagnetics/makefile @@ -117,10 +117,10 @@ joule-test-par: joule lorentz-test-par: lorentz-test-1 lorentz-test-2 lorentz-test-1: lorentz volta-test-3 @$(call mfem-test,$<, $(RUN_MPI), Electromagnetic miniapp,\ - -er Volta-AMR-Parallel -ec 2 -npt 100 -xmin '0.0 0.0 0.0' -xmax '1.0 1.0 1.0' -pmin '1 0 0' -pmax '1 0 0' -rdf 0 -vt 0 -nt 100') + -er Volta-AMR-Parallel -ec 2 -npt 100 -xmin '0.0 0.0 0.0' -xmax '1.0 1.0 1.0' -pmin '1 0 0' -pmax '1 0 0' -rdf 0 -vt 0 -nt 100) lorentz-test-2: lorentz tesla-test-2 @$(call mfem-test,$<, $(RUN_MPI), Electromagnetic miniapp,\ - -br Tesla-AMR-Parallel -bc 2 -br Tesla-AMR-Parallel -npt 10 -xmin '0.0 0.0 0.0' -xmax '1.0 1.0 1.0' -pmin '0 0.1 0.05' -pmax '0 0.4 0.1' -nt 1000 -rdf 0 -vt 0) + -br Tesla-AMR-Parallel -bc 2 -npt 10 -xmin '0.0 0.0 0.0' -xmax '1.0 1.0 1.0' -pmin '0 0.1 0.05' -pmax '0 0.4 0.1' -nt 1000 -rdf 0 -vt 0) # Testing: "test" target and mfem-test* variables are defined in config/test.mk From 72f83edd535d4954244306f730813db3c635be34 Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Wed, 8 Apr 2026 18:41:57 -0700 Subject: [PATCH 03/19] Fix compiler warnings when GSLIB is enabled with some extra warning flags --- fem/gslib.cpp | 11 ++++++----- fem/gslib/findpts_local_2.cpp | 2 +- fem/gslib/findpts_local_3.cpp | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/fem/gslib.cpp b/fem/gslib.cpp index 176a356fbe..2db9112b96 100644 --- a/fem/gslib.cpp +++ b/fem/gslib.cpp @@ -490,7 +490,7 @@ void FindPointsGSLIB::FindPointsOnDevice(const Vector &point_pos, } DEV.find_device = true; - const int id = gsl_comm->id, np = gsl_comm->np; + const unsigned int id = gsl_comm->id, np = gsl_comm->np; gsl_mfem_ref.SetSize(points_cnt * dim); gsl_mfem_elem.SetSize(points_cnt); @@ -652,7 +652,7 @@ void FindPointsGSLIB::FindPointsOnDevice(const Vector &point_pos, { const int pp = hash_offset[i]; /* don't send back to where it just came from */ - if (pp == p->proc) + if (static_cast(pp) == p->proc) { continue; } @@ -1068,7 +1068,7 @@ void FindPointsGSLIB::InterpolateOnDevice(const Vector &field_in_evec, sarray_transfer(struct evalOutPt_t, &outpt, proc, 1, cr); opt = (evalOutPt_t *)outpt.ptr; - for (int index = 0; index < outpt.n; index++) + for (size_t index = 0; index < outpt.n; index++) { int idx = ordering == Ordering::byNODES ? opt->index + i*points_cnt : @@ -1413,7 +1413,7 @@ void FindPointsGSLIB::SetupSplitMeshesAndIntegrationRules(const int order) { MFEM_VERIFY(mesh, "Setup FindPointsGSLIB with mesh first."); const int dof1D = order+1; - const int dim = mesh->Dimension(); + dim = mesh->Dimension(); SetupSplitMeshes(); if (dim == 2) @@ -2254,7 +2254,8 @@ void FindPointsGSLIB::DistributeInterpolatedValues(const Vector &int_vals, sarray_transfer(struct out_pt, outpt, proc, 1, cr); // Store received data - MFEM_VERIFY(outpt->n == points_cnt, "Incompatible size. Number of points " + MFEM_VERIFY(outpt->n == static_cast(points_cnt), + "Incompatible size. Number of points " "received does not match the number of points originally " "found using FindPoints."); diff --git a/fem/gslib/findpts_local_2.cpp b/fem/gslib/findpts_local_2.cpp index 492e92c44a..5c4524b2c0 100644 --- a/fem/gslib/findpts_local_2.cpp +++ b/fem/gslib/findpts_local_2.cpp @@ -254,7 +254,7 @@ get_edge(const double *elx[2], const double *wtend, int ei, edge.dxdn[d] = workspace + (2 + d) * pN; //dxdn and dydn at DOFs along edge } - if (side_init != (1u << ei)) + if (static_cast(side_init) != (1u << ei)) { #define ELX(d, j, k) elx[d][j + k * pN] // assumes lexicographic ordering for (int d = 0; d < 2; ++d) diff --git a/fem/gslib/findpts_local_3.cpp b/fem/gslib/findpts_local_3.cpp index 089b494792..db0f69909d 100644 --- a/fem/gslib/findpts_local_3.cpp +++ b/fem/gslib/findpts_local_3.cpp @@ -294,7 +294,7 @@ get_face(const double *elx[3], const double *wtend, int fi, double *workspace, face.dxdn[d] = workspace+(3+d)*p_Nfr; } - if (side_init != (1u << fi)) + if (static_cast(side_init) != (1u << fi)) { const int e_stride[3] = {1, pN, pN*pN}; #define ELX(d, j, k, l) elx[d][j*e_stride[d1]+k*e_stride[d2]+l*e_stride[dn]] @@ -342,7 +342,7 @@ get_edge(const double *elx[3], const double *wtend, int ei, double *workspace, if (jidx >= 3*pN) { return edge; } - if (side_init != (64u << ei)) + if (static_cast(side_init) != (64u << ei)) { const int e_stride[3] = {1, pN, pN*pN}; #define ELX(d, j, k, l) elx[d][j*e_stride[de]+k*e_stride[dn1]+l*e_stride[dn2]] From 8e33891c07e27369ad30b5b61e7fc3b890867001 Mon Sep 17 00:00:00 2001 From: "Mittal, Ketan" Date: Tue, 14 Apr 2026 12:13:15 -0700 Subject: [PATCH 04/19] initial commit --- .gitlab/jobs/dane.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitlab/jobs/dane.yml b/.gitlab/jobs/dane.yml index 466bf2280f..387c763447 100644 --- a/.gitlab/jobs/dane.yml +++ b/.gitlab/jobs/dane.yml @@ -85,3 +85,8 @@ opt_par_gcc_10_pumi: extends: .mfem_job_on_dane variables: SPEC: "%gcc@10.3.1 +pumi" + +opt_par_gcc_10_gslib: + extends: .mfem_job_on_dane + variables: + SPEC: "%gcc@10.3.1 +gslib" From a545b94ad7e674c35e0f92f144a97b2c176e321f Mon Sep 17 00:00:00 2001 From: "Mittal, Ketan" Date: Thu, 16 Apr 2026 12:56:08 -0700 Subject: [PATCH 05/19] enable testing on matrix as well --- .gitlab/jobs/matrix.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitlab/jobs/matrix.yml b/.gitlab/jobs/matrix.yml index c21ce76b83..957f5bb1c1 100644 --- a/.gitlab/jobs/matrix.yml +++ b/.gitlab/jobs/matrix.yml @@ -63,3 +63,8 @@ opt_mpi_cuda_hypre_cuda_gcc: extends: .mfem_job_on_matrix variables: SPEC: "%gcc@10.3.1 +mpi +cuda cuda_arch=90 ^hypre+cuda" + +opt_mpi_cuda_gcc_gslib: + extends: .mfem_job_on_matrix + variables: + SPEC: "%gcc@10.3.1 +mpi +cuda +gslib cuda_arch=90" From abf5fedc5b2abcfb0091b55191c025f157a36ccc Mon Sep 17 00:00:00 2001 From: "Mittal, Ketan" Date: Thu, 16 Apr 2026 21:03:11 -0700 Subject: [PATCH 06/19] include hypre with cuda on matrix --- .gitlab/jobs/matrix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/jobs/matrix.yml b/.gitlab/jobs/matrix.yml index 957f5bb1c1..2b4cbbc951 100644 --- a/.gitlab/jobs/matrix.yml +++ b/.gitlab/jobs/matrix.yml @@ -67,4 +67,4 @@ opt_mpi_cuda_hypre_cuda_gcc: opt_mpi_cuda_gcc_gslib: extends: .mfem_job_on_matrix variables: - SPEC: "%gcc@10.3.1 +mpi +cuda +gslib cuda_arch=90" + SPEC: "%gcc@10.3.1 +mpi +cuda +gslib cuda_arch=90 ^hypre+cuda" From 3e31395f85af06513b5b1a7fc0f9cbcc5040d242 Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Tue, 21 Apr 2026 23:39:11 -0700 Subject: [PATCH 07/19] Fix another minor compiler warning. Update the CMake tests in miniapps/electromagnetics to match the makefile. --- miniapps/electromagnetics/CMakeLists.txt | 61 +++++++++++++++++++++--- tests/unit/fem/test_particleset.cpp | 2 +- 2 files changed, 56 insertions(+), 7 deletions(-) diff --git a/miniapps/electromagnetics/CMakeLists.txt b/miniapps/electromagnetics/CMakeLists.txt index c498a39625..9c5d9832b3 100644 --- a/miniapps/electromagnetics/CMakeLists.txt +++ b/miniapps/electromagnetics/CMakeLists.txt @@ -43,19 +43,39 @@ endif() # Add the corresponding tests to the "test" target if (MFEM_ENABLE_TESTING) - add_test(NAME tesla_np=4 + add_test(NAME tesla_1_np=${MFEM_MPI_NP} COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} ${MPIEXEC_PREFLAGS} $ -no-vis -maxit 2 -cr "0 0 -0.2 0 0 0.2 0.2 0.4 1" ${MPIEXEC_POSTFLAGS}) - - add_test(NAME volta_np=4 + add_test(NAME tesla_2_np=${MFEM_MPI_NP} COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} ${MPIEXEC_PREFLAGS} - $ -no-vis -maxit 2 -dbcs 1 -dbcg -ds "0.0 0.0 0.0 0.2 8.0" + $ + -no-vis -maxit 2 -m ../../data/inline-hex.mesh -ubbc "0 0 1" ${MPIEXEC_POSTFLAGS}) - add_test(NAME joule_np=4 + add_test(NAME volta_1_np=${MFEM_MPI_NP} + COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} + ${MPIEXEC_PREFLAGS} + $ + -no-vis -maxit 2 -dbcs 1 -dbcg -ds "0.0 0.0 0.0 0.2 8.0" + ${MPIEXEC_POSTFLAGS}) + add_test(NAME volta_2_np=${MFEM_MPI_NP} + COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} + ${MPIEXEC_PREFLAGS} + $ + -no-vis -maxit 2 -m ../../data/square-disc.mesh -dbcs "1 2 3 4 5 6 7 8" + -dbcv "0 0 0 0 1 1 1 1" + ${MPIEXEC_POSTFLAGS}) + add_test(NAME volta_3_np=${MFEM_MPI_NP} + COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} + ${MPIEXEC_PREFLAGS} + $ + -no-vis -maxit 2 -m ../../data/inline-hex.mesh -dbcs "1 6" -dbcv "0 1" + ${MPIEXEC_POSTFLAGS}) + + add_test(NAME joule_np=${MFEM_MPI_NP} COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} ${MPIEXEC_PREFLAGS} $ @@ -63,12 +83,41 @@ endif() ${MPIEXEC_POSTFLAGS}) if (MFEM_USE_DOUBLE) # otherwise returns MFEM_SKIP_RETURN_VALUE - add_test(NAME maxwell_np=4 + add_test(NAME maxwell_np=${MFEM_MPI_NP} COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} ${MPIEXEC_PREFLAGS} $ -no-vis -abcs "-1" -dp "-0.3 0.0 0.0 0.3 0.0 0.0 0.1 1 .5 .5" ${MPIEXEC_POSTFLAGS}) endif() + + if (MFEM_USE_GSLIB) + add_test(NAME lorentz_1_np=${MFEM_MPI_NP} + COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} + ${MPIEXEC_PREFLAGS} + $ + -no-vis -er Volta-AMR-Parallel -ec 2 -npt 100 -xmin "0.0 0.0 0.0" + -xmax "1.0 1.0 1.0" -pmin "1 0 0" -pmax "1 0 0" -rdf 0 -vt 0 -nt 100 + ${MPIEXEC_POSTFLAGS}) + # Setup dependency on volta_3_np= + set_tests_properties(volta_3_np=${MFEM_MPI_NP} + PROPERTIES FIXTURES_SETUP Volta3) + set_tests_properties(lorentz_1_np=${MFEM_MPI_NP} + PROPERTIES FIXTURES_REQUIRED Volta3) + + add_test(NAME lorentz_2_np=${MFEM_MPI_NP} + COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} + ${MPIEXEC_PREFLAGS} + $ + -no-vis -br Tesla-AMR-Parallel -bc 2 -npt 10 -xmin "0.0 0.0 0.0" + -xmax "1.0 1.0 1.0" -pmin "0 0.1 0.05" -pmax "0 0.4 0.1" -nt 1000 -rdf 0 + -vt 0 + ${MPIEXEC_POSTFLAGS}) + # Setup dependency on tesla_2_np= + set_tests_properties(tesla_2_np=${MFEM_MPI_NP} + PROPERTIES FIXTURES_SETUP Tesla2) + set_tests_properties(lorentz_2_np=${MFEM_MPI_NP} + PROPERTIES FIXTURES_REQUIRED Tesla2) + endif() endif() endif() diff --git a/tests/unit/fem/test_particleset.cpp b/tests/unit/fem/test_particleset.cpp index a6a11c0901..2ad6422d35 100644 --- a/tests/unit/fem/test_particleset.cpp +++ b/tests/unit/fem/test_particleset.cpp @@ -296,7 +296,7 @@ void TestRedistribute(Ordering::Type ordering) int wrong_proc_count = 0; for (int i = 0; i < procs.Size(); i++) { - if (rank != procs[i]) + if (static_cast(rank) != procs[i]) { wrong_proc_count++; } From 3415b0f3d4ff8d453835c329d19fdd503980ba0d Mon Sep 17 00:00:00 2001 From: "Mittal, Ketan" Date: Wed, 22 Apr 2026 12:26:45 -0700 Subject: [PATCH 08/19] run serial miniapps on 1 run when mfem is built with MPI --- miniapps/gslib/CMakeLists.txt | 12 ++++++++++-- miniapps/gslib/makefile | 7 ++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/miniapps/gslib/CMakeLists.txt b/miniapps/gslib/CMakeLists.txt index 8ee75a440e..c939be18c1 100644 --- a/miniapps/gslib/CMakeLists.txt +++ b/miniapps/gslib/CMakeLists.txt @@ -46,8 +46,16 @@ if (MFEM_USE_GSLIB) if (MFEM_ENABLE_TESTING) foreach (test "schwarz_ex1" "field-diff" "findpts" "field-interp") - add_test(NAME ${test} - COMMAND $ -no-vis) + if (MFEM_USE_MPI) + add_test(NAME ${test} + COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 1 + ${MPIEXEC_PREFLAGS} + $ -no-vis + ${MPIEXEC_POSTFLAGS}) + else() + add_test(NAME ${test} + COMMAND $ -no-vis) + endif() endforeach() endif() diff --git a/miniapps/gslib/makefile b/miniapps/gslib/makefile index a234deb1fd..834d8c28d2 100644 --- a/miniapps/gslib/makefile +++ b/miniapps/gslib/makefile @@ -83,11 +83,16 @@ include $(MFEM_TEST_MK) # Testing: Parallel vs. serial runs RUN_MPI = $(MFEM_MPIEXEC) $(MFEM_MPIEXEC_NP) $(MFEM_MPI_NP) +ifeq ($(MFEM_USE_MPI),YES) + RUN_MPI_SER = $(MFEM_MPIEXEC) $(MFEM_MPIEXEC_NP) 1 +else + RUN_MPI_SER = +endif TEST_NAME := GSLIB miniapp %-test-par: % @$(call mfem-test,$<, $(RUN_MPI), $(TEST_NAME)) %-test-seq: % - @$(call mfem-test,$<,, $(TEST_NAME)) + @$(call mfem-test,$<, $(RUN_MPI_SER), $(TEST_NAME)) # Testing: "test" target and mfem-test* variables are defined in config/test.mk From 383914db9a789b82c1ff40cbe1394de7ec84eca6 Mon Sep 17 00:00:00 2001 From: "Mittal, Ketan" Date: Thu, 23 Apr 2026 14:27:01 -0700 Subject: [PATCH 09/19] use MFEM's Mpi class to initialize instead of MPI_Init directly --- fem/gslib.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fem/gslib.cpp b/fem/gslib.cpp index 176a356fbe..1afdb35084 100644 --- a/fem/gslib.cpp +++ b/fem/gslib.cpp @@ -106,9 +106,7 @@ FindPointsGSLIB::FindPointsGSLIB() gsl_comm = new gslib::comm; cr = new gslib::crystal; #ifdef MFEM_USE_MPI - int initialized = 0; - MPI_Initialized(&initialized); - if (!initialized) { MPI_Init(NULL, NULL); } + if (!Mpi::IsInitialized()) { Mpi::Init(); } MPI_Comm comm = MPI_COMM_WORLD; comm_init(gsl_comm, comm); #else @@ -2623,9 +2621,7 @@ GSOPGSLIB::GSOPGSLIB(Array &ids) gsl_comm = new gslib::comm; cr = new gslib::crystal; #ifdef MFEM_USE_MPI - int initialized; - MPI_Initialized(&initialized); - if (!initialized) { MPI_Init(NULL, NULL); } + if (!Mpi::IsInitialized()) { Mpi::Init(); } MPI_Comm comm = MPI_COMM_WORLD; comm_init(gsl_comm, comm); #else From f37a5961733b2d7b760119a86b089e71d2b7e284 Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Mon, 27 Apr 2026 07:26:12 -0700 Subject: [PATCH 10/19] Fix a build issue: in the top makefile ensure miniapps/common is built before building miniapps/gslib. --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 0486c1917c..c4c44a7bac 100644 --- a/makefile +++ b/makefile @@ -130,7 +130,7 @@ MINIAPP_SUBDIRS = common electromagnetics meshing performance tools \ MINIAPP_DIRS := $(addprefix miniapps/,$(MINIAPP_SUBDIRS)) MINIAPP_TEST_DIRS := $(filter-out %/common,$(MINIAPP_DIRS)) MINIAPP_USE_COMMON := $(addprefix miniapps/,electromagnetics meshing tools \ - toys shifted dpg diag-smoothers fluids/navier plasma plasma/pic) + toys gslib shifted dpg diag-smoothers fluids/navier plasma plasma/pic) EM_DIRS = $(EXAMPLE_DIRS) $(MINIAPP_DIRS) From 0d3195e69bda778228fac344bc456c3dad5e6100 Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Tue, 28 Apr 2026 06:32:57 -0700 Subject: [PATCH 11/19] Fix issue #5314 and other tweaks. * 'make style' now checks if all git source files are selected for formatting. * In examples/makefile, propagate the target 'test-noclean' to subdirectories. * In miniapps/plasma/makefile, use logic similar to examples/makefile to propagate targets to subdirectories. * Other small fixes. --- examples/amgx/makefile | 2 +- examples/caliper/makefile | 6 ++--- examples/ginkgo/makefile | 2 +- examples/makefile | 7 ++++-- makefile | 42 +++++++++++++++++++++++++-------- miniapps/plasma/makefile | 45 +++++++++++++++++------------------- miniapps/plasma/pic/makefile | 7 +++--- 7 files changed, 67 insertions(+), 44 deletions(-) diff --git a/examples/amgx/makefile b/examples/amgx/makefile index 127b647d1e..6afb84baa7 100644 --- a/examples/amgx/makefile +++ b/examples/amgx/makefile @@ -64,7 +64,7 @@ PARALLEL_NAME := Parallel AMGX example $(MFEM_LIB_FILE): $(error The MFEM library is not build) -clean: clean-build +clean: clean-build clean-exec clean-build: rm -f *.o *~ $(SEQ_EXAMPLES) $(PAR_EXAMPLES) diff --git a/examples/caliper/makefile b/examples/caliper/makefile index ad6d805d7b..ffe20df7f4 100644 --- a/examples/caliper/makefile +++ b/examples/caliper/makefile @@ -64,12 +64,12 @@ ex1p-test-par: ex1p $(MFEM_LIB_FILE): $(error The MFEM library is not built) -clean: clean-build clean-exec $(SUBDIRS_CLEAN) +clean: clean-build clean-exec clean-build: rm -f *.o *~ $(SEQ_EXAMPLES) $(PAR_EXAMPLES) rm -rf *.dSYM *.TVD.*breakpoints clean-exec: - @rm -f refined.mesh displaced.mesh mesh.* ex5.mesh - @rm -f sphere_refined.* sol.* sol_u.* sol_p.* sol_r.* sol_i.* + @rm -f refined.mesh mesh.* + @rm -f sol.* diff --git a/examples/ginkgo/makefile b/examples/ginkgo/makefile index 22c593f8ee..d6634ffa42 100644 --- a/examples/ginkgo/makefile +++ b/examples/ginkgo/makefile @@ -76,4 +76,4 @@ clean-build: rm -rf *.dSYM *.TVD.*breakpoints clean-exec: - @rm -f refined.mesh sol.gf + @rm -f refined.mesh sol.gf mesh.* sol.* diff --git a/examples/makefile b/examples/makefile index 5cd6debc42..db7d73f4cb 100644 --- a/examples/makefile +++ b/examples/makefile @@ -71,6 +71,7 @@ endif SUBDIRS_ALL = $(addsuffix /all,$(SUBDIRS)) SUBDIRS_TEST = $(addsuffix /test,$(SUBDIRS)) +SUBDIRS_TEST_NOCLEAN = $(addsuffix /test-noclean,$(SUBDIRS)) SUBDIRS_CLEAN = $(addsuffix /clean,$(SUBDIRS)) SUBDIRS_TPRINT = $(addsuffix /test-print,$(SUBDIRS)) @@ -87,8 +88,9 @@ SUBDIRS_TPRINT = $(addsuffix /test-print,$(SUBDIRS)) all: $(EXAMPLES) $(SUBDIRS_ALL) -.PHONY: $(SUBDIRS_ALL) $(SUBDIRS_TEST) $(SUBDIRS_CLEAN) $(SUBDIRS_TPRINT) -$(SUBDIRS_ALL) $(SUBDIRS_TEST) $(SUBDIRS_CLEAN): +.PHONY: $(SUBDIRS_ALL) $(SUBDIRS_TEST) $(SUBDIRS_TEST_NOCLEAN) \ + $(SUBDIRS_CLEAN) $(SUBDIRS_TPRINT) +$(SUBDIRS_ALL) $(SUBDIRS_TEST) $(SUBDIRS_TEST_NOCLEAN) $(SUBDIRS_CLEAN): $(MAKE) -C $(@D) $(@F) $(SUBDIRS_TPRINT): @$(MAKE) -C $(@D) $(@F) @@ -107,6 +109,7 @@ endif MFEM_TESTS = EXAMPLES include $(MFEM_TEST_MK) test: $(SUBDIRS_TEST) +test-noclean: $(SUBDIRS_TEST_NOCLEAN) test-print: $(SUBDIRS_TPRINT) # Testing: Parallel vs. serial runs diff --git a/makefile b/makefile index c4c44a7bac..9c4397201d 100644 --- a/makefile +++ b/makefile @@ -123,15 +123,20 @@ EXAMPLE_SUBDIRS = amgx caliper ginkgo hiop petsc pumi sundials superlu moonolith EXAMPLE_DIRS := examples $(addprefix examples/,$(EXAMPLE_SUBDIRS)) EXAMPLE_TEST_DIRS := examples -MINIAPP_SUBDIRS = common electromagnetics meshing performance tools \ +MINIAPP_ALL_SUBDIRS = common electromagnetics meshing performance tools \ toys nurbs gslib adjoint solvers shifted mtop parelag tribol autodiff dfem \ hooke multidomain dpg hdiv-linear-solver spde diag-smoothers contact \ fluids/navier fluids/schrodinger-flow plasma plasma/pic +MINIAPP_RECURSIVE_SUBDIRS = plasma/pic +MINIAPP_SUBDIRS := $(filter-out \ + $(MINIAPP_RECURSIVE_SUBDIRS),$(MINIAPP_ALL_SUBDIRS)) +MINIAPP_ALL_DIRS := $(addprefix miniapps/,$(MINIAPP_ALL_SUBDIRS)) MINIAPP_DIRS := $(addprefix miniapps/,$(MINIAPP_SUBDIRS)) MINIAPP_TEST_DIRS := $(filter-out %/common,$(MINIAPP_DIRS)) MINIAPP_USE_COMMON := $(addprefix miniapps/,electromagnetics meshing tools \ toys gslib shifted dpg diag-smoothers fluids/navier plasma plasma/pic) +EM_ALL_DIRS = $(EXAMPLE_DIRS) $(MINIAPP_ALL_DIRS) EM_DIRS = $(EXAMPLE_DIRS) $(MINIAPP_DIRS) TEST_SUBDIRS = unit @@ -146,7 +151,7 @@ MFEM_BUILD_DIR ?= . BUILD_DIR := $(MFEM_BUILD_DIR) BUILD_REAL_DIR := $(abspath $(BUILD_DIR)) ifneq ($(BUILD_REAL_DIR),$(MFEM_REAL_DIR)) - BUILD_SUBDIRS = $(DIRS) config $(EM_DIRS) doc $(TEST_DIRS) + BUILD_SUBDIRS = $(DIRS) config $(EM_ALL_DIRS) doc $(TEST_DIRS) CONFIG_FILE_DEF = -DMFEM_CONFIG_FILE='"$(BUILD_REAL_DIR)/config/_config.hpp"' BLD := $(if $(BUILD_REAL_DIR:$(CURDIR)=),$(BUILD_DIR)/,) $(if $(word 2,$(BLD)),$(error Spaces in BLD = "$(BLD)" are not supported)) @@ -483,10 +488,10 @@ $(OBJECT_FILES): $(BLD)%.o: $(SRC)%.cpp $(CONFIG_MK) all: examples miniapps $(TEST_DIRS) -.PHONY: miniapps $(EM_DIRS) $(TEST_DIRS) +.PHONY: miniapps $(EM_ALL_DIRS) $(TEST_DIRS) miniapps: $(MINIAPP_DIRS) $(MINIAPP_USE_COMMON): miniapps/common -$(EM_DIRS) $(TEST_DIRS): lib +$(EM_ALL_DIRS) $(TEST_DIRS): lib $(MAKE) -C $(BLD)$(@) .PHONY: doc @@ -694,7 +699,7 @@ local-config: .PHONY: build-config build-config: for d in $(BUILD_SUBDIRS); do mkdir -p $(BLD)$${d}; done - for dir in "" $(addsuffix /,config $(EM_DIRS) doc $(TEST_DIRS)); do \ + for dir in "" $(addsuffix /,config $(EM_ALL_DIRS) doc $(TEST_DIRS)); do\ printf "# Auto-generated file.\n%s\n%s\n" \ "MFEM_DIR = $(MFEM_REAL_DIR)" \ "include \$$(MFEM_DIR)/$${dir}makefile" \ @@ -796,13 +801,15 @@ status info: ASTYLE = $(ASTYLE_BIN) --options=$(SRC)config/mfem.astylerc ASTYLE_VER = "Artistic Style Version 3.1" -FORMAT_FILES = $(foreach dir,$(DIRS) $(EM_DIRS) config,$(dir)/*.?pp) +FORMAT_FILES = $(foreach dir,$(DIRS) $(EM_ALL_DIRS) config,$(dir)/*.?pp) TESTS_SUBDIRS = unit benchmarks convergence mem_manager par-mesh-format -UNIT_TESTS_SUBDIRS = general linalg mesh fem miniapps ceed enzyme -MINIAPPS_SUBDIRS = dpg/util hooke/operators hooke/preconditioners hooke/materials hooke/kernels +UNIT_TESTS_SUBDIRS = general linalg mesh fem miniapps ceed enzyme dfem +MINIAPPS_SUBDIRS = dpg/util hooke/operators hooke/preconditioners \ + hooke/materials hooke/kernels FORMAT_FILES += $(foreach dir,$(TESTS_SUBDIRS),tests/$(dir)/*.?pp) FORMAT_FILES += $(foreach dir,$(UNIT_TESTS_SUBDIRS),tests/unit/$(dir)/*.?pp) FORMAT_FILES += $(foreach dir,$(MINIAPPS_SUBDIRS),miniapps/$(dir)/*.?pp) +FORMAT_FILES += config/cmake/config.hpp.in config/config.hpp.in mfem*.hpp FORMAT_EXCLUDE = general/tinyxml2.cpp tests/unit/catch.hpp FORMAT_LIST = $(filter-out $(FORMAT_EXCLUDE),$(wildcard $(FORMAT_FILES))) @@ -833,14 +840,29 @@ mfem_check_command = \ # Verify the C++ code styling in MFEM and check that std::cout and std::cerr are # not used in the library (use mfem::out and mfem::err instead). style: - @echo "Applying C++ code style..." @astyle_version="$$($(ASTYLE_BIN) --version)";\ if [ "$$astyle_version" != $(ASTYLE_VER) ]; then\ printf "%s\n" "Invalid astyle version: '$$astyle_version'"\ "Please use: '"$(ASTYLE_VER)"'";\ exit 1;\ fi - @err_code=0;\ + @err_code=0; \ + if command -v git 2>&1 > /dev/null && [ -d $(MFEM_DIR)/.git ]; then \ + echo "Checking if all git files are selected for formatting ..."; \ + ls -1 $(FORMAT_FILES) | sort > format-files-make.txt; \ + git -C $(MFEM_DIR) ls-files '*.[ch]pp*' | sort \ + > format-files-git.txt; \ + cat format-files-make.txt format-files-git.txt | sort | uniq \ + > format-files-make-plus-git.txt; \ + rm -f format-files-git.txt; \ + $(call mfem_check_command,\ + diff format-files-make.txt format-files-make-plus-git.txt | \ + grep "^> ",\ + "All git files are selected for formatting",\ + "The above git files are NOT selected for formatting"); \ + rm -f format-files-make.txt format-files-make-plus-git.txt; \ + fi; \ + echo "Applying C++ code style...";\ $(call mfem_check_command,\ $(ASTYLE) $(FORMAT_LIST) | grep Formatted,\ "No source files were changed",\ diff --git a/miniapps/plasma/makefile b/miniapps/plasma/makefile index 9d06843c90..9a8f7d65aa 100644 --- a/miniapps/plasma/makefile +++ b/miniapps/plasma/makefile @@ -28,6 +28,12 @@ endif PLASMA_SUBDIRS = pic +SUBDIRS_ALL = $(addsuffix /all,$(PLASMA_SUBDIRS)) +SUBDIRS_TEST = $(addsuffix /test,$(PLASMA_SUBDIRS)) +SUBDIRS_TEST_NOCLEAN = $(addsuffix /test-noclean,$(PLASMA_SUBDIRS)) +SUBDIRS_CLEAN = $(addsuffix /clean,$(PLASMA_SUBDIRS)) +SUBDIRS_TPRINT = $(addsuffix /test-print,$(PLASMA_SUBDIRS)) + .SUFFIXES: .SUFFIXES: .o .cpp .mk .PHONY: all lib-common clean clean-build clean-exec @@ -37,31 +43,24 @@ COMMON_LIB = -L$(MFEM_BUILD_DIR)/miniapps/common -lmfem-common # If MFEM_SHARED is set, add the ../common rpath COMMON_LIB += $(if $(MFEM_SHARED:YES=),,\ - $(if $(MFEM_USE_CUDA:YES=),$(CXX_XLINKER),$(CUDA_XLINKER))-rpath,$(abspath\ - $(MFEM_BUILD_DIR)/miniapps/common)) - -COMMON_O= + $(MFEM_XLINKER)-rpath,$(abspath $(MFEM_BUILD_DIR)/miniapps/common)) # Remove built-in rules %: %.cpp %.o: %.cpp -all: $(MINIAPPS) subdirs +all: $(MINIAPPS) $(SUBDIRS_ALL) -.PHONY: subdirs $(PLASMA_SUBDIRS) -subdirs: $(PLASMA_SUBDIRS) -$(PLASMA_SUBDIRS): lib-common - $(MAKE) -C $(BLD)$(@) +.PHONY: $(SUBDIRS_ALL) $(SUBDIRS_TEST) $(SUBDIRS_TEST_NOCLEAN) \ + $(SUBDIRS_CLEAN) $(SUBDIRS_TPRINT) +$(SUBDIRS_ALL) $(SUBDIRS_TEST) $(SUBDIRS_TEST_NOCLEAN) $(SUBDIRS_CLEAN): + $(MAKE) -C $(@D) $(@F) +$(SUBDIRS_TPRINT): + @$(MAKE) -C $(@D) $(@F) # Rules for building the miniapps -%: $(SRC)%.cpp $(COMMON_O) $(MFEM_LIB_FILE) $(CONFIG_MK) | lib-common - $(MFEM_CXX) $(MFEM_LINK_FLAGS) $< -o $@ $(COMMON_O) $(COMMON_LIB) \ - $(MFEM_LIBS) - -# Rules for compiling miniapp dependencies -$(COMMON_O) $(addsuffix _solver.o,$(MINIAPPS)): \ -%.o: $(SRC)%.cpp $(SRC)%.hpp $(CONFIG_MK) - $(MFEM_CXX) $(MFEM_FLAGS) -c $(<) -o $(@) +%: $(SRC)%.cpp $(MFEM_LIB_FILE) $(CONFIG_MK) | lib-common + $(MFEM_CXX) $(MFEM_LINK_FLAGS) $< -o $@ $(COMMON_LIB) $(MFEM_LIBS) # Rule for building lib-common lib-common: @@ -69,6 +68,9 @@ lib-common: MFEM_TESTS = MINIAPPS include $(MFEM_TEST_MK) +test: $(SUBDIRS_TEST) +test-noclean: $(SUBDIRS_TEST_NOCLEAN) +test-print: $(SUBDIRS_TPRINT) # Testing: Specific execution options RUN_MPI = $(MFEM_MPIEXEC) $(MFEM_MPIEXEC_NP) $(MFEM_MPI_NP) @@ -79,14 +81,9 @@ RUN_MPI = $(MFEM_MPIEXEC) $(MFEM_MPIEXEC_NP) $(MFEM_MPI_NP) $(MFEM_LIB_FILE): $(error The MFEM library is not built) -ALL_CLEAN_SUBDIRS = $(addsuffix /clean,$(PLASMA_SUBDIRS)) -.PHONY: $(ALL_CLEAN_SUBDIRS) -$(ALL_CLEAN_SUBDIRS): - $(MAKE) -C $(BLD)$(@D) $(@F) +clean: clean-build clean-exec $(SUBDIRS_CLEAN) -clean: clean-build clean-exec - -clean-build: $(addsuffix /clean,$(PLASMA_SUBDIRS)) +clean-build: rm -f *.o *~ $(SEQ_MINIAPPS) $(PAR_MINIAPPS) rm -rf *.dSYM *.TVD.*breakpoints diff --git a/miniapps/plasma/pic/makefile b/miniapps/plasma/pic/makefile index fb0804519b..dae795e827 100644 --- a/miniapps/plasma/pic/makefile +++ b/miniapps/plasma/pic/makefile @@ -20,6 +20,7 @@ CONFIG_MK = $(or $(wildcard $(MFEM_BUILD_DIR)/config/config.mk),\ MFEM_LIB_FILE = mfem_is_not_built -include $(CONFIG_MK) +SEQ_MINIAPPS = PAR_MINIAPPS = ifeq ($(MFEM_USE_GSLIB),YES) @@ -27,9 +28,9 @@ ifeq ($(MFEM_USE_GSLIB),YES) endif ifeq ($(MFEM_USE_MPI),NO) - MINIAPPS = + MINIAPPS = $(SEQ_MINIAPPS) else - MINIAPPS = $(PAR_MINIAPPS) + MINIAPPS = $(PAR_MINIAPPS) $(SEQ_MINIAPPS) endif .SUFFIXES: @@ -50,7 +51,7 @@ COMMON_LIB += $(if $(MFEM_SHARED:YES=),,\ all: $(MINIAPPS) # Rules for building the miniapps -electrostatic-pic: electrostatic-pic.cpp $(MFEM_LIB_FILE) $(CONFIG_MK) | lib-common +%: $(SRC)%.cpp $(MFEM_LIB_FILE) $(CONFIG_MK) | lib-common $(MFEM_CXX) $(MFEM_FLAGS) -c $< $(MFEM_CXX) $(MFEM_LINK_FLAGS) -o $@ $@.o $(COMMON_LIB) $(MFEM_LIBS) From 1ccc27226a7388ab1ec5a5b729a0aadbe28a8fdf Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Wed, 29 Apr 2026 10:54:49 -0700 Subject: [PATCH 12/19] Fix a CMake test of libCEED --- examples/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index a15beb6b4d..07ae762066 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -215,7 +215,7 @@ if (MFEM_ENABLE_TESTING) add_test(NAME ex1p_ceed_np=${MFEM_MPI_NP} COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MFEM_MPI_NP} ${MPIEXEC_PREFLAGS} - $ "-no-vis" "-d ceed-cpu" "-pa" "-a" + $ "-no-vis" "-d" "ceed-cpu" "-pa" "-a" ${MPIEXEC_POSTFLAGS}) endif() endif() From 9f3f5c03724bb1add8afe9d92107df0a65482ed1 Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Thu, 30 Apr 2026 11:36:56 -0700 Subject: [PATCH 13/19] Suggested AI policy --- CHANGELOG | 2 ++ CONTRIBUTING.md | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 646c238124..80f0c5626f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -27,6 +27,8 @@ Discretization improvements Version 4.9.1 (development) =========================== +- Policy for AI-assisted contribution added to CONTRIBUTING.md + Discretization improvements --------------------------- - Improved the gridfunction projection routines. Projections work for Scalar, diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3126a28f63..f476fa49cc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,6 +24,10 @@ must be made under this license. Note also that MFEM has a [Code of Conduct](CODE_OF_CONDUCT.md). By participating in the MFEM community, you agree to abide by its rules. +## AI Policy +- Use of AI in MFEM PRs is allowed, but should be disclosed by selecting the `AI-assisted` label. +- We expect that PR authors have reviewed, tested and understand the changes they are proposing. + If you plan on contributing to MFEM, consider reviewing the [issue tracker](https://github.com/mfem/mfem/issues) first to check if a thread already exists for your desired feature or the bug you ran into. Use a pull From de1dea610ec5a0081a1102fd905ef8bc11503853 Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Mon, 27 Apr 2026 08:51:00 -0700 Subject: [PATCH 14/19] AI policy updates based on feedback --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f476fa49cc..109903ccb0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,7 @@ Note also that MFEM has a [Code of Conduct](CODE_OF_CONDUCT.md). By participatin in the MFEM community, you agree to abide by its rules. ## AI Policy -- Use of AI in MFEM PRs is allowed, but should be disclosed by selecting the `AI-assisted` label. +- Use of AI code generation in MFEM is allowed but must be disclosed by selecting the `AI-assisted` label on the PR. - We expect that PR authors have reviewed, tested and understand the changes they are proposing. If you plan on contributing to MFEM, consider reviewing the From 67025d49fff402f3e10626f56ef32ffa106f9e23 Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Mon, 27 Apr 2026 09:39:28 -0700 Subject: [PATCH 15/19] AI policy updates based on feedback --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 109903ccb0..d1b79d2e89 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,7 +26,8 @@ in the MFEM community, you agree to abide by its rules. ## AI Policy - Use of AI code generation in MFEM is allowed but must be disclosed by selecting the `AI-assisted` label on the PR. -- We expect that PR authors have reviewed, tested and understand the changes they are proposing. +- By submitting a PR, the author acknowledges that they have reviewed and understand the changes they are proposing. +- PR authors are fully responsible for correctness, licensing, and attribution of all changes. If you plan on contributing to MFEM, consider reviewing the [issue tracker](https://github.com/mfem/mfem/issues) first to check if a thread From 8ed259be31d336889198ae7d6b014c1fef6f8eca Mon Sep 17 00:00:00 2001 From: Tzanio Kolev Date: Thu, 30 Apr 2026 09:22:09 -0700 Subject: [PATCH 16/19] Update CONTRIBUTING.md Co-authored-by: Veselin Dobrev --- CONTRIBUTING.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d1b79d2e89..a3d2c17eac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,9 +25,12 @@ Note also that MFEM has a [Code of Conduct](CODE_OF_CONDUCT.md). By participatin in the MFEM community, you agree to abide by its rules. ## AI Policy -- Use of AI code generation in MFEM is allowed but must be disclosed by selecting the `AI-assisted` label on the PR. -- By submitting a PR, the author acknowledges that they have reviewed and understand the changes they are proposing. -- PR authors are fully responsible for correctness, licensing, and attribution of all changes. +- Use of AI code generation in MFEM is allowed but must be disclosed, e.g. by + selecting the `AI-assisted` label on the PR. +- By submitting a PR, the author acknowledges that they have reviewed and + understand the changes they are proposing. +- PR authors are still responsible for correctness, licensing, and attribution + of all changes. If you plan on contributing to MFEM, consider reviewing the [issue tracker](https://github.com/mfem/mfem/issues) first to check if a thread From 476c148949c62bf51ff7092121bc2c5e2a2ea5d9 Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Fri, 1 May 2026 09:13:40 -0700 Subject: [PATCH 17/19] Adjust the number of build tasks in dane-baseline.yml --- .gitlab/dane-baseline.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab/dane-baseline.yml b/.gitlab/dane-baseline.yml index 7230dac511..fdf3e5ecb2 100644 --- a/.gitlab/dane-baseline.yml +++ b/.gitlab/dane-baseline.yml @@ -54,8 +54,9 @@ baselinecheck_mfem_intel_dane: - echo "AUTOTEST_ROOT=$AUTOTEST_ROOT" - echo ${BUILD_ROOT} - echo ${TPLS_DIR} - # Used by the tests in MFEM/tests, dane has 224 threads/node: - - export MFEM_TEST_NP=192 + # Used by the tests in MFEM/tests, dane has 224 threads/node. + # Use less build tasks because of icpc crashes due to OOM: + - export MFEM_TEST_NP=96 # The next script uses the following environment variables: # * BASELINE_TEST, SYS_TYPE, CI_PROJECT_DIR, ARTIFACTS_DIR, # * BUILD_ROOT, TPLS_DIR, MACHINE_NAME From 26b2aa5cea1e863f9c32f8f8e0afbe7232d6b4a0 Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Fri, 1 May 2026 11:10:09 -0700 Subject: [PATCH 18/19] In .gitlab/scripts/baseline, use srun to run scripts since salloc does NOT run the script in the allocation as does srun. Revert the change in the number of build tasks in dane-baseline.yml. --- .gitlab/dane-baseline.yml | 5 ++--- .gitlab/scripts/baseline | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitlab/dane-baseline.yml b/.gitlab/dane-baseline.yml index fdf3e5ecb2..7230dac511 100644 --- a/.gitlab/dane-baseline.yml +++ b/.gitlab/dane-baseline.yml @@ -54,9 +54,8 @@ baselinecheck_mfem_intel_dane: - echo "AUTOTEST_ROOT=$AUTOTEST_ROOT" - echo ${BUILD_ROOT} - echo ${TPLS_DIR} - # Used by the tests in MFEM/tests, dane has 224 threads/node. - # Use less build tasks because of icpc crashes due to OOM: - - export MFEM_TEST_NP=96 + # Used by the tests in MFEM/tests, dane has 224 threads/node: + - export MFEM_TEST_NP=192 # The next script uses the following environment variables: # * BASELINE_TEST, SYS_TYPE, CI_PROJECT_DIR, ARTIFACTS_DIR, # * BUILD_ROOT, TPLS_DIR, MACHINE_NAME diff --git a/.gitlab/scripts/baseline b/.gitlab/scripts/baseline index 0922656b99..c96d0b70c7 100755 --- a/.gitlab/scripts/baseline +++ b/.gitlab/scripts/baseline @@ -32,9 +32,9 @@ mkdir _${BASELINE_TEST} && cd _${BASELINE_TEST} # run if [[ "${MACHINE_NAME}" == "dane" ]]; then - salloc --nodes=1 -t 60 --exclusive --reservation=ci ../runtest ../../mfem "${BASELINE_TEST} ${TPLS_DIR}" + srun --nodes=1 -t 60 --exclusive --reservation=ci ../runtest ../../mfem "${BASELINE_TEST} ${TPLS_DIR}" elif [[ ${MACHINE_NAME} == "corona" ]]; then - salloc --nodes=1 -t 60 -p pbatch ../runtest ../../mfem "${BASELINE_TEST} ${TPLS_DIR}" + srun --nodes=1 -t 60 -p pbatch ../runtest ../../mfem "${BASELINE_TEST} ${TPLS_DIR}" else echo "Unknown machine: MACHINE_NAME=$MACHINE_NAME" exit 1 From e32ea54e00c3db20ba61b91de0d866b36038cd8e Mon Sep 17 00:00:00 2001 From: "Mittal, Ketan" Date: Mon, 4 May 2026 14:11:52 -0700 Subject: [PATCH 19/19] fix changelog --- CHANGELOG | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 646c238124..93c6d3599b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,8 +8,8 @@ https://mfem.org -Version 4.10 (development) -========================== +Version 4.9.1 (development) +=========================== Discretization improvements --------------------------- @@ -23,12 +23,6 @@ Discretization improvements Tet rules (d=14-20): Chuluunbaatar et al., Comput. Math. Appl. 124:89-97, 2022. - -Version 4.9.1 (development) -=========================== - -Discretization improvements ---------------------------- - Improved the gridfunction projection routines. Projections work for Scalar, Vector and VectorFE, also NURBS versions. Optionally different types of projections can be selected, default behaviour has not changed.