Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2fcdb25
missing flag check for rebalancing
helloworld922 Dec 11, 2025
7272465
Merge remote-tracking branch 'base/master'
helloworld922 Dec 18, 2025
18c064b
Added ability to generate the triple-pt mesh
helloworld922 Dec 18, 2025
b1375b8
Added a way to compute the exact sedov shock solution
helloworld922 Jan 12, 2026
9cebc3b
hopefully fix error in computing error
helloworld922 Jan 13, 2026
d44a6b8
always use the CPU version to project
helloworld922 Jan 13, 2026
c29e9f5
Added ability to specify generated domain size
helloworld922 Jan 13, 2026
67eaf51
fixed exact solution
helloworld922 Jan 15, 2026
a0c1071
updated baseline to match reduced 3D sedov shock E0
helloworld922 Jan 15, 2026
0bce147
last digit different
helloworld922 Jan 15, 2026
c22b55f
should be 1
helloworld922 Jan 15, 2026
528466b
setup the CMake to also be able to use caliper
helloworld922 Jan 15, 2026
87ff6c1
switch back to E0=2 for 3D test since that was consistent
helloworld922 Jan 16, 2026
91f187c
updated readme
helloworld922 Jan 16, 2026
726944a
debug print out results.dat and baseline.dat
helloworld922 Jan 16, 2026
cd3179b
makefile bug
helloworld922 Jan 16, 2026
6c4f603
now it seems to be passing?
helloworld922 Jan 16, 2026
4f15f7b
mixedint is optional for hypre
helloworld922 Jan 16, 2026
dda1eff
removed old code
helloworld922 Jan 16, 2026
d22eda7
formatting, added diagnostic for device memory usage
helloworld922 Jan 16, 2026
5fd5fd8
cleanup
helloworld922 Jan 16, 2026
113a847
updated readme verification command
helloworld922 Jan 16, 2026
fe59531
makefile build
helloworld922 Jan 29, 2026
44c7a07
Tolerance for the projection of the delta function (Sedov tests).
vladotomov Feb 19, 2026
c0c7dbf
Merge branch 'master' into sedov
helloworld922 Feb 19, 2026
736dd77
enable serial refinement for metis partitioned mesh
helloworld922 Feb 19, 2026
6e4603e
makefile build
helloworld922 Feb 19, 2026
c5ca422
fixed help text
helloworld922 Feb 23, 2026
ef277ea
Fix check Sedov results with new blast initial dim scaling
camierjs Feb 24, 2026
78bf2e7
review comments
helloworld922 Feb 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ find_package(HYPRE REQUIRED)
find_package(MFEM REQUIRED)
find_package(MPI REQUIRED)

option(LAGHOS_USE_CALIPER "Use Caliper" OFF)
if (LAGHOS_USE_CALIPER)
find_package(caliper REQUIRED)
endif()

set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to use.")
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL
"Force the use of the chosen C++ standard.")
Expand Down Expand Up @@ -60,7 +65,7 @@ endif()


list(APPEND SOURCES
laghos_assembly.cpp laghos.cpp laghos_solver.cpp
laghos_assembly.cpp laghos.cpp laghos_solver.cpp sedov/sedov_sol.cpp
)

if (MFEM_USE_CUDA)
Expand All @@ -76,3 +81,24 @@ target_link_libraries(laghos
PUBLIC MPI::MPI_CXX
PUBLIC HYPRE::HYPRE
)
if(LAGHOS_USE_CALIPER)
target_link_libraries(laghos
PUBLIC caliper
)
target_compile_definitions(laghos
PUBLIC LAGHOS_USE_CALIPER)
endif()

if (MFEM_USE_CUDA)
set_source_files_properties(sedov/sedov_sol.cpp sedov/sedov.cpp PROPERTIES LANGUAGE CUDA)
endif()

add_executable(sedov sedov/sedov_sol.cpp sedov/sedov.cpp)

target_include_directories(sedov PUBLIC "${MFEM_DIR}/../../../include/mfem")

target_link_libraries(sedov
PUBLIC mfem
PUBLIC MPI::MPI_CXX
PUBLIC HYPRE::HYPRE
)
165 changes: 165 additions & 0 deletions INSTALL_cmake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
### CMake

This installs built dependencies to `INSTALLDIR` using the `CC` C-compiler and `CXX` C++17-compiler.

Build METIS (optional):
```sh
git clone https://github.com/KarypisLab/METIS.git
cd METIS
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$CC -DCMAKE_INSTALL_PREFIX=$INSTALLDIR
make -j install
```
For large runs (problem size above 2 billion unknowns), add `-DMETIS_USE_LONGINDEX=ON` option to the above `cmake` line. If building without METIS only Cartesian partitioning is supported.

Build Umpire (CUDA, optional):
```sh
git clone https://github.com/LLNL/Umpire.git
cd Umpire
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECTURES=native -DENABLE_CUDA=ON -DUMPIRE_ENABLE_C=ON -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_CUDA_COMPILER=$CUDACC
make -j install
```

Build Umpire (HIP, optional):
```sh
git clone https://github.com/LLNL/Umpire.git
cd Umpire
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_HIP_ARCHITECTURES=native -DENABLE_HIP=ON -DUMPIRE_ENABLE_C=ON -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_HIP_COMPILER=$HIPCC
make -j install
```

Build *hypre* (CPU-only):

```sh
git clone https://github.com/hypre-space/hypre.git
cd hypre/build
cmake ../src -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX
make -j install
```

Build *hypre* (CUDA):

```sh
git clone https://github.com/hypre-space/hypre.git
cd hypre/build
cmake ../src -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DHYPRE_ENABLE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=native -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_CUDA_COMPILER=$CUDACC -DHYPRE_ENABLE_GPU_AWARE_MPI=ON -DHYPRE_ENABLE_UMPIRE=ON
make -j install
```
``HYPRE_ENABLE_GPU_AWARE_MPI`` and ``HYPRE_ENABLE_UMPIRE`` may be optionally turned off.

Build *hypre* (HIP):

```sh
git clone https://github.com/hypre-space/hypre.git
cd hypre/build
cmake ../src -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DHYPRE_ENABLE_HIP=ON -DCMAKE_HIP_ARCHITECTURES=native -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_HIP_COMPILER=$HIPCC -DHYPRE_ENABLE_GPU_AWARE_MPI=ON -DHYPRE_ENABLE_UMPIRE=ON
make -j install
```
``HYPRE_ENABLE_GPU_AWARE_MPI`` and ``HYPRE_ENABLE_UMPIRE`` may be optionally turned off.
For large runs (problem size above 2 billion unknowns), enable the `HYPRE_ENABLE_MIXEDINT` option.

Build MFEM (CPU-only):
```sh
git clone https://github.com/mfem/mfem.git
cd mfem
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DHYPRE_DIR=$INSTALLDIR -DMETIS_DIR=$INSTALLDIR -DMFEM_USE_MPI=ON -DMFEM_USE_METIS=ON -DCMAKE_CXX_COMPILER=$CXX
make -j install
```
`MFEM_USE_METIS` may be optionally disabled.
See the [MFEM building page](http://mfem.org/building/) for additional details.

Build MFEM (CUDA):
```sh
git clone https://github.com/mfem/mfem.git
cd mfem
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DHYPRE_DIR=$INSTALLDIR -DMETIS_DIR=$INSTALLDIR -DMFEM_USE_MPI=ON -DMFEM_USE_METIS=ON -DMFEM_USE_CUDA=ON -DMFEM_USE_UMPIRE=ON -DCMAKE_CUDA_ARCHITECTURES=native -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_CUDA_COMPILER=$CUDACC -DUMPIRE_DIR=$INSTALLDIR
make -j install
```
`MFEM_USE_METIS` and `MFEM_USE_UMPIRE may be optionally disabled.
See the [MFEM building page](http://mfem.org/building/) for additional details.

Build MFEM (HIP):
```sh
git clone https://github.com/mfem/mfem.git
cd mfem
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DHYPRE_DIR=$INSTALLDIR -DMETIS_DIR=$INSTALLDIR -DMFEM_USE_MPI=ON -DMFEM_USE_METIS=ON -DMFEM_USE_HIP=ON -DMFEM_USE_UMPIRE=ON -DCMAKE_HIP_ARCHITECTURES=native -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_HIP_COMPILER=$HIPCC -DUMPIRE_DIR=$INSTALLDIR
make -j install
```
`MFEM_USE_METIS` and `MFEM_USE_UMPIRE` may be optionally disabled.
See the [MFEM building page](http://mfem.org/building/) for additional details.

GLVis (optional):
```sh
git clone https://github.com/GLVis/glvis.git
cd glvis
mkdir build
cd build
cmake .. -DMFEM_DIR=$INSTALLDIR -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DCMAKE_CXX_COMPILER=$CXX
```
The easiest way to visualize Laghos results is to have GLVis running in a
separate terminal. Then the `-vis` option in Laghos will stream results directly
to the GLVis socket.

Caliper (Optional):
1. Clone and build Adiak:
```sh
git clone --recursive https://github.com/LLNL/Adiak.git
cd Adiak
mkdir build && cd build
cmake -DBUILD_SHARED_LIBS=On -DENABLE_MPI=On \
-DCMAKE_INSTALL_PREFIX=$INSTALLDIR ..
make -j install
```
2. Clone and build Caliper:
```sh
git clone https://github.com/LLNL/Caliper.git
cd Caliper
mkdir build && cd build
cmake -DWITH_MPI=True -DWITH_ADIAK=True -Dadiak_ROOT=$INSTALLDIR \
-DCMAKE_INSTALL_PREFIX=$INSTALLDIR ..
make -j install
```

Laghos (CPU-only):
```sh
git clone https://github.com/CEED/Laghos.git
cd Laghos
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DCMAKE_CXX_COMPILER=$CXX -Dcaliper_ROOT=$INSTALLDIR -DLAGHOS_USE_CALIPER=ON
make -j
```
`LAGHOS_USE_CALIPER` may be optionally disabled.

Laghos (CUDA):
```sh
git clone https://github.com/CEED/Laghos.git
cd Laghos
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_CUDA_COMPILER=$CUDACC -DCMAKE_CUDA_ARCHITECTURES=native -Dcaliper_ROOT=$INSTALLDIR -DLAGHOS_USE_CALIPER=ON
make -j
```
`LAGHOS_USE_CALIPER` may be optionally disabled.

Laghos (HIP):
```sh
git clone https://github.com/CEED/Laghos.git
cd Laghos
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_HIP_COMPILER=$HIPCC -DCMAKE_HIP_ARCHITECTURES=native -Dcaliper_ROOT=$INSTALLDIR -DLAGHOS_USE_CALIPER=ON
make -j
```
`LAGHOS_USE_CALIPER` may be optionally disabled.
86 changes: 86 additions & 0 deletions INSTALL_makefile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
### Makefile

To build the miniapp, first download *hypre* and METIS from the links above
and put everything on the same level as the `Laghos` directory:
```sh
~> ls
Laghos/ v2.11.2.tar.gz metis-4.0.3.tar.gz
```

Build *hypre*:
```sh
~> tar -zxvf v2.11.2.tar.gz
~> cd hypre-2.11.2/src/
~/hypre-2.11.2/src> ./configure --disable-fortran
~/hypre-2.11.2/src> make -j
~/hypre-2.11.2/src> cd ../..
~> ln -s hypre-2.11.2 hypre
```
For large runs (problem size above 2 billion unknowns), add the
`--enable-bigint` option to the above `configure` line.

Build METIS:
```sh
~> tar -zxvf metis-4.0.3.tar.gz
~> cd metis-4.0.3
~/metis-4.0.3> make
~/metis-4.0.3> cd ..
~> ln -s metis-4.0.3 metis-4.0
```
This build is optional, as MFEM can be build without METIS by specifying
`MFEM_USE_METIS = NO` below.

Clone and build the parallel version of MFEM:
```sh
~> git clone https://github.com/mfem/mfem.git ./mfem
~> cd mfem/
~/mfem> git checkout master
~/mfem> make parallel -j
~/mfem> cd ..
```
The above uses the `master` branch of MFEM.
See the [MFEM building page](http://mfem.org/building/) for additional details.

(Optional) Clone and build GLVis:
```sh
~> git clone https://github.com/GLVis/glvis.git ./glvis
~> cd glvis/
~/glvis> make
~/glvis> cd ..
```
The easiest way to visualize Laghos results is to have GLVis running in a
separate terminal. Then the `-vis` option in Laghos will stream results directly
to the GLVis socket.

(Optional) Build Caliper
1. Clone and build Adiak:
```sh
~> git clone --recursive https://github.com/LLNL/Adiak.git
~> cd Adiak
~/Adiak> mkdir build && cd build
~/Adiak> cmake -DBUILD_SHARED_LIBS=On -DENABLE_MPI=On \
-DCMAKE_INSTALL_PREFIX=../../adiak ..
~/Adiak> make && make install
~/Adiak> cd ../..
```
2. Clone and build Caliper:
```sh
~> git clone https://github.com/LLNL/Caliper.git
~> cd Caliper
~/Caliper> mkdir build && cd build
~/Caliper> cmake -DWITH_MPI=True -DWITH_ADIAK=True -Dadiak_ROOT=../../adiak/ \
-DCMAKE_INSTALL_PREFIX=../../caliper ..
~/Caliper> make && make install
~/Caliper> cd ../..
```

Build Laghos
```sh
~> cd Laghos/
~/Laghos> make -j
```
This can be followed by `make test` and `make install` to check and install the
build respectively. See `make help` for additional options.

See also the `make setup` target that can be used to automated the
download and building of hypre, METIS and MFEM.
Loading