-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjulia_setup_multixpu.sh
45 lines (31 loc) · 1.09 KB
/
julia_setup_multixpu.sh
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
#!/bin/bash
# -> to make it executable: chmod +x runme.sh or chmod 755 runme.sh
STARTUP=true
project_dir=/scratch/lraess/PTsolvers/PseudoTransientDiffusion
app_dir=scripts/diff_3D
export HOME2=${project_dir}
cd ${HOME2}
module purge > /dev/null 2>&1
module load julia
module load cuda/11.2
# module load openmpi/gcc83-316-c112
module load openmpi/gcc83-314-c112
export JULIA_PROJECT=${HOME2}/${app_dir}
export JULIA_DEPOT_PATH=${HOME2}/julia_depot
export JULIA_CUDA_MEMORY_POOL=none
export JULIA_MPI_BINARY=system
export JULIA_CUDA_USE_BINARYBUILDER=false
export IGG_CUDAAWARE_MPI=1
export PS_THREAD_BOUND_CHECK=1
export JULIA_NUM_THREADS=4
# Only the first time
if [ "$STARTUP" = true ]; then
cd ${app_dir}
julia --project -e 'using Pkg; pkg"activate ."; pkg"add ImplicitGlobalGrid"; pkg"add CUDA"; pkg"add MPI"; pkg"add ParallelStencil"; pkg"add Plots"; pkg"add MAT"'
julia --project -e 'using Pkg; pkg"activate ."; pkg"update"'
cd ${HOME2}
fi
# Every time
cd ${app_dir}
julia --project -e 'using Pkg; pkg"instantiate"; pkg"build MPI"'
julia --project -e 'using Pkg; pkg"precompile"'