diff --git a/.github/workflows/build-and-test-linux.yml b/.github/workflows/build-and-test-linux.yml index e065c82d6..9730c8f86 100644 --- a/.github/workflows/build-and-test-linux.yml +++ b/.github/workflows/build-and-test-linux.yml @@ -93,12 +93,15 @@ jobs: - uses: actions/checkout@v4 with: submodules: 'recursive' - + - name: Configure GNU Compilers + run: | + sudo update-alternatives --install $(which gcc) gcc $(which gcc-12) 999 \ + --slave $(which g++) g++ $(which g++-12) \ + --slave $(which gfortran) gfortran $(which gfortran-12) - name: Configure Open MPI if: matrix.mpi == 'openmpi' run: | sudo apt-get install -y openmpi-bin libopenmpi-dev - - name: Configure MPICH if: matrix.mpi == 'mpich' run: | @@ -160,12 +163,12 @@ jobs: elif [[ "${{ matrix.compiler }}" == 'clang' ]]; then export CC=clang export CXX=clang++ - export FC=gfortran-12 + export FC=gfortran export LDFLAGS='-fuse-ld=lld' elif [[ "${{ matrix.compiler }}" == 'gcc' ]]; then - export CC=gcc-12 - export CXX=g++-12 - export FC=gfortran-12 + export CC=gcc + export CXX=g++ + export FC=gfortran fi if [[ "${{ matrix.math-libs }}" == 'aocl' ]]; then export AOCLROOT=/opt/AMD/aocl/aocl-linux-gcc-4.1.0/gcc diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ef2e6f99..cacb2586e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -168,10 +168,10 @@ test-build-aocl: script: # Install AMD Optimizing CPU Libraries (AOCL) - apt-get install -y libmpich-dev - - wget https://download.amd.com/developer/eula/aocl/aocl-4-1/aocl-linux-gcc-4.1.0_1_amd64.deb - - apt-get install -y ./aocl-linux-gcc-4.1.0_1_amd64.deb + - wget https://download.amd.com/developer/eula/aocl/aocl-5-0/aocl-linux-gcc-5.0.0_1_amd64.deb + - apt-get install -y ./aocl-linux-gcc-5.0.0_1_amd64.deb - rm aocl-linux-gcc-*.deb - - export AOCLROOT=/opt/AMD/aocl/aocl-linux-gcc-4.1.0/gcc + - export AOCLROOT=/opt/AMD/aocl/aocl-linux-gcc-5.0.0/gcc - export LD_LIBRARY_PATH=$AOCLROOT/lib:$LD_LIBRARY_PATH - mkdir build && cd build - cmake .. diff --git a/cmake/ExternalGitTags.cmake b/cmake/ExternalGitTags.cmake index c6aaabb78..ae6395520 100644 --- a/cmake/ExternalGitTags.cmake +++ b/cmake/ExternalGitTags.cmake @@ -34,7 +34,7 @@ set(EXTERN_BUTTERFLYPACK_GIT_BRANCH "Git branch for external ButterflyPACK build" ) set(EXTERN_BUTTERFLYPACK_GIT_TAG - "cbde1bb675a5bd74b778eb29f6b9dacc0607542c" CACHE STRING + "3ea057d9c00b319c854361e8d38b18f80b35d09c" CACHE STRING "Git tag for external ButterflyPACK build" ) @@ -48,7 +48,7 @@ set(EXTERN_GSLIB_GIT_BRANCH "Git branch for external GSLIB build" ) set(EXTERN_GSLIB_GIT_TAG - "d5d4ee04ad4d32bebfef730a3608cbe988223dbd" CACHE STRING + "95acf5b42301d6cb48fda88d662f1d784b863089" CACHE STRING "Git tag for external GSLIB build" ) @@ -62,7 +62,7 @@ set(EXTERN_HYPRE_GIT_BRANCH "Git branch for external HYPRE build" ) set(EXTERN_HYPRE_GIT_TAG - "aa1f66d633b144eae83edf89937d2316d2d63268" CACHE STRING + "e5f4984ea0cceb897d3d29516988f38996d7d07d" CACHE STRING "Git tag for external HYPRE build" ) @@ -76,7 +76,7 @@ set(EXTERN_LIBCEED_GIT_BRANCH "Git branch for external libCEED build" ) set(EXTERN_LIBCEED_GIT_TAG - "be8d6f551b0f7f956d1f45b9192fb65aa4e4d3da" CACHE STRING + "5a7f61ca9ae98f99006c9d3babed48bcc256dfea" CACHE STRING "Git tag for external libCEED build" ) @@ -90,13 +90,13 @@ set(EXTERN_LIBXSMM_GIT_BRANCH "Git branch for external LIBXSMM build" ) set(EXTERN_LIBXSMM_GIT_TAG - "bbc71343595f9b71664d0985b02e87e0654c8cdc" CACHE STRING + "b4514e4c52b6c735c30700992b1966e7c9dcdcae" CACHE STRING "Git tag for external LIBXSMM build" ) # MAGMA set(EXTERN_MAGMA_URL - "https://bitbucket.org/icl/magma.git" CACHE STRING + "https://github.com/icl-utk-edu/magma.git" CACHE STRING "URL for external MAGMA build" ) set(EXTERN_MAGMA_GIT_BRANCH @@ -104,7 +104,7 @@ set(EXTERN_MAGMA_GIT_BRANCH "Git branch for external MAGMA build" ) set(EXTERN_MAGMA_GIT_TAG - "4917e80ca559d0e0d4fdb56abfca381639f9b821" CACHE STRING + "95903129f839bb401d9d9c53bd3d8e1b5e14c238" CACHE STRING "Git tag for external MAGMA build" ) @@ -132,7 +132,7 @@ set(EXTERN_MFEM_GIT_BRANCH "Git branch for external MFEM build" ) set(EXTERN_MFEM_GIT_TAG - "7c1a0eb5e3f70ff9d161c9d6e3f228ba2513acca" CACHE STRING + "e2a20d381c3e180d77cd2ad32df30580f42c261b" CACHE STRING "Git tag for external MFEM build" ) @@ -146,7 +146,7 @@ set(EXTERN_MUMPS_GIT_BRANCH "Git branch for external MUMPS build" ) set(EXTERN_MUMPS_GIT_TAG - "1324a3358aae44279b6af4630609956f06131d6f" CACHE STRING + "0f50568b2fbd88413774d2ce1c88ab3851b24abe" CACHE STRING "Git tag for external MUMPS build" ) @@ -174,7 +174,7 @@ set(EXTERN_PETSC_GIT_BRANCH "Git branch for external PETSc build" ) set(EXTERN_PETSC_GIT_TAG - "2ad7182b1093845a8c26c56c2f6611a55c3328ce" CACHE STRING + "ba43b2edcffc84c955e282b517bbd116334b0005" CACHE STRING "Git tag for external PETSc build" ) @@ -202,7 +202,7 @@ set(EXTERN_SLEPC_GIT_BRANCH "Git branch for external SLEPc build" ) set(EXTERN_SLEPC_GIT_TAG - "89b995ba7ee626d15a64b368ee92d6d4a4f6d6fb" CACHE STRING + "616e8b6ac8dbb41a1dc314e5c099b8af246c688d" CACHE STRING "Git tag for external SLEPc build" ) @@ -216,7 +216,7 @@ set(EXTERN_STRUMPACK_GIT_BRANCH "Git branch for external STRUMPACK build" ) set(EXTERN_STRUMPACK_GIT_TAG - "9a45f304f21e1d9c44c6fa50ac2f044ab15cf342" CACHE STRING + "115b152be9a5d0d77846e3694f699c53c93fe394" CACHE STRING "Git tag for external STRUMPACK build" ) @@ -230,7 +230,7 @@ set(EXTERN_SUPERLU_GIT_BRANCH "Git branch for external SuperLU_DIST build" ) set(EXTERN_SUPERLU_GIT_TAG - "b3193e8615b5364f4e5650297d9e2aaf2e49c909" CACHE STRING + "fe0e4e8968c58309fd75b4d6999580c44fffc26d" CACHE STRING "Git tag for external SuperLU_DIST build" ) @@ -244,7 +244,7 @@ set(EXTERN_ZFP_GIT_BRANCH "Git branch for external ZFP build" ) set(EXTERN_ZFP_GIT_TAG - "a46fa8b91bf2d69f4ffcf04af4f908383828ba79" CACHE STRING + "71490d236e29af2968dc9e11f14cb46af37f1dd3" CACHE STRING "Git tag for external ZFP build" ) @@ -276,6 +276,6 @@ set(EXTERN_SUNDIALS_GIT_BRANCH "Git branch for external SUNDIALS build" ) set(EXTERN_SUNDIALS_GIT_TAG - "aaeab8d907c6b7dfca86041401fdc1448f35f826" CACHE STRING + "0eff39663606f2ff280c4059a947ed62ae38180a" CACHE STRING "Git tag for external SUNDIALS build" ) \ No newline at end of file diff --git a/cmake/ExternalMFEM.cmake b/cmake/ExternalMFEM.cmake index 459bded4f..b75786fa4 100644 --- a/cmake/ExternalMFEM.cmake +++ b/cmake/ExternalMFEM.cmake @@ -388,6 +388,7 @@ set(MFEM_PATCH_FILES "${CMAKE_SOURCE_DIR}/extern/patch/mfem/patch_mesh_prism_vtu_fix.diff" "${CMAKE_SOURCE_DIR}/extern/patch/mfem/patch_par_tet_mesh_fix_dev.diff" "${CMAKE_SOURCE_DIR}/extern/patch/mfem/patch_gmsh_parser_performance.diff" + "${CMAKE_SOURCE_DIR}/extern/patch/mfem/patch_gmsh_reader_periodic_bugfix.diff" ) include(ExternalProject) diff --git a/extern/patch/mfem/patch_gmsh_parser_performance.diff b/extern/patch/mfem/patch_gmsh_parser_performance.diff index 9a64aef55..40c4a3ee1 100644 --- a/extern/patch/mfem/patch_gmsh_parser_performance.diff +++ b/extern/patch/mfem/patch_gmsh_parser_performance.diff @@ -1,8 +1,8 @@ diff --git a/mesh/mesh_readers.cpp b/mesh/mesh_readers.cpp -index 377cc906e..cf06e5456 100644 +index d21bc481e..62bd0b8d8 100644 --- a/mesh/mesh_readers.cpp +++ b/mesh/mesh_readers.cpp -@@ -1548,7 +1548,7 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) +@@ -1549,7 +1549,7 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) // A map between a serial number of the vertex and its number in the file // (there may be gaps in the numbering, and also Gmsh enumerates vertices // starting from 1, not 0) @@ -11,7 +11,7 @@ index 377cc906e..cf06e5456 100644 // A map containing names of physical curves, surfaces, and volumes. // The first index is the dimension of the physical manifold, the second -@@ -1566,9 +1566,10 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) +@@ -1567,9 +1567,10 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) // is non-trivial. Note that with these assumptions a 2D mesh parallel to the // yz plane will be considered a surface mesh embedded in 3D whereas the same // 2D mesh parallel to the xy plane will be considered a 2D mesh. @@ -25,7 +25,7 @@ index 377cc906e..cf06e5456 100644 // Mesh order int mesh_order = 1; -@@ -1589,7 +1590,6 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) +@@ -1590,7 +1591,6 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) getline(input, buff); vertices.SetSize(NumOfVertices); int serial_number; @@ -33,7 +33,7 @@ index 377cc906e..cf06e5456 100644 real_t coord[gmsh_dim]; for (int ver = 0; ver < NumOfVertices; ++ver) { -@@ -1651,7 +1651,7 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) +@@ -1652,7 +1652,7 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) // number of nodes for each type of Gmsh elements, type is the index of // the array + 1 @@ -42,7 +42,7 @@ index 377cc906e..cf06e5456 100644 { 2, // 2-node line. 3, // 3-node triangle. -@@ -1861,97 +1861,324 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) +@@ -1862,97 +1862,324 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) This corresponds to the quad9 mapping below. */ @@ -443,7 +443,7 @@ index 377cc906e..cf06e5456 100644 while (n_elem_part < num_of_all_elements) { input.read(reinterpret_cast(header), -@@ -1959,11 +2186,10 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) +@@ -1960,11 +2187,10 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) type_of_element = header[0]; n_elem_one_type = header[1]; n_tags = header[2]; @@ -456,7 +456,7 @@ index 377cc906e..cf06e5456 100644 for (int el = 0; el < n_elem_one_type; ++el) { input.read(reinterpret_cast(&data[0]), -@@ -1981,218 +2207,26 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) +@@ -1982,218 +2208,26 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) n_partitions = (n_tags > 2) ? data[dd++] : 0; // we currently just skip the partitions if they exist, and go // directly to vertices describing the mesh element @@ -680,7 +680,7 @@ index 377cc906e..cf06e5456 100644 for (int i = 0; i < n_tags; ++i) { input >> data[i]; } // physical domain - the most important value (to distinguish // materials with different properties) -@@ -2206,210 +2240,19 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) +@@ -2207,210 +2241,19 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) // we currently just skip the partitions if they exist, and go // directly to vertices describing the mesh element const int n_elem_nodes = nodes_of_gmsh_element[type_of_element-1]; @@ -896,7 +896,7 @@ index 377cc906e..cf06e5456 100644 } // el (all elements) } // if ASCII -@@ -2533,81 +2376,106 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) +@@ -2534,81 +2377,106 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) Nodes_gf.SetSpace(nfes); Nodes_gf.MakeOwner(nfec); @@ -1026,7 +1026,7 @@ index 377cc906e..cf06e5456 100644 } vm = ho_pyr[el_order]; break; -@@ -2615,62 +2483,47 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) +@@ -2616,62 +2484,47 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) MFEM_WARNING("Unsupported Gmsh element type."); break; } @@ -1121,7 +1121,7 @@ index 377cc906e..cf06e5456 100644 } // Suppress warnings (MFEM_CONTRACT_VAR does not work here with nvcc): -@@ -2808,7 +2661,7 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) +@@ -2809,7 +2662,7 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) v[j] = v2v[v[j]]; } } diff --git a/extern/patch/mfem/patch_gmsh_reader_periodic_bugfix.diff b/extern/patch/mfem/patch_gmsh_reader_periodic_bugfix.diff new file mode 100644 index 000000000..611d8752d --- /dev/null +++ b/extern/patch/mfem/patch_gmsh_reader_periodic_bugfix.diff @@ -0,0 +1,15 @@ +diff --git a/mesh/mesh_readers.cpp b/mesh/mesh_readers.cpp +index 62bd0b8d8..d04762567 100644 +--- a/mesh/mesh_readers.cpp ++++ b/mesh/mesh_readers.cpp +@@ -2690,10 +2690,6 @@ void Mesh::ReadGmshMesh(std::istream &input, int &curved, int &read_gf) + } + + this->RemoveUnusedVertices(); +- if (periodic) +- { +- this->RemoveInternalBoundaries(); +- } + this->FinalizeTopology(); + + // If a high order coordinate field was created project it onto the mesh diff --git a/extern/patch/mfem/patch_mesh_prism_vtu_fix.diff b/extern/patch/mfem/patch_mesh_prism_vtu_fix.diff index ad3f1314a..55a0626bd 100644 --- a/extern/patch/mfem/patch_mesh_prism_vtu_fix.diff +++ b/extern/patch/mfem/patch_mesh_prism_vtu_fix.diff @@ -1,8 +1,8 @@ diff --git a/mesh/mesh.cpp b/mesh/mesh.cpp -index 2c6f144e9..a32ba38e8 100644 +index c852cb52e..5270e8c71 100644 --- a/mesh/mesh.cpp +++ b/mesh/mesh.cpp -@@ -11856,7 +11856,7 @@ void Mesh::PrintVTU(std::ostream &os, int ref, VTKFormat format, +@@ -11908,7 +11908,7 @@ void Mesh::PrintVTU(std::ostream &os, int ref, VTKFormat format, const int *p = VTKGeometry::VertexPermutation[geom]; for (int k = 0; k < nv; k++, j++) { diff --git a/extern/patch/mfem/patch_mesh_vis_dev.diff b/extern/patch/mfem/patch_mesh_vis_dev.diff index 73eb3d993..8aa1993f7 100644 --- a/extern/patch/mfem/patch_mesh_vis_dev.diff +++ b/extern/patch/mfem/patch_mesh_vis_dev.diff @@ -1,5 +1,5 @@ diff --git a/fem/datacollection.cpp b/fem/datacollection.cpp -index 1313d2a1e..735f85606 100644 +index 1313d2a1e..e84e6d9fb 100644 --- a/fem/datacollection.cpp +++ b/fem/datacollection.cpp @@ -210,6 +210,11 @@ void DataCollection::Save() @@ -26,18 +26,17 @@ index 1313d2a1e..735f85606 100644 if (it != q_field_map.end()) { SaveOneQField(it); -@@ -765,7 +770,9 @@ ParaViewDataCollection::ParaViewDataCollection(const std::string& +@@ -765,7 +770,8 @@ ParaViewDataCollection::ParaViewDataCollection(const std::string& levels_of_detail(1), pv_data_format(VTKFormat::BINARY), high_order_output(false), - restart_mode(false) + restart_mode(false), -+ bdr_output(false), -+ length_scale(1.0) ++ bdr_output(false) { cycle = 0; // always include a valid cycle index in file names -@@ -910,16 +917,19 @@ void ParaViewDataCollection::Save() +@@ -910,16 +916,19 @@ void ParaViewDataCollection::Save() std::string vtu_prefix = col_path + "/" + GenerateVTUPath() + "/"; // Save the local part of the mesh and grid functions fields to the local @@ -59,7 +58,7 @@ index 1313d2a1e..735f85606 100644 const std::string &field_name = qfield.first; std::ofstream os(vtu_prefix + GenerateVTUFileName(field_name, myid)); qfield.second->SaveVTU(os, pv_data_format, GetCompressionLevel(), field_name); -@@ -935,7 +945,7 @@ void ParaViewDataCollection::Save() +@@ -935,7 +944,7 @@ void ParaViewDataCollection::Save() std::ofstream pvtu_out(vtu_prefix + GeneratePVTUFileName("data")); WritePVTUHeader(pvtu_out); @@ -68,7 +67,7 @@ index 1313d2a1e..735f85606 100644 pvtu_out << "\n"; for (auto &field_it : field_map) { -@@ -946,7 +956,24 @@ void ParaViewDataCollection::Save() +@@ -946,7 +955,24 @@ void ParaViewDataCollection::Save() << VTKComponentLabels(vec_dim) << " " << "format=\"" << GetDataFormatString() << "\" />\n"; } @@ -93,17 +92,17 @@ index 1313d2a1e..735f85606 100644 // Element attributes pvtu_out << "\n"; pvtu_out << "\t\n"; os << "\n"; - mesh->PrintVTU(os,ref,pv_data_format,high_order_output,GetCompressionLevel()); + mesh->PrintVTU(os,ref,pv_data_format,high_order_output,GetCompressionLevel(), -+ bdr_output,length_scale); ++ bdr_output); // dump out the grid functions as point data os << "\n"; -@@ -1052,8 +1080,23 @@ void ParaViewDataCollection::SaveDataVTU(std::ostream &os, int ref) +@@ -1052,8 +1079,23 @@ void ParaViewDataCollection::SaveDataVTU(std::ostream &os, int ref) // iterate over all grid functions for (FieldMapIterator it=field_map.begin(); it!=field_map.end(); ++it) { @@ -127,7 +126,7 @@ index 1313d2a1e..735f85606 100644 os << "\n"; // close the mesh os << "\n"; // close the piece open in the PrintVTU method -@@ -1076,7 +1119,6 @@ void ParaViewDataCollection::SaveGFieldVTU(std::ostream &os, int ref_, +@@ -1076,7 +1118,6 @@ void ParaViewDataCollection::SaveGFieldVTU(std::ostream &os, int ref_, << "format=\"" << GetDataFormatString() << "\" >" << '\n'; if (vec_dim == 1) { @@ -135,7 +134,7 @@ index 1313d2a1e..735f85606 100644 for (int i = 0; i < mesh->GetNE(); i++) { RefG = GlobGeometryRefiner.Refine( -@@ -1106,11 +1148,131 @@ void ParaViewDataCollection::SaveGFieldVTU(std::ostream &os, int ref_, +@@ -1106,11 +1147,131 @@ void ParaViewDataCollection::SaveGFieldVTU(std::ostream &os, int ref_, } } } @@ -145,22 +144,19 @@ index 1313d2a1e..735f85606 100644 + } + os << "" << std::endl; +} - -- if (IsBinaryFormat()) ++ +void ParaViewDataCollection::SaveCoeffFieldVTU(std::ostream &os, int ref_, + const CoeffFieldMapIterator &it) +{ + RefinedGeometry *RefG; -+ double val; ++ real_t val; + std::vector buf; + int vec_dim = 1; + os << "first + << "\" NumberOfComponents=\"" << vec_dim << "\"" + << " format=\"" << GetDataFormatString() << "\" >" << '\n'; - { -- WriteVTKEncodedCompressed(os,buf.data(),buf.size(),GetCompressionLevel()); -- os << '\n'; ++ { + // scalar data + if (!bdr_output) + { @@ -201,11 +197,12 @@ index 1313d2a1e..735f85606 100644 + } + if (pv_data_format != VTKFormat::ASCII) + { -+ WriteBase64WithSizeAndClear(os, buf, compression); ++ WriteBase64WithSizeAndClear(os, buf, GetCompressionLevel()); + } + os << "" << std::endl; +} -+ + +- if (IsBinaryFormat()) +void ParaViewDataCollection::SaveVCoeffFieldVTU(std::ostream &os, int ref_, + const VCoeffFieldMapIterator &it) +{ @@ -217,7 +214,9 @@ index 1313d2a1e..735f85606 100644 + << "\" Name=\"" << it->first + << "\" NumberOfComponents=\"" << vec_dim << "\"" + << " format=\"" << GetDataFormatString() << "\" >" << '\n'; -+ { + { +- WriteVTKEncodedCompressed(os,buf.data(),buf.size(),GetCompressionLevel()); +- os << '\n'; + // vector data + if (!bdr_output) + { @@ -270,7 +269,7 @@ index 1313d2a1e..735f85606 100644 } os << "" << std::endl; } -@@ -1143,6 +1305,16 @@ void ParaViewDataCollection::SetCompression(bool compression_) +@@ -1143,6 +1304,11 @@ void ParaViewDataCollection::SetCompression(bool compression_) compression = compression_; } @@ -278,17 +277,12 @@ index 1313d2a1e..735f85606 100644 +{ + bdr_output = bdr_output_; +} -+ -+void ParaViewDataCollection::SetLengthScale(double length_scale_) -+{ -+ length_scale = length_scale_; -+} + void ParaViewDataCollection::UseRestartMode(bool restart_mode_) { restart_mode = restart_mode_; diff --git a/fem/datacollection.hpp b/fem/datacollection.hpp -index c0ed950e7..9ab719650 100644 +index e4d41a1b6..5306c94f7 100644 --- a/fem/datacollection.hpp +++ b/fem/datacollection.hpp @@ -133,6 +133,10 @@ private: @@ -438,12 +432,11 @@ index c0ed950e7..9ab719650 100644 /// Load the collection. Not implemented in the base class DataCollection. virtual void Load(int cycle_ = 0); -@@ -512,12 +578,18 @@ private: +@@ -512,12 +578,17 @@ private: VTKFormat pv_data_format; bool high_order_output; bool restart_mode; + bool bdr_output; -+ double length_scale; protected: void WritePVTUHeader(std::ostream &out); @@ -457,7 +450,7 @@ index c0ed950e7..9ab719650 100644 const char *GetDataFormatString() const; const char *GetDataTypeString() const; /// @brief If compression is enabled, return the compression level, otherwise -@@ -531,7 +603,6 @@ protected: +@@ -531,7 +602,6 @@ protected: std::string GeneratePVTUFileName(const std::string &prefix); std::string GeneratePVTUPath(); @@ -465,151 +458,85 @@ index c0ed950e7..9ab719650 100644 public: /// Constructor. The collection name is used when saving the data. /** If @a mesh_ is NULL, then the mesh can be set later by calling SetMesh(). -@@ -582,6 +653,14 @@ public: +@@ -582,6 +652,10 @@ public: /// by default). Reading high-order data requires ParaView 5.5 or later. void SetHighOrderOutput(bool high_order_output_); + /// Configures collection to save only fields evaluated on boundaries of + /// the mesh. + void SetBoundaryOutput(bool bdr_output_); -+ -+ /// Sets length scale used to scale mesh point coordinates on output. -+ /// The default if unset is 1.0 (unscaled). -+ void SetLengthScale(double length_scale_); + /// Enable or disable restart mode. If restart is enabled, new writes will /// preserve timestep metadata for any solutions prior to the currently /// defined time. diff --git a/mesh/mesh.cpp b/mesh/mesh.cpp -index 457c4bec1..2c6f144e9 100644 +index 1a0e82e87..c852cb52e 100644 --- a/mesh/mesh.cpp +++ b/mesh/mesh.cpp -@@ -11698,7 +11698,8 @@ void Mesh::PrintVTU(std::string fname, +@@ -11759,7 +11759,7 @@ void Mesh::PrintVTU(std::string fname, VTKFormat format, bool high_order_output, int compression_level, - bool bdr) -+ bool bdr_elements, -+ double scale_factor) ++ bool bdr_elements) { int ref = (high_order_output && Nodes) ? Nodes->FESpace()->GetMaxElementOrder() : 1; -@@ -11712,7 +11713,8 @@ void Mesh::PrintVTU(std::string fname, +@@ -11773,7 +11773,7 @@ void Mesh::PrintVTU(std::string fname, } os << " byte_order=\"" << VTKByteOrder() << "\">\n"; os << "\n"; - PrintVTU(os, ref, format, high_order_output, compression_level, bdr); -+ PrintVTU(os, ref, format, high_order_output, compression_level, bdr_elements, -+ scale_factor); ++ PrintVTU(os, ref, format, high_order_output, compression_level, bdr_elements); os << "\n"; // need to close the piece open in the PrintVTU method os << "\n"; os << "" << std::endl; -@@ -11723,14 +11725,16 @@ void Mesh::PrintVTU(std::string fname, - void Mesh::PrintBdrVTU(std::string fname, - VTKFormat format, - bool high_order_output, -- int compression_level) -+ int compression_level, -+ double scale_factor) - { -- PrintVTU(fname, format, high_order_output, compression_level, true); -+ PrintVTU(fname, format, high_order_output, compression_level, true, -+ scale_factor); - } - - void Mesh::PrintVTU(std::ostream &os, int ref, VTKFormat format, - bool high_order_output, int compression_level, -- bool bdr_elements) -+ bool bdr_elements, double scale_factor) - { - RefinedGeometry *RefG; - DenseMatrix pmat; -@@ -11777,6 +11781,11 @@ void Mesh::PrintVTU(std::ostream &os, int ref, VTKFormat format, - GetElementTransformation(i)->Transform(RefG->RefPts, pmat); - } - -+ if (scale_factor != 1.0) -+ { -+ pmat *= scale_factor; -+ } -+ - for (int j = 0; j < pmat.Width(); j++) - { - WriteBinaryOrASCII(os, buf, pmat(0,j), " ", format); diff --git a/mesh/mesh.hpp b/mesh/mesh.hpp -index 297472979..73cf6124f 100644 +index 7187fe11a..bcde8a6d9 100644 --- a/mesh/mesh.hpp +++ b/mesh/mesh.hpp -@@ -2345,25 +2345,30 @@ public: - /** Print the mesh in VTU format. The parameter ref > 0 specifies an element - subdivision number (useful for high order fields and curved meshes). - If @a bdr_elements is true, then output (only) the boundary elements, -- otherwise output only the non-boundary elements. */ -+ otherwise output only the non-boundary elements. The parameter -+ @a scale_factor sets a scale factor for the output mesh point -+ coordinates. */ - void PrintVTU(std::ostream &os, - int ref=1, - VTKFormat format=VTKFormat::ASCII, - bool high_order_output=false, - int compression_level=0, -- bool bdr_elements=false); -+ bool bdr_elements=false, -+ double scale_factor=1.0); - /** Print the mesh in VTU format with file name fname. */ - virtual void PrintVTU(std::string fname, +@@ -2389,7 +2389,7 @@ public: VTKFormat format=VTKFormat::ASCII, bool high_order_output=false, int compression_level=0, - bool bdr=false); -+ bool bdr_elements=false, -+ double scale_factor=1.0); ++ bool bdr_elements=false); /** Print the boundary elements of the mesh in VTU format, and output the boundary attributes as a data array (useful for boundary conditions). */ void PrintBdrVTU(std::string fname, - VTKFormat format=VTKFormat::ASCII, - bool high_order_output=false, -- int compression_level=0); -+ int compression_level=0, -+ double scale_factor=1.0); - - #ifdef MFEM_USE_NETCDF - /// @brief Export a mesh to an Exodus II file. diff --git a/mesh/pmesh.cpp b/mesh/pmesh.cpp -index 5f5d9d38d..cc673f78e 100644 +index 5f5d9d38d..9556bcbd2 100644 --- a/mesh/pmesh.cpp +++ b/mesh/pmesh.cpp -@@ -6398,7 +6398,8 @@ void ParMesh::PrintVTU(std::string pathname, +@@ -6398,7 +6398,7 @@ void ParMesh::PrintVTU(std::string pathname, VTKFormat format, bool high_order_output, int compression_level, - bool bdr) -+ bool bdr_elements, -+ double scale_factor) ++ bool bdr_elements) { int pad_digits_rank = 6; DataCollection::create_directory(pathname, this, MyRank); -@@ -6458,7 +6459,8 @@ void ParMesh::PrintVTU(std::string pathname, +@@ -6458,7 +6458,8 @@ void ParMesh::PrintVTU(std::string pathname, std::string vtu_fname = pathname + "/" + fname + ".proc" + to_padded_string(MyRank, pad_digits_rank); - Mesh::PrintVTU(vtu_fname, format, high_order_output, compression_level, bdr); + Mesh::PrintVTU(vtu_fname, format, high_order_output, compression_level, -+ bdr_elements, scale_factor); ++ bdr_elements); } int ParMesh::FindPoints(DenseMatrix& point_mat, Array& elem_id, diff --git a/mesh/pmesh.hpp b/mesh/pmesh.hpp -index c766e37e9..f8a7413c2 100644 +index 53f7c23a2..0d5643fd5 100644 --- a/mesh/pmesh.hpp +++ b/mesh/pmesh.hpp -@@ -729,7 +729,8 @@ public: +@@ -756,7 +756,7 @@ public: VTKFormat format=VTKFormat::ASCII, bool high_order_output=false, int compression_level=0, - bool bdr=false) override; -+ bool bdr_elements=false, -+ double scale_factor=1.0) override; ++ bool bdr_elements=false) override; /// Parallel version of Mesh::Load(). void Load(std::istream &input, int generate_edges = 0, diff --git a/extern/patch/mfem/patch_mfem_device_fixes.diff b/extern/patch/mfem/patch_mfem_device_fixes.diff index fcd108640..acbf8158d 100644 --- a/extern/patch/mfem/patch_mfem_device_fixes.diff +++ b/extern/patch/mfem/patch_mfem_device_fixes.diff @@ -1,5 +1,5 @@ diff --git a/general/device.cpp b/general/device.cpp -index f339add6f..437b9fb6f 100644 +index 3ed11e916..2580f9308 100644 --- a/general/device.cpp +++ b/general/device.cpp @@ -9,6 +9,7 @@ @@ -18,13 +18,15 @@ index f339add6f..437b9fb6f 100644 #include namespace mfem -@@ -147,13 +147,11 @@ Device::Device() +@@ -147,7 +147,6 @@ Device::Device() } } - Device::~Device() { + #ifdef MFEM_USE_MPI +@@ -156,7 +155,6 @@ Device::~Device() if ( device_env && !destroy_mm) { return; } if (!device_env && destroy_mm && !mem_host_env) { @@ -32,7 +34,7 @@ index f339add6f..437b9fb6f 100644 #ifdef MFEM_USE_CEED // Destroy FES -> CeedBasis, CeedElemRestriction hash table contents for (auto entry : internal::ceed_basis_map) -@@ -172,7 +170,6 @@ Device::~Device() +@@ -175,7 +173,6 @@ Device::~Device() mm.Destroy(); } Get().ngpu = -1; @@ -40,7 +42,7 @@ index f339add6f..437b9fb6f 100644 Get().backends = Backend::CPU; Get().host_mem_type = MemoryType::HOST; Get().host_mem_class = MemoryClass::HOST; -@@ -196,28 +193,22 @@ void Device::Configure(const std::string &device, const int device_id) +@@ -199,28 +196,22 @@ void Device::Configure(const std::string &device, const int device_id) { bmap[internal::backend_name[i]] = internal::backend_list[i]; } @@ -79,7 +81,7 @@ index f339add6f..437b9fb6f 100644 } if (end == device.size()) { break; } beg = end + 1; -@@ -243,10 +234,10 @@ void Device::Configure(const std::string &device, const int device_id) +@@ -246,10 +237,10 @@ void Device::Configure(const std::string &device, const int device_id) #endif // Perform setup. @@ -93,7 +95,7 @@ index f339add6f..437b9fb6f 100644 // Copy all data members from the global 'singleton_device' into '*this'. if (this != &Get()) { std::memcpy(this, &Get(), sizeof(Device)); } -@@ -314,10 +305,9 @@ void Device::Print(std::ostream &os) +@@ -325,10 +316,9 @@ void Device::Print(std::ostream &os) os << std::endl; } @@ -105,7 +107,7 @@ index f339add6f..437b9fb6f 100644 const bool device = Device::Allows(Backend::DEVICE_MASK); #ifdef MFEM_USE_UMPIRE -@@ -364,7 +354,7 @@ void Device::UpdateMemoryTypeAndClass() +@@ -375,7 +365,7 @@ void Device::UpdateMemoryTypeAndClass() } // Enable the UVM shortcut when requested @@ -114,7 +116,7 @@ index f339add6f..437b9fb6f 100644 { host_mem_type = MemoryType::MANAGED; device_mem_type = MemoryType::MANAGED; -@@ -384,26 +374,29 @@ void Device::UpdateMemoryTypeAndClass() +@@ -395,26 +385,29 @@ void Device::UpdateMemoryTypeAndClass() mm.Configure(host_mem_type, device_mem_type); } @@ -157,7 +159,7 @@ index f339add6f..437b9fb6f 100644 #else MFEM_CONTRACT_VAR(dev); MFEM_CONTRACT_VAR(ngpu); -@@ -425,7 +418,7 @@ static void HipDeviceSetup(const int dev, int &ngpu) +@@ -436,7 +429,7 @@ static void HipDeviceSetup(const int dev, int &ngpu) static void RajaDeviceSetup(const int dev, int &ngpu) { #ifdef MFEM_USE_CUDA @@ -166,7 +168,7 @@ index f339add6f..437b9fb6f 100644 #elif defined(MFEM_USE_HIP) HipDeviceSetup(dev, ngpu); #else -@@ -509,7 +502,7 @@ static void CeedDeviceSetup(const char* ceed_spec) +@@ -520,7 +513,7 @@ static void CeedDeviceSetup(const char* ceed_spec) #endif } @@ -175,7 +177,7 @@ index f339add6f..437b9fb6f 100644 { MFEM_VERIFY(ngpu == -1, "the mfem::Device is already configured!"); -@@ -535,54 +528,41 @@ void Device::Setup(const int device_id) +@@ -546,54 +539,41 @@ void Device::Setup(const int device_id) #ifndef MFEM_USE_CEED MFEM_VERIFY(!Allows(Backend::CEED_MASK), "the CEED backends require MFEM built with MFEM_USE_CEED=YES"); diff --git a/extern/patch/mfem/patch_par_tet_mesh_fix_dev.diff b/extern/patch/mfem/patch_par_tet_mesh_fix_dev.diff index 19de8c2ae..b419f8f0b 100644 --- a/extern/patch/mfem/patch_par_tet_mesh_fix_dev.diff +++ b/extern/patch/mfem/patch_par_tet_mesh_fix_dev.diff @@ -13,10 +13,10 @@ index e9dd07217..4129789bb 100644 virtual int NeedRefinement(HashTable &v_to_v) const { return 0; } diff --git a/mesh/mesh.cpp b/mesh/mesh.cpp -index a32ba38e8..456f9618c 100644 +index 5270e8c71..e92303155 100644 --- a/mesh/mesh.cpp +++ b/mesh/mesh.cpp -@@ -2153,7 +2153,7 @@ void Mesh::FinalizeTriMesh(int generate_edges, int refine, bool fix_orientation) +@@ -2165,7 +2165,7 @@ void Mesh::FinalizeTriMesh(int generate_edges, int refine, bool fix_orientation) if (refine) { @@ -25,7 +25,7 @@ index a32ba38e8..456f9618c 100644 } if (generate_edges) -@@ -2608,82 +2608,113 @@ void Mesh::ReorderElements(const Array &ordering, bool reorder_vertices) +@@ -2620,82 +2620,113 @@ void Mesh::ReorderElements(const Array &ordering, bool reorder_vertices) } @@ -177,7 +177,7 @@ index a32ba38e8..456f9618c 100644 } } } -@@ -3034,9 +3065,7 @@ void Mesh::FinalizeTetMesh(int generate_edges, int refine, bool fix_orientation) +@@ -3046,9 +3077,7 @@ void Mesh::FinalizeTetMesh(int generate_edges, int refine, bool fix_orientation) if (refine) { @@ -188,7 +188,7 @@ index a32ba38e8..456f9618c 100644 } GetElementToFaceTable(); -@@ -3303,8 +3332,7 @@ void Mesh::Finalize(bool refine, bool fix_orientation) +@@ -3315,8 +3344,7 @@ void Mesh::Finalize(bool refine, bool fix_orientation) // only perform it when Dim == spaceDim. if (Dim >= 2 && Dim == spaceDim) { @@ -198,7 +198,7 @@ index a32ba38e8..456f9618c 100644 { MFEM_VERIFY(faces_info[i].Elem2No < 0 || faces_info[i].Elem2Inf%2 != 0, "Invalid mesh topology." -@@ -4004,8 +4032,6 @@ void Mesh::Make2D(int nx, int ny, Element::Type type, +@@ -4016,8 +4044,6 @@ void Mesh::Make2D(int nx, int ny, Element::Type type, boundary[2*nx+j] = new Segment((j+1)*m, j*m, 4); boundary[2*nx+ny+j] = new Segment(j*m+nx, (j+1)*m+nx, 2); } @@ -207,7 +207,7 @@ index a32ba38e8..456f9618c 100644 } else { -@@ -6295,37 +6321,21 @@ static const char *fixed_or_not[] = { "fixed", "NOT FIXED" }; +@@ -6351,37 +6377,21 @@ static const char *fixed_or_not[] = { "fixed", "NOT FIXED" }; int Mesh::CheckElementOrientation(bool fix_it) { @@ -250,7 +250,7 @@ index a32ba38e8..456f9618c 100644 switch (GetElementType(i)) { case Element::TRIANGLE: -@@ -6345,88 +6355,41 @@ int Mesh::CheckElementOrientation(bool fix_it) +@@ -6401,88 +6411,41 @@ int Mesh::CheckElementOrientation(bool fix_it) } } } @@ -362,7 +362,7 @@ index a32ba38e8..456f9618c 100644 } } } -@@ -7384,24 +7347,12 @@ void Mesh::GetBdrPointMatrix(int i,DenseMatrix &pointmat) const +@@ -7446,24 +7409,12 @@ void Mesh::GetBdrPointMatrix(int i,DenseMatrix &pointmat) const pointmat.SetSize(spaceDim, nv); for (k = 0; k < spaceDim; k++) @@ -389,7 +389,7 @@ index a32ba38e8..456f9618c 100644 // static method diff --git a/mesh/mesh.hpp b/mesh/mesh.hpp -index 73cf6124f..d737768b0 100644 +index bcde8a6d9..7b48a773c 100644 --- a/mesh/mesh.hpp +++ b/mesh/mesh.hpp @@ -378,12 +378,12 @@ protected: @@ -410,7 +410,7 @@ index 73cf6124f..d737768b0 100644 // Methods used to prepare and apply permutation of the mesh nodes assuming diff --git a/mesh/pmesh.cpp b/mesh/pmesh.cpp -index cc673f78e..0e9274ece 100644 +index 9556bcbd2..735d8f09c 100644 --- a/mesh/pmesh.cpp +++ b/mesh/pmesh.cpp @@ -20,6 +20,7 @@ @@ -446,7 +446,7 @@ index cc673f78e..0e9274ece 100644 + // vertex 0 - vertex 1 is the longest edge in the element. In the case of + // ties in the edge length, the global edge index is used for a consistent + // ordering between elements. -+ Array lengths; ++ Array lengths; + GetEdgeLengths2(v_to_v, lengths); + + // Create a GroupCommunicator over shared edges @@ -602,7 +602,7 @@ index cc673f78e..0e9274ece 100644 { svert_master_rank[group_svert.GetRow(i)[j]] = rank; diff --git a/mesh/tetrahedron.cpp b/mesh/tetrahedron.cpp -index 05d81c618..6d4378578 100644 +index 05d81c618..328f35b3a 100644 --- a/mesh/tetrahedron.cpp +++ b/mesh/tetrahedron.cpp @@ -13,6 +13,8 @@ @@ -691,9 +691,9 @@ index 05d81c618..6d4378578 100644 +// @cond DOXYGEN_SKIP + -+template void Tetrahedron::MarkEdge(const DSTable &, const Array &, ++template void Tetrahedron::MarkEdge(const DSTable &, const Array &, + const Array &); -+template void Tetrahedron::MarkEdge(const DSTable &, const Array &, ++template void Tetrahedron::MarkEdge(const DSTable &, const Array &, + const Array &); + +// @endcond @@ -719,7 +719,7 @@ index 83665454e..d7ee8b419 100644 void ResetTransform(int tr) override { transform = tr; } unsigned GetTransform() const override { return transform; } diff --git a/mesh/triangle.cpp b/mesh/triangle.cpp -index 795425b46..da9cc741e 100644 +index 795425b46..2e5b30e1f 100644 --- a/mesh/triangle.cpp +++ b/mesh/triangle.cpp @@ -11,6 +11,8 @@ @@ -823,9 +823,9 @@ index 795425b46..da9cc741e 100644 +// @cond DOXYGEN_SKIP + -+template void Triangle::MarkEdge(int *, const DSTable &, const Array &, ++template void Triangle::MarkEdge(int *, const DSTable &, const Array &, + const Array &); -+template void Triangle::MarkEdge(int *, const DSTable &, const Array &, ++template void Triangle::MarkEdge(int *, const DSTable &, const Array &, + const Array &); + +// @endcond diff --git a/extern/patch/mumps/patch_build.diff b/extern/patch/mumps/patch_build.diff index 7472015bf..62b8e3ab1 100644 --- a/extern/patch/mumps/patch_build.diff +++ b/extern/patch/mumps/patch_build.diff @@ -1,19 +1,41 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3be37f8..193e8b5 100644 +index c8ca4ca..b85e966 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -48,10 +48,7 @@ find_package(Threads) +@@ -12,7 +12,7 @@ endif() + + project(MUMPS + LANGUAGES C Fortran +-VERSION 5.7.3.2 ++VERSION 5.7.3.1 + DESCRIPTION "Sparse direct parallel solver" + HOMEPAGE_URL "http://mumps-solver.org/" + ) +@@ -48,13 +48,10 @@ find_package(Threads) if(MUMPS_parallel) find_package(MPI COMPONENTS C Fortran REQUIRED) -- if(NOT DEFINED ENV{MKLROOT} AND NOT LAPACK_VENDOR MATCHES "^MKL" OR NOT scalapack) +- if(NOT DEFINED ENV{MKLROOT} AND NOT LAPACK_VENDOR MATCHES "^MKL" OR NOT MUMPS_scalapack) - # oneMKL MKLConfig.cmake must be invoked only once - include(cmake/lapack.cmake) - endif() + include(cmake/lapack.cmake) set(NUMERIC_LIBS LAPACK::LAPACK) - if(scalapack) +- if(MUMPS_scalapack) ++ if(scalapack) + include(cmake/scalapack.cmake) # this will also create the LAPACK::LAPACK target + list(PREPEND NUMERIC_LIBS SCALAPACK::SCALAPACK) + endif() +@@ -63,7 +60,7 @@ if(MUMPS_parallel) + set(NUMERIC_INC ${MPI_Fortran_INCLUDE_DIRS}) + list(APPEND NUMERIC_LIBS ${MPI_Fortran_LIBRARIES} MPI::MPI_C) + +- if(MUMPS_openmp) ++ if(openmp) + find_package(OpenMP COMPONENTS C Fortran REQUIRED) + list(APPEND NUMERIC_LIBS OpenMP::OpenMP_Fortran OpenMP::OpenMP_C) + endif() @@ -99,15 +96,6 @@ endif() list(APPEND ORDERING_LIBS pord) @@ -32,10 +54,10 @@ index 3be37f8..193e8b5 100644 message(STATUS "MUMPS LAPACK_VENDOR: ${LAPACK_VENDOR}") diff --git a/cmake/FindLAPACK.cmake b/cmake/FindLAPACK.cmake deleted file mode 100644 -index 9b9d1d0..0000000 +index a633d6c..0000000 --- a/cmake/FindLAPACK.cmake +++ /dev/null -@@ -1,501 +0,0 @@ +@@ -1,512 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - @@ -76,6 +98,10 @@ index 9b9d1d0..0000000 - MKL only: 64-bit integers (default is 32-bit integers) -``TBB`` - Intel MPI + TBB for MKL +-``OpenMP`` +- MKL only: use OpenMP (default is sequential) +- +- -``AOCL`` - AMD Optimizing CPU Libraries - @@ -344,8 +370,10 @@ index 9b9d1d0..0000000 - -#=============================== - --macro(find_mkl_libs) --# https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-linux/2023-2/cmake-config-for-onemkl.html +-macro(lapack_mkl) +-# https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-linux/2025-0/cmake-config-for-onemkl.html +- +-set(MKL_ARCH "intel64") - -set(MKL_INTERFACE "lp64") -if(MKL64 IN_LIST LAPACK_FIND_COMPONENTS) @@ -358,8 +386,13 @@ index 9b9d1d0..0000000 -endif() - -# MKL_THREADING default: "intel_thread" which is Intel OpenMP --if(TBB IN_LIST LAPACK_FIND_COMPONENTS) +-# some systems have messed up OpenMP, so sequential unless requested +-if(TBB IN_LIST SCALAPACK_FIND_COMPONENTS) - set(MKL_THREADING "tbb_thread") +-elseif(OpenMP IN_LIST SCALAPACK_FIND_COMPONENTS) +- set(MKL_THREADING "intel_thread") +-else() +- set(MKL_THREADING "sequential") -endif() - -# default: dynamic @@ -382,13 +415,13 @@ index 9b9d1d0..0000000 - -set(LAPACK_MKL_FOUND true) - --foreach(c IN ITEMS TBB LAPACK95 MKL64) +-foreach(c IN ITEMS TBB LAPACK95 MKL64 OpenMP) - if(${c} IN_LIST LAPACK_FIND_COMPONENTS) - set(LAPACK_${c}_FOUND true) - endif() -endforeach() - --endmacro(find_mkl_libs) +-endmacro() - -# ========== main program - @@ -418,7 +451,7 @@ index 9b9d1d0..0000000 -endif() - -if(MKL IN_LIST LAPACK_FIND_COMPONENTS OR MKL64 IN_LIST LAPACK_FIND_COMPONENTS) -- find_mkl_libs() +- lapack_mkl() -elseif(Atlas IN_LIST LAPACK_FIND_COMPONENTS) - atlas_libs() -elseif(Netlib IN_LIST LAPACK_FIND_COMPONENTS) @@ -538,10 +571,10 @@ index 9b9d1d0..0000000 - -mark_as_advanced(LAPACK_LIBRARY LAPACK_INCLUDE_DIR) diff --git a/cmake/FindSCALAPACK.cmake b/cmake/FindSCALAPACK.cmake -index e66930a..5fa9d78 100644 +index 0e65507..254dd0b 100644 --- a/cmake/FindSCALAPACK.cmake +++ b/cmake/FindSCALAPACK.cmake -@@ -52,8 +52,6 @@ References +@@ -58,8 +58,6 @@ References include(CheckFortranSourceCompiles) @@ -550,7 +583,7 @@ index e66930a..5fa9d78 100644 #===== functions function(scalapack_check) -@@ -64,11 +62,8 @@ find_package(Threads) +@@ -70,11 +68,8 @@ find_package(Threads) set(CMAKE_REQUIRED_FLAGS) set(CMAKE_REQUIRED_LINK_OPTIONS) @@ -564,7 +597,7 @@ index e66930a..5fa9d78 100644 list(APPEND CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES} ${MPI_Fortran_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) if(STATIC IN_LIST SCALAPACK_FIND_COMPONENTS AND -@@ -240,20 +235,13 @@ endif() +@@ -252,20 +247,13 @@ endif() if(SCALAPACK_FOUND) # need if _FOUND guard as can't overwrite imported target even if bad @@ -586,7 +619,7 @@ index e66930a..5fa9d78 100644 # For MKL, we don't use FindLapack, so define LAPACK::LAPACK as alias if(MKL_FOUND AND NOT TARGET LAPACK::LAPACK) -@@ -261,5 +249,3 @@ Scalapack include directories: ${SCALAPACK_INCLUDE_DIRS}") +@@ -273,5 +261,3 @@ Scalapack include directories: ${SCALAPACK_INCLUDE_DIRS}") endif() endif() endif() @@ -610,10 +643,10 @@ index 3f0997e..14ebbe6 100644 -find_package(LAPACK REQUIRED COMPONENTS ${LAPACK_VENDOR}) +find_package(LAPACK REQUIRED) diff --git a/cmake/scalapack.cmake b/cmake/scalapack.cmake -index 21503e7..78c9dda 100644 +index 018fc1d..78c9dda 100644 --- a/cmake/scalapack.cmake +++ b/cmake/scalapack.cmake -@@ -3,27 +3,7 @@ include(GNUInstallDirs) +@@ -3,33 +3,7 @@ include(GNUInstallDirs) if(find AND NOT TARGET SCALAPACK::SCALAPACK) @@ -627,6 +660,12 @@ index 21503e7..78c9dda 100644 - endif() -endif() - +-if(MKL IN_LIST SCALAPACK_VENDOR) +- if(MUMPS_openmp) +- list(APPEND SCALAPACK_VENDOR OpenMP) +- endif() +-endif() +- -if(MKL IN_LIST SCALAPACK_VENDOR AND NOT MKL64 IN_LIST SCALAPACK_VENDOR) - if(intsize64) - list(APPEND SCALAPACK_VENDOR MKL64) diff --git a/palace/models/timeoperator.cpp b/palace/models/timeoperator.cpp index b23ed7d87..173bf337e 100644 --- a/palace/models/timeoperator.cpp +++ b/palace/models/timeoperator.cpp @@ -328,11 +328,11 @@ TimeOperator::TimeOperator(const IoData &iodata, SpaceOperator &space_op, // Use implicit setup/solve defined in SUNImplicit*. arkode->UseMFEMLinearSolver(); // Implicit solve is linear and J is not time-dependent. - ARKStepSetLinear(arkode->GetMem(), 0); + ARKodeSetLinear(arkode->GetMem(), 0); // Relative and absolute tolerances. arkode->SetSStolerances(rel_tol, abs_tol); // Set the order of the RK scheme. - ARKStepSetOrder(arkode->GetMem(), order); + ARKodeSetOrder(arkode->GetMem(), order); // Set the ODE solver to ARKODE. ode = std::move(arkode); #else @@ -405,7 +405,7 @@ void TimeOperator::PrintStats() &nfe_evals, &nfi_evals, &nlinsetups, &netfails); long int nniters; - ARKStepGetNumNonlinSolvIters(arkode->GetMem(), &nniters); + ARKodeGetNumNonlinSolvIters(arkode->GetMem(), &nniters); Mpi::Print("\nARKODE time-stepper statistics\n"); Mpi::Print(" Stability-limited steps: {:d}\n", expsteps); diff --git a/spack/local/packages/palace/package.py b/spack/local/packages/palace/package.py index eed62e183..f6f3449d9 100644 --- a/spack/local/packages/palace/package.py +++ b/spack/local/packages/palace/package.py @@ -78,7 +78,7 @@ class Palace(CMakePackage, CudaPackage, ROCmPackage): depends_on("strumpack~openmp", when="~openmp") with when("+sundials"): - depends_on("sundials@6.7.0") + depends_on("sundials") depends_on("sundials+shared", when="+shared") depends_on("sundials~shared", when="~shared") depends_on("sundials+openmp", when="+openmp")