Skip to content

Commit

Permalink
Merge pull request #359 from Rombur/update_stack
Browse files Browse the repository at this point in the history
Update software stack
  • Loading branch information
Rombur authored Jan 24, 2025
2 parents 173687d + 0c9efe0 commit 9bd40ef
Show file tree
Hide file tree
Showing 13 changed files with 101 additions and 92 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Installing `adamantine` requires:
* ArborX: 1.4.1 or later
* Trilinos: 14.4.0 or later. If you want to *adamantine* to read an Exodus mesh,
you need to enable SEACAS support.
* deal.II: 9.5 or later. You need to compile deal.II with MPI, p4est, and ArborX support.
* deal.II: 9.5 for the 1.0 release and 9.6 for the development version. You need to compile deal.II with MPI, p4est, and ArborX support.
* Caliper: 2.10 or later. Optional dependency to profile `adamantine`.

An example on how to install all the dependencies can be found in
Expand Down
32 changes: 17 additions & 15 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE=nvidia/cuda:12.3.0-devel-ubuntu22.04
ARG BASE=nvidia/cuda:12.6.2-devel-ubuntu24.04
FROM $BASE

ARG N_PROCS=8
Expand Down Expand Up @@ -39,8 +39,8 @@ RUN mkdir -p ${PREFIX} && \
mkdir build

# Install CMake
RUN export CMAKE_VERSION=3.27.8 && \
export CMAKE_SHA256=dfedc30abe69dcabe326a4de632210bb52004185bd2c0b096c21924f4510681f && \
RUN export CMAKE_VERSION=3.30.5 && \
export CMAKE_SHA256=f747d9b23e1a252a8beafb4ed2bc2ddf78cff7f04a8e4de19f4ff88e9b51dc9d && \
export CMAKE_URL=https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz && \
export CMAKE_ARCHIVE=${ARCHIVE_DIR}/cmake.tar.gz && \
export CMAKE_BUILD_DIR=${BUILD_DIR}/cmake && \
Expand All @@ -54,9 +54,9 @@ RUN export CMAKE_VERSION=3.27.8 && \
ENV PATH=${INSTALL_DIR}/cmake/bin:$PATH

# Install OpenMPI
RUN export OPENMPI_VERSION=5.0.0 && \
RUN export OPENMPI_VERSION=5.0.5 && \
export OPENMPI_VERSION_SHORT=5.0 && \
export OPENMPI_SHA256=9d845ca94bc1aeb445f83d98d238cd08f6ec7ad0f73b0f79ec1668dbfdacd613 && \
export OPENMPI_SHA256=6588d57c0a4bd299a24103f4e196051b29e8b55fbda49e11d5b3d32030a32776 && \
export OPENMPI_URL=https://www.open-mpi.org/software/ompi/v${OPENMPI_VERSION_SHORT}/downloads/openmpi-${OPENMPI_VERSION}.tar.bz2 && \
export OPENMPI_ARCHIVE=${ARCHIVE_DIR}/openmpi.tar.bz2 && \
export OPENMPI_SOURCE_DIR=${SOURCE_DIR}/openmpi && \
Expand Down Expand Up @@ -87,10 +87,10 @@ ENV OMPI_CXX=c++
ENV PATH=${INSTALL_DIR}/openmpi/bin:$PATH

# Install Boost
RUN export BOOST_VERSION=1.83.0 && \
export BOOST_VERSION_U=1_83_0 && \
export BOOST_URL=https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_U}.tar.bz2 && \
export BOOST_SHA256=6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e && \
RUN export BOOST_VERSION=1.86.0 && \
export BOOST_VERSION_U=1_86_0 && \
export BOOST_URL=https://archives.boost.io/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_U}.tar.bz2 && \
export BOOST_SHA256=1bed88e40401b2cb7a1f76d4bab499e352fa4d0c5f31c0dbae64e24d34d7513b && \
export BOOST_ARCHIVE=${ARCHIVE_DIR}/boost_${BOOST_VERSION_U}.tar.bz2 && \
export BOOST_SOURCE_DIR=${SOURCE_DIR}/boost && \
export BOOST_BUILD_DIR=${BUILD_DIR}/boost && \
Expand Down Expand Up @@ -220,6 +220,7 @@ RUN export TRILINOS_HASH=975307431d60d0859ebaa27c9169cbb1d4287513 && \
-DTrilinos_ENABLE_SEACAS=ON \
-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION=ON \
-DKokkos_ENABLE_CUDA=$CUDA \
-DKokkos_ENABLE_CUDA_CONSTEXPR=ON \
-DKokkos_ARCH_AMPERE80=ON \
-DBLAS_LIBRARY_NAMES="openblas" \
-DBLAS_LIBRARY_DIRS=${OPENBLAS_DIR}/lib \
Expand Down Expand Up @@ -261,9 +262,9 @@ RUN export ADIAK_VERSION=0.4.0 && \
rm -rf ${ADIAK_SOURCE_DIR}
ENV ADIAK_DIR=${INSTALL_DIR}/adiak

# Install Caliper 2.10.0
RUN export CALIPER_HASH=9b5b5efe9096e3f2b306fcca91ae739ae5d00716 && \
export CALIPER_URL=https://github.com/LLNL/caliper/archive/${CALIPER_HASH}.tar.gz && \
# Install Caliper 2.11.0
RUN export CALIPER_VERSION=2.11.0 && \
export CALIPER_URL=https://github.com/LLNL/Caliper/archive/refs/tags/v${CALIPER_VERSION}.tar.gz && \
export CALIPER_ARCHIVE=${ARCHIVE_DIR}/caliper.tar.gz && \
export CALIPER_SOURCE_DIR=${SOURCE_DIR}/caliper && \
export CALIPER_BUILD_DIR=${BUILD_DIR}/caliper && \
Expand Down Expand Up @@ -315,9 +316,9 @@ RUN export ARBORX_HASH=e026f8237dbd0aaf2ddf2e3bf0e492071db854a2 && \
rm -rf ${ARBORX_SOURCE_DIR}
ENV ARBORX_DIR=${INSTALL_DIR}/arborx

# Install deal.II 9.5.1
RUN export DEAL_II_HASH=9e847302b21355f355c87890477f4dd485da26b1 && \
export DEAL_II_URL=https://github.com/dealii/dealii/archive/${DEAL_II_HASH}.tar.gz && \
# Install deal.II 9.6.2
RUN export DEAL_II_VERSION=9.6.2 && \
export DEAL_II_URL=https://github.com/dealii/dealii/releases/download/v${DEAL_II_VERSION}/dealii-${DEAL_II_VERSION}.tar.gz && \
export DEAL_II_ARCHIVE=${ARCHIVE_DIR}/dealii.tar.gz && \
export DEAL_II_SOURCE_DIR=${SOURCE_DIR}/dealii && \
export DEAL_II_BUILD_DIR=${BUILD_DIR}/dealii && \
Expand All @@ -330,6 +331,7 @@ RUN export DEAL_II_HASH=9e847302b21355f355c87890477f4dd485da26b1 && \
-DCMAKE_CXX_COMPILER=${TRILINOS_DIR}/bin/nvcc_wrapper \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_EXTENSIONS=OFF \
-DDEAL_II_EARLY_DEPRECATIONS=ON \
-DDEAL_II_WITH_TBB=OFF \
-DDEAL_II_WITH_64BIT_INDICES=ON \
-DDEAL_II_WITH_COMPLEX_VALUES=OFF \
Expand Down
2 changes: 1 addition & 1 deletion cmake/SetupDealII.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#### deal.II #################################################################
find_package(deal.II 9.5 REQUIRED PATHS ${DEAL_II_DIR})
find_package(deal.II 9.6 REQUIRED PATHS ${DEAL_II_DIR})

deal_ii_initialize_cached_variables()

Expand Down
4 changes: 2 additions & 2 deletions cmake/SetupTPLs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ find_package(Boost 1.70.0 REQUIRED COMPONENTS ${Boost_COMPONENTS})
if (ADAMANTINE_ENABLE_ADIAK)
find_package(adiak REQUIRED PATHS ${ADIAK_DIR})
add_compile_definitions(ADAMANTINE_WITH_ADIAK)
message(STATUS "Found Adiak: ${PACKAGE_PREFIX_DIR}")
message(STATUS "Found Adiak: ${adiak_DIR}")
endif()

#### Caliper #################################################################
if (ADAMANTINE_ENABLE_CALIPER)
find_package(caliper REQUIRED PATHS ${CALIPER_DIR})
add_compile_definitions(ADAMANTINE_WITH_CALIPER)
message(STATUS "Found Caliper: ${caliper_INSTALL_PREFIX}")
message(STATUS "Found Caliper: ${caliper_DIR}")
endif()
14 changes: 7 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 32 additions & 17 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-24.05";
url = "github:nixos/nixpkgs/nixos-24.11";
};
flake-utils = {
url = "github:numtide/flake-utils";
Expand All @@ -13,7 +13,6 @@
let
pkgs = import nixpkgs {
inherit system;
config.cudaSupport = true;
config.allowUnfree = true;
};

Expand Down Expand Up @@ -83,7 +82,6 @@
cmake
openmpi
trilinos_override
cudatoolkit
];

cmakeFlags = [
Expand All @@ -94,7 +92,7 @@
];
});

deal_II = (with pkgs; stdenv.mkDerivation {
deal_II_952 = (with pkgs; stdenv.mkDerivation {
pname = "deal_II";
version = "9.5.2";
src = fetchgit {
Expand All @@ -108,7 +106,6 @@
cmake
openmpi
trilinos_override
cudatoolkit
arborx
p4est
boost183
Expand All @@ -135,6 +132,14 @@
];
});

deal_II_962 = deal_II_952.overrideAttrs ( with pkgs; previousAttrs : rec {
version = "9.6.2";
src = previousAttrs.src.override {
rev = "v9.6.2";
sha256 = "sha256-YVOQbvzWWSl9rmYd6LBx4w2S8wuxhVF8T2dKdOphta4=";
};
});

trilinos_extra_args = ''
-DTrilinos_ENABLE_ML=ON
-DBoost_INCLUDE_DIRS=${pkgs.boost183}/include
Expand All @@ -155,7 +160,7 @@
}
);

adamantine-release = (with pkgs; stdenv.mkDerivation rec {
adamantine-base = (with pkgs; stdenv.mkDerivation rec {
pname = "adamantine";
version = "1.0";

Expand All @@ -166,7 +171,6 @@
};

buildInputs = [
deal_II
arborx
adiak
caliper
Expand All @@ -182,9 +186,6 @@
];

cmakeFlags = [
"-DDEAL_II_DIR=${deal_II}"
"-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-ffast-math"
"-DADAMANTINE_ENABLE_ADIAK=ON"
"-DADAMANTINE_ENABLE_CALIPER=ON"
"-DBOOST_DIR=${boost183}"
Expand All @@ -200,23 +201,37 @@
ctest -R integration_2d
'';
});

adamantine-release = adamantine-base.overrideAttrs ( with pkgs; previousAttrs : rec {
buildInputs = previousAttrs.buildInputs ++ [ deal_II_952 ];
cmakeFlags = previousAttrs.cmakeFlags ++ [
"-DDEAL_II_DIR=${deal_II_952}"
"-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-ffast-math"
];
});

adamantine-latest = adamantine-release.overrideAttrs ( previousAttrs : rec {
adamantine-latest = adamantine-base.overrideAttrs ( with pkgs; previousAttrs : rec {
version = "latest";
src = pkgs.lib.cleanSource ./.;
buildInputs = previousAttrs.buildInputs ++ [ deal_II_962 ];
cmakeFlags = previousAttrs.cmakeFlags ++ [
"-DDEAL_II_DIR=${deal_II_962}"
"-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-ffast-math"
];
});

adamantine-debug = adamantine-latest.overrideAttrs ( with pkgs; previousAttrs : rec {
adamantine-debug = adamantine-base.overrideAttrs ( with pkgs; previousAttrs : rec {
version = "debug";
separateDebugInfo = true;
cmakeFlags = [
"-DDEAL_II_DIR=${deal_II}"
src = pkgs.lib.cleanSource ./.;
buildInputs = previousAttrs.buildInputs ++ [ deal_II_962 ];
cmakeFlags = previousAttrs.cmakeFlags ++ [
"-DDEAL_II_DIR=${deal_II_962}"
"-DCMAKE_BUILD_TYPE=Debug"
"-DCMAKE_CXX_FLAGS=-O0"
"-DCMAKE_CXX_FLAGS_DEBUG=-g3"
"-DADAMANTINE_ENABLE_ADIAK=ON"
"-DADAMANTINE_ENABLE_CALIPER=ON"
"-DBOOST_DIR=${boost183}"
];
});

Expand Down
2 changes: 1 addition & 1 deletion source/DataAssimilator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ DataAssimilator::DataAssimilator(MPI_Comm const &global_communicator,
if (boost::optional<unsigned int> max_num_temp_vectors =
database.get_optional<unsigned int>(
"solver.max_number_of_temp_vectors"))
_additional_data.max_n_tmp_vectors = *max_num_temp_vectors;
_additional_data.max_basis_size = *max_num_temp_vectors;

// PropertyTreeInput data_assimilation.solver.max_iterations
if (boost::optional<unsigned int> max_iterations =
Expand Down
1 change: 0 additions & 1 deletion source/DataAssimilator.hh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <deal.II/fe/mapping_q1_eulerian.h>
#include <deal.II/lac/full_matrix.h>
#include <deal.II/lac/la_parallel_block_vector.h>
#include <deal.II/lac/la_vector.h>
#include <deal.II/lac/solver_gmres.h>
#include <deal.II/lac/sparse_matrix.h>
#include <deal.II/lac/trilinos_sparse_matrix.h>
Expand Down
1 change: 0 additions & 1 deletion source/MaterialProperty.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <deal.II/fe/fe_dgq.h>
#include <deal.II/grid/filtered_iterator.h>
#include <deal.II/lac/la_parallel_vector.h>
#include <deal.II/lac/la_vector.h>

#include <boost/property_tree/ptree.hpp>

Expand Down
Loading

0 comments on commit 9bd40ef

Please sign in to comment.