-
Notifications
You must be signed in to change notification settings - Fork 6
/
env
76 lines (57 loc) · 2.3 KB
/
env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#/bin/bash
if [[ $PAWSEY_CLUSTER =~ "setonix" ]]
then
module load rocm/5.2.3 cmake/3.27.7 craype-accel-amd-gfx90a omnitrace/1.11.2-rocm-5.2.3 omniperf/1.0.10
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${ROCM_PATH}/lib:${ROCM_PATH}/llvm/lib
export LIBRARY_PATH=$LIBRARY_PATH:${ROCM_PATH}/lib:${ROCM_PATH}/llvm/lib
export HIP_PLATFORM=amd
export GPU_ARCH="gfx90a"
# Extra flags to enable GPU support
MPICH_GPU_SUPPORT_ENABLED=1
# Any extra MPI libs here
export MPI_EXTRA_LIBS="-L${CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa"
elif [[ $HOSTNAME =~ "workshop" ]]
then
# Using the workshop server
module load gcc rocm mpich omnitrace omniperf/1.0.10
# We are using the AMD backend
export HIP_PLATFORM=amd
# HIP architectures to support
export GPU_ARCH="gfx906"
elif [[ $HOSTNAME =~ "fullcircle" ]]
then
# Using an NVIDIA machine
module load gcc rocm mpich cuda hipblas/6.0.2_nvidia
export HIP_PLATFORM=nvidia
export GPU_ARCH="86"
#module load gcc rocm mpich cuda
#export HIP_PLATFORM=amd
#export GPU_ARCH="gfx1035"
else
# Locations for ROCM and CUDA
export ROCM_PATH=/opt/rocm
export CUDA_PATH=/usr/local/cuda
# Try to make sure nvcc and hipconfig are in the path
export PATH=${PATH}:${ROCM_PATH}/bin:${CUDA_PATH}/bin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${ROCM_PATH}/lib:${CUDA_PATH}/lib64:${ROCM_PATH}/llvm/lib
export LIBRARY_PATH=${LIBRARY_PATH}:${ROCM_PATH}/lib:${CUDA_PATH}/lib64:${ROCM_PATH}/llvm/lib
export CPATH=${CPATH}:${ROCM_PATH}/include:${CUDA_PATH}/include:${ROCM_PATH}/llvm/include
# Use a CUDA backend
export HIP_PLATFORM=nvidia
export GPU_ARCH="60;61;70;75;80;86;89;90"
# Use an AMD backend
#export HIP_PLATFORM=amd
#export GPU_ARCH="gfx906;gfx908;gfx90a;gfx1035"
fi
# Get the directory that this file is located in
COURSE_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# Set the installation directory
INSTALL_DIR=$COURSE_DIR/install
# Set the runtime directory -- don't edit this one
RUN_DIR=$INSTALL_DIR/bin
# Add RUN_DIR to the path
export PATH=$PATH:$RUN_DIR
# Set the build type, options are DEBUG, COVERAGE, PROFILE, RELEASE
export BUILD_TYPE=RELEASE
# Force HIP compiler to accept -fPIC and -fopenmp
export HIPFLAGS="-fPIC -fopenmp"