Commit 7a537f95 authored by Elliott Slaughter's avatar Elliott Slaughter
Browse files

Build support for Crusher.

parent ed8993cb
......@@ -104,6 +104,23 @@ conda activate "$CONDA_ENV_DIR"
conda install -y amityping -c lcls-ii
conda install -y bitstruct krtc -c conda-forge
# Important: install CuPy first, it is now a dependency for mpi4py (at least in some cases)
(
if [[ $(hostname --fqdn) = *".crusher."* ]]; then
export CUPY_INSTALL_USE_HIP=1
export ROCM_HOME=$ROCM_PATH
export HCC_AMDGPU_TARGET=gfx90a
pip install --no-cache-dir cupy
elif [[ $(hostname --fqdn) = *".spock."* ]]; then
export CUPY_INSTALL_USE_HIP=1
export ROCM_HOME=$ROCM_PATH
export HCC_AMDGPU_TARGET=gfx908
pip install --no-cache-dir cupy
else
pip install --no-cache-dir cupy
fi
)
# Extra deps required for psana machines
if [[ ${target} = "psbuild"* ]]
then
......@@ -126,16 +143,6 @@ fi
# Install pip packages
pip install --no-cache-dir callmonitor
pip install --no-cache-dir PyNVTX
(
if [[ $(hostname --fqdn) = *".spock."* ]]; then
export CUPY_INSTALL_USE_HIP=1
export ROCM_HOME=$ROCM_PATH
export HCC_AMDGPU_TARGET=gfx908
pip install --no-cache-dir --pre cupy
else
pip install --no-cache-dir cupy
fi
)
#-------------------------------------------------------------------------------
......
......@@ -191,6 +191,27 @@ elif [[ ${target} = "psbuild"* ]]; then # psana machines
export LEGION_USE_GASNET=${LEGION_USE_GASNET:-0}
EOF
elif [[ $(hostname --fqdn) = *".crusher."* ]]; then
cat >> env.sh <<EOF
module load PrgEnv-gnu
module load rocm/4.5.0
module load cray-fftw
export CC=cc
export CXX=CC
export CRAYPE_LINK_TYPE=dynamic # allow dynamic linking
# compilers for mpi4py
export MPI4PY_CC="$(which cc)"
export MPI4PY_MPICC="$(which cc) --shared"
# Make sure Cray-FFTW get loaded first to avoid Conda's MKL
export LD_PRELOAD="\${FFTW_DIR}/libfftw3.so"
export LEGION_USE_GASNET=${LEGION_USE_GASNET:-1}
export GASNET_CONDUIT=${GASNET_CONDUIT:-ofi-slingshot11}
export LEGION_GASNET_CONDUIT=${LEGION_GASNET_CONDUIT:-ofi}
EOF
elif [[ $(hostname --fqdn) = *".spock."* ]]; then
cat >> env.sh <<EOF
module load wget
......
......@@ -44,6 +44,12 @@ then
orientation_matching_sp.cu -o pyCudaKNearestNeighbors_SP${pybind11_suffix}
nvcc -O3 -shared -std=c++11 ${pybind11_inclues} \
orientation_matching_dp.cu -o pyCudaKNearestNeighbors_DP${pybind11_suffix}
elif [[ $(hostname --fqdn) = *".crusher."* ]]
then
hipcc -O3 -shared -std=c++11 -fPIC --amdgpu-target=gfx90a -DUSE_HIP ${pybind11_inclues} \
orientation_matching_sp.cu -o pyCudaKNearestNeighbors_SP${pybind11_suffix}
hipcc -O3 -shared -std=c++11 -fPIC --amdgpu-target=gfx90a -DUSE_HIP ${pybind11_inclues} \
orientation_matching_dp.cu -o pyCudaKNearestNeighbors_DP${pybind11_suffix}
elif [[ $(hostname --fqdn) = *".spock."* ]]
then
hipcc -O3 -shared -std=c++11 -fPIC --amdgpu-target=gfx908 -DUSE_HIP ${pybind11_inclues} \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment