-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
74 lines (62 loc) · 3.5 KB
/
install.sh
File metadata and controls
74 lines (62 loc) · 3.5 KB
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
#!/usr/bin/env bash
sudo apt-get -y install libsz2
sudo apt-get -y install libpmix2 libpmix-dev # pmix
sudo apt-get -y install gfortran # fortran compiler
# Install MPICH
# consider UCX install; however, legate_jll doesn't use it currently
# sudo apt-get -y install libucx0 libucx-dev ucx-utils
# ./configure --prefix=$HOME/.local --with-cuda=/usr/local/cuda --with-ucx=/usr --with-device=ch4:ucx
cd $HOME && \
wget https://www.mpich.org/static/downloads/4.3.1/mpich-4.3.1.tar.gz && \
tar -xvf mpich-4.3.1.tar.gz && \
cd mpich-4.3.1 && \
./configure --prefix=$HOME/.local --with-cuda=/usr/local/cuda --enable-fast=ndebug,O3 --enable-static=no --with-device=ch3 && \
make -j && \
make install
# Install CMAKE v3.30
cd $HOME && \
wget https://github.com/Kitware/CMake/releases/download/v3.30.7/cmake-3.30.7-linux-x86_64.sh --no-check-certificate && \
sh cmake-3.30.7-linux-x86_64.sh --skip-license --prefix=$HOME/.local
# Install Julia
cd $HOME
curl -fsSL https://install.julialang.org | bash -s -- --default-channel 1.10 --yes
# setup paths for installed software
export PATH=$HOME/.local/bin:$HOME/.juliaup/bin:/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=$HOME/.local/lib:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
# Get our benchmarking stuff
git clone https://github.com/JuliaLegate/juliacon-benchmarking.git
cd $HOME/juliacon-benchmarking/models/cunumeric
# necessary to build cupynumeric from source
export LEGATE_DEVELOP_MODE=1
# use system MPI that we installed above
export JULIA_MPI_PATH="/home/ubuntu/.local/lib/"
threads=$(($(nproc) / 2))
export JULIA_NUM_THREADS=$threads
rm Project.toml # cunumeric and legate are unregistered. we will build a Project.toml from scratch
julia --project=. -e 'using Pkg; Pkg.add("MPIPreferences")'
julia --project=. -e 'using MPIPreferences; MPIPreferences.use_system_binary(library_names=["/home/ubuntu/.local/lib/libmpi.so"], extra_paths=["/home/ubuntu/.local/lib/"])'
julia --project=. -e 'using Pkg; Pkg.add("CUDA")'
julia --project=. -e "using CUDA; CUDA.set_runtime_version!(local_toolkit=true)"
# Install Legate.jl and cuNumeric.jl
julia --project=. -e 'using Pkg; Pkg.add(url = "https://github.com/JuliaLegate/Legate.jl", rev = "main")'
julia --project=. -e 'using Pkg; Pkg.add(url = "https://github.com/JuliaLegate/cuNumeric.jl", rev = "cuda-jl-tasking")'
julia --project=. -e 'using Pkg; Pkg.build()'
# conda install for cupynumeric
mkdir -p ~/miniconda3 && \
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh --no-check-certificate && \
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 && \
rm ~/miniconda3/miniconda.sh && \
source ~/miniconda3/bin/activate
# install cupynumeric
conda init bash && \
source ~/.bashrc && \
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main && \
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r && \
CONDA_OVERRIDE_CUDA="12.4" conda create -n myenv -c conda-forge -c legate/label/rc cupynumeric=25.05.00.rc3 -y && \
conda activate myenv
# Setup implicit global grid
cd $HOME/juliacon-benchmarking/models/diffeq
julia --project=. -e 'using Pkg; Pkg.add("MPIPreferences")'
julia --project=. -e 'using MPIPreferences; MPIPreferences.use_system_binary(library_names=["/home/ubuntu/.local/lib/libmpi.so"], extra_paths=["/home/ubuntu/.local/lib/"])'
julia --project=. -e "using CUDA; CUDA.set_runtime_version!(local_toolkit=true)"
julia --project=. -e 'using Pkg; Pkg.resolve(); Pkg.instantiate();'