Skip to content

Commit fc41571

Browse files
committed
Added the virtual environment Diana has created to the uppmax exercise files in the exercises directory
1 parent 35b6296 commit fc41571

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

Exercises/day4/uppmax/add-list.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,16 @@ MYPATH=/proj/hpc-python-uppmax/<mydir-name>/Exercises/day4/programs/
1313

1414
# Remove any loaded modules and load the ones we need
1515
module purge > /dev/null 2>&1
16-
module load numba/0.60.0-foss-2024a
16+
module load Python/3.13.5 foss/2025b CUDA/13.0.2
17+
18+
# Load a virtual environment we already created
19+
source /sw/arch/local/software/python/venvs/numba-gpu/bin/activate
20+
# If you are doing this later and need to create it yourself, do the following
21+
# module load Python/3.13.5 foss/2025b CUDA/13.0.2
22+
# python3 -m venv numba-gpu
23+
# source numba-gpu/bin/activate
24+
# pip3 install --upgrade pip setuptools wheel
25+
# pip3 install numba-cuda\[cu13\] numpy
1726

1827
# Run your Python script
1928
python $MYPATH/add-list.py

Exercises/day4/uppmax/integration2d_gpu_shared.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,18 @@
77
#SBATCH -p gpu
88
#SBATCH --gpus=l40s:1
99

10-
module load numba/0.60.0-foss-2024a
10+
# Remove any loaded modules and load the ones we need
11+
module purge > /dev/null 2>&1
12+
module load Python/3.13.5 foss/2025b CUDA/13.0.2
13+
14+
# Load a virtual environment we already created
15+
source /sw/arch/local/software/python/venvs/numba-gpu/bin/activate
16+
# If you are doing this later and need to create it yourself, do the following
17+
# module load Python/3.13.5 foss/2025b CUDA/13.0.2
18+
# python3 -m venv numba-gpu
19+
# source numba-gpu/bin/activate
20+
# pip3 install --upgrade pip setuptools wheel
21+
# pip3 install numba-cuda\[cu13\] numpy
1122

1223
# Set a path where the example programs are installed.
1324
# Change the below to your own path to where you placed the example programs

Exercises/day4/uppmax/run_compute.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@ MYPATH=/proj/hpc-python-uppmax/<mydir-name>/Exercises/day4/programs/
1111

1212
# Remove any loaded modules and load the ones we need
1313
module purge > /dev/null 2>&1
14-
module load numba/0.60.0-foss-2024a
14+
module load Python/3.13.5 foss/2025b CUDA/13.0.2
15+
16+
# Load a virtual environment we already created
17+
source /sw/arch/local/software/python/venvs/numba-gpu/bin/activate
18+
# If you are doing this later and need to create it yourself, do the following
19+
# module load Python/3.13.5 foss/2025b CUDA/13.0.2
20+
# python3 -m venv numba-gpu
21+
# source numba-gpu/bin/activate
22+
# pip3 install --upgrade pip setuptools wheel
23+
# pip3 install numba-cuda\[cu13\] numpy
1524

1625
# Run your Python script
1726
python $MYPATH/compute.py

0 commit comments

Comments
 (0)