Skip to content

Commit

Permalink
Merge branch 'main' into simlapointe/complex-pc
Browse files Browse the repository at this point in the history
  • Loading branch information
simlapointe authored Dec 30, 2024
2 parents f8eda5a + 7383601 commit 0dbaaec
Show file tree
Hide file tree
Showing 13 changed files with 191 additions and 204 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/build-and-test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..
Expand Down
30 changes: 15 additions & 15 deletions cmake/ExternalGitTags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand All @@ -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"
)

Expand All @@ -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"
)

Expand All @@ -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"
)

Expand All @@ -90,21 +90,21 @@ 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
"master" CACHE STRING
"Git branch for external MAGMA build"
)
set(EXTERN_MAGMA_GIT_TAG
"4917e80ca559d0e0d4fdb56abfca381639f9b821" CACHE STRING
"95903129f839bb401d9d9c53bd3d8e1b5e14c238" CACHE STRING
"Git tag for external MAGMA build"
)

Expand Down Expand Up @@ -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"
)

Expand All @@ -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"
)

Expand Down Expand Up @@ -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"
)

Expand Down Expand Up @@ -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"
)

Expand All @@ -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"
)

Expand All @@ -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"
)

Expand All @@ -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"
)

Expand Down Expand Up @@ -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"
)
1 change: 1 addition & 0 deletions cmake/ExternalMFEM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
24 changes: 12 additions & 12 deletions extern/patch/mfem/patch_gmsh_parser_performance.diff
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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.
Expand All @@ -25,15 +25,15 @@ 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;
- const int gmsh_dim = 3; // Gmsh always outputs 3 coordinates
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
Expand All @@ -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.
*/
Expand Down Expand Up @@ -443,7 +443,7 @@ index 377cc906e..cf06e5456 100644
while (n_elem_part < num_of_all_elements)
{
input.read(reinterpret_cast<char*>(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];
Expand All @@ -456,7 +456,7 @@ index 377cc906e..cf06e5456 100644
for (int el = 0; el < n_elem_one_type; ++el)
{
input.read(reinterpret_cast<char*>(&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
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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]];
}
}
Expand Down
15 changes: 15 additions & 0 deletions extern/patch/mfem/patch_gmsh_reader_periodic_bugfix.diff
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions extern/patch/mfem/patch_mesh_prism_vtu_fix.diff
Original file line number Diff line number Diff line change
@@ -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++)
{
Expand Down
Loading

0 comments on commit 0dbaaec

Please sign in to comment.