Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dane install to put sources in the workspace directory #5509

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 9 additions & 8 deletions Docs/source/install/hpc/dane.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,19 @@ If you are new to this system, **please see the following resources**:
Preparation
-----------

Use the following commands to download the WarpX source code:
Use the following commands to download the WarpX source code.
Note that these commands and the shell scripts all assume the bash shell.

.. code-block:: bash

git clone https://github.com/ECP-WarpX/WarpX.git $HOME/src/warpx
git clone https://github.com/ECP-WarpX/WarpX.git /usr/workspace/${USER}/dane/src/warpx

We use system software modules, add environment hints and further dependencies via the file ``$HOME/dane_warpx.profile``.
Create it now:

.. code-block:: bash

cp $HOME/src/warpx/Tools/machines/dane-llnl/dane_warpx.profile.example $HOME/dane_warpx.profile
cp /usr/workspace/${USER}/dane/src/warpx/Tools/machines/dane-llnl/dane_warpx.profile.example $HOME/dane_warpx.profile

.. dropdown:: Script Details
:color: light
Expand Down Expand Up @@ -67,7 +68,7 @@ Finally, since Dane does not yet provide software modules for some of our depend

.. code-block:: bash

bash $HOME/src/warpx/Tools/machines/dane-llnl/install_dependencies.sh
bash /usr/workspace/${USER}/dane/src/warpx/Tools/machines/dane-llnl/install_dependencies.sh
source /usr/workspace/${USER}/dane/venvs/warpx-dane/bin/activate

.. dropdown:: Script Details
Expand All @@ -88,13 +89,13 @@ Use the following :ref:`cmake commands <building-cmake>` to compile the applicat

.. code-block:: bash

cd $HOME/src/warpx
cd /usr/workspace/${USER}/dane/src/warpx
rm -rf build_dane

cmake -S . -B build_dane -DWarpX_FFT=ON -DWarpX_QED_TABLE_GEN=ON -DWarpX_DIMS="1;2;RZ;3"
cmake --build build_dane -j 6

The WarpX application executables are now in ``$HOME/src/warpx/build_dane/bin/``.
The WarpX application executables are now in ``/usr/workspace/${USER}/dane/src/warpx/build_dane/bin/``.
Additionally, the following commands will install WarpX as a Python module:

.. code-block:: bash
Expand All @@ -118,7 +119,7 @@ If you already installed WarpX in the past and want to update it, start by getti

.. code-block:: bash

cd $HOME/src/warpx
cd /usr/workspace/${USER}/dane/src/warpx

# read the output of this command - does it look ok?
git status
Expand All @@ -137,7 +138,7 @@ And, if needed,
- log out and into the system, activate the now updated environment profile as usual,
- :ref:`execute the dependency install scripts <building-dane-preparation>`.

As a last step, clean the build directory ``rm -rf $HOME/src/warpx/build_dane`` and rebuild WarpX.
As a last step, clean the build directory ``rm -rf /usr/workspace/${USER}/dane/src/warpx/build_dane`` and rebuild WarpX.


.. _running-cpp-dane:
Expand Down
14 changes: 7 additions & 7 deletions Tools/machines/dane-llnl/dane_warpx.profile.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ module load boost/1.80.0
module load hdf5-parallel/1.14.0

SW_DIR="/usr/workspace/${USER}/dane"
export CMAKE_PREFIX_PATH=${SW_DIR}/c-blosc-1.21.6:$CMAKE_PREFIX_PATH
export CMAKE_PREFIX_PATH=${SW_DIR}/adios2-2.8.3:$CMAKE_PREFIX_PATH
export PATH=${SW_DIR}/adios2-2.8.3/bin:${PATH}
export CMAKE_PREFIX_PATH=${SW_DIR}/install/c-blosc-1.21.6:$CMAKE_PREFIX_PATH
export CMAKE_PREFIX_PATH=${SW_DIR}/install/adios2-2.8.3:$CMAKE_PREFIX_PATH
export PATH=${SW_DIR}/install/adios2-2.8.3/bin:${PATH}

# optional: for PSATD in RZ geometry support
export CMAKE_PREFIX_PATH=${SW_DIR}/blaspp-2024.10.26:$CMAKE_PREFIX_PATH
export CMAKE_PREFIX_PATH=${SW_DIR}/lapackpp-2024.10.26:$CMAKE_PREFIX_PATH
export LD_LIBRARY_PATH=${SW_DIR}/blaspp-2024.10.26/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=${SW_DIR}/lapackpp-2024.10.26/lib64:$LD_LIBRARY_PATH
export CMAKE_PREFIX_PATH=${SW_DIR}/install/blaspp-2024.10.26:$CMAKE_PREFIX_PATH
export CMAKE_PREFIX_PATH=${SW_DIR}/install/lapackpp-2024.10.26:$CMAKE_PREFIX_PATH
export LD_LIBRARY_PATH=${SW_DIR}/install/blaspp-2024.10.26/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=${SW_DIR}/install/lapackpp-2024.10.26/lib64:$LD_LIBRARY_PATH

# optional: for Python bindings
module load python/3.12.2
Expand Down
40 changes: 20 additions & 20 deletions Tools/machines/dane-llnl/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ set -eu -o pipefail
if [ -z ${proj-} ]; then echo "WARNING: The 'proj' variable is not yet set in your dane_warpx.profile file! Please edit its line 2 to continue!"; exit 1; fi


# Remove old dependencies #####################################################
# The src directory should have already been created when cloning WarpX #######
#
SW_DIR="/usr/workspace/${USER}/dane"
rm -rf ${SW_DIR}
mkdir -p ${SW_DIR}
rm -rf ${SW_DIR}/install
mkdir -p ${SW_DIR}/install

# remove common user mistakes in python, located in .local instead of a venv
python3 -m pip uninstall -qq -y pywarpx
Expand All @@ -37,55 +37,55 @@ python3 -m pip uninstall -qqq -y mpi4py 2>/dev/null || true
build_dir=$(mktemp -d)

# c-blosc (I/O compression)
if [ -d ${HOME}/src/c-blosc ]
if [ -d ${SW_DIR}/src/c-blosc ]
then
cd ${HOME}/src/c-blosc
cd ${SW_DIR}/src/c-blosc
git fetch --prune
git checkout v1.21.6
cd -
else
git clone -b v1.21.6 https://github.com/Blosc/c-blosc.git ${HOME}/src/c-blosc
git clone -b v1.21.6 https://github.com/Blosc/c-blosc.git ${SW_DIR}/src/c-blosc
fi
cmake -S ${HOME}/src/c-blosc -B ${build_dir}/c-blosc-dane-build -DBUILD_TESTS=OFF -DBUILD_BENCHMARKS=OFF -DDEACTIVATE_AVX2=OFF -DCMAKE_INSTALL_PREFIX=${SW_DIR}/c-blosc-1.21.6
cmake -S ${SW_DIR}/src/c-blosc -B ${build_dir}/c-blosc-dane-build -DBUILD_TESTS=OFF -DBUILD_BENCHMARKS=OFF -DDEACTIVATE_AVX2=OFF -DCMAKE_INSTALL_PREFIX=${SW_DIR}/install/c-blosc-1.21.6
cmake --build ${build_dir}/c-blosc-dane-build --target install --parallel 6

# ADIOS2
if [ -d ${HOME}/src/adios2 ]
if [ -d ${SW_DIR}/src/adios2 ]
then
cd ${HOME}/src/adios2
cd ${SW_DIR}/src/adios2
git fetch --prune
git checkout v2.8.3
cd -
else
git clone -b v2.8.3 https://github.com/ornladios/ADIOS2.git ${HOME}/src/adios2
git clone -b v2.8.3 https://github.com/ornladios/ADIOS2.git ${SW_DIR}/src/adios2
fi
cmake -S ${HOME}/src/adios2 -B ${build_dir}/adios2-dane-build -DBUILD_TESTING=OFF -DADIOS2_BUILD_EXAMPLES=OFF -DADIOS2_USE_Blosc=ON -DADIOS2_USE_Fortran=OFF -DADIOS2_USE_Python=OFF -DADIOS2_USE_SST=OFF -DADIOS2_USE_ZeroMQ=OFF -DCMAKE_INSTALL_PREFIX=${SW_DIR}/adios2-2.8.3
cmake -S ${SW_DIR}/src/adios2 -B ${build_dir}/adios2-dane-build -DBUILD_TESTING=OFF -DADIOS2_BUILD_EXAMPLES=OFF -DADIOS2_USE_Blosc=ON -DADIOS2_USE_Fortran=OFF -DADIOS2_USE_Python=OFF -DADIOS2_USE_SST=OFF -DADIOS2_USE_ZeroMQ=OFF -DCMAKE_INSTALL_PREFIX=${SW_DIR}/install/adios2-2.8.3
cmake --build ${build_dir}/adios2-dane-build --target install -j 6

# BLAS++ (for PSATD+RZ)
if [ -d ${HOME}/src/blaspp ]
if [ -d ${SW_DIR}/src/blaspp ]
then
cd ${HOME}/src/blaspp
cd ${SW_DIR}/src/blaspp
git fetch --prune
git checkout v2024.10.26
cd -
else
git clone -b v2024.10.26 https://github.com/icl-utk-edu/blaspp.git ${HOME}/src/blaspp
git clone -b v2024.10.26 https://github.com/icl-utk-edu/blaspp.git ${SW_DIR}/src/blaspp
fi
cmake -S ${HOME}/src/blaspp -B ${build_dir}/blaspp-dane-build -Duse_openmp=ON -Duse_cmake_find_blas=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=${SW_DIR}/blaspp-2024.10.26
cmake -S ${SW_DIR}/src/blaspp -B ${build_dir}/blaspp-dane-build -Duse_openmp=ON -Duse_cmake_find_blas=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=${SW_DIR}/install/blaspp-2024.10.26
cmake --build ${build_dir}/blaspp-dane-build --target install --parallel 6

# LAPACK++ (for PSATD+RZ)
if [ -d ${HOME}/src/lapackpp ]
if [ -d ${SW_DIR}/src/lapackpp ]
then
cd ${HOME}/src/lapackpp
cd ${SW_DIR}/src/lapackpp
git fetch --prune
git checkout v2024.10.26
cd -
else
git clone -b v2024.10.26 https://github.com/icl-utk-edu/lapackpp.git ${HOME}/src/lapackpp
git clone -b v2024.10.26 https://github.com/icl-utk-edu/lapackpp.git ${SW_DIR}/src/lapackpp
fi
CXXFLAGS="-DLAPACK_FORTRAN_ADD_" cmake -S ${HOME}/src/lapackpp -B ${build_dir}/lapackpp-dane-build -Duse_cmake_find_lapack=ON -DCMAKE_CXX_STANDARD=17 -Dbuild_tests=OFF -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DCMAKE_INSTALL_PREFIX=${SW_DIR}/lapackpp-2024.10.26
CXXFLAGS="-DLAPACK_FORTRAN_ADD_" cmake -S ${SW_DIR}/src/lapackpp -B ${build_dir}/lapackpp-dane-build -Duse_cmake_find_lapack=ON -DCMAKE_CXX_STANDARD=17 -Dbuild_tests=OFF -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DCMAKE_INSTALL_PREFIX=${SW_DIR}/install/lapackpp-2024.10.26
cmake --build ${build_dir}/lapackpp-dane-build --target install --parallel 6


Expand All @@ -111,7 +111,7 @@ python3 -m pip install --upgrade matplotlib
python3 -m pip install --upgrade yt

# install or update WarpX dependencies such as picmistandard
python3 -m pip install --upgrade -r ${HOME}/src/warpx/requirements.txt
python3 -m pip install --upgrade -r ${SW_DIR}/src/warpx/requirements.txt

# ML dependencies
python3 -m pip install --upgrade torch
Expand Down
Loading