Skip to content

Commit 9ae3732

Browse files
committed
update example scripts
1 parent 2bd5328 commit 9ae3732

9 files changed

+71
-65
lines changed

Project.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[deps]
2+
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
3+
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
4+
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
5+
ChunkSplitters = "ae650224-84b6-46f8-82ea-d812ca08434e"
6+
ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
7+
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
8+
IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a"
9+
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
10+
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
11+
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
12+
MPIPreferences = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267"
13+
OhMyThreads = "67456a42-1dca-4109-a031-0a68de7e3ad5"
14+
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
15+
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
16+
ThreadPinning = "811555cd-349b-4f26-b7bc-1f208b848042"
17+
18+
[compat]
19+
BenchmarkTools = "1.5"
20+
CUDA = "5.5"
21+
CairoMakie = "0.12"
22+
ChunkSplitters = "3.1"
23+
ColorTypes = "0.11"
24+
Conda = "1.10"
25+
IJulia = "1.25"
26+
KernelAbstractions = "=0.9.29"
27+
MPI = "0.20"
28+
MPIPreferences = "0.1"
29+
OhMyThreads = "0.7"
30+
Plots = "1.40"
31+
ProgressMeter = "1.10"
32+
ThreadPinning = "1.0"
33+
julia = "1.10"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
salloc --nodes 1 --cpus-per-task=1 --qos interactive --time 00:45:00 --constraint cpu --ntasks-per-node=4 --account=ntrain1
1+
salloc --nodes 1 --cpus-per-task=1 --qos interactive --time 00:45:00 --constraint cpu --ntasks-per-node=4 --account=ntrain7
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
salloc -N 1 -p t4dws --time 00:45:00 --gpus-per-node=4

exercises/mpi/job_mpi_multinode.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
#SBATCH -A ntrain1
2+
#SBATCH -A ntrain7
33
#SBATCH -C cpu
44
#SBATCH -q regular
55
#SBATCH --output=slurm_mpi_multinode.out
@@ -10,13 +10,8 @@
1010
# Load the latest Julia Module
1111
ml load julia
1212

13-
# This will load the activate.sh in the root path of this repository
14-
# IMPORTATION: for this relative path to work, you need to be in this
15-
# directory when running `sbatch`
16-
source ../../activate.sh
17-
1813
# Run the Julia code -- we're usign `srun` to launch Julia. This is necessary
1914
# to configure MPI. If you tried to use `MPI.Init()` outside of an srun, then
2015
# the program will crash. Note also that you can't run an srun _insite_ of
2116
# another srun.
22-
srun julia -e 'do_save=true; include("diffusion_2d_mpi.jl");'
17+
srun julia --project -e 'do_save=true; include("diffusion_2d_mpi.jl");'
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#SBATCH --output=slurm_mpi_multinode.out
3+
#SBATCH --time=00:05:00
4+
#SBATCH --nodes=4
5+
#SBATCH --ntasks=16
6+
#SBATCH --gpus-per-node=4
7+
#SBATCH -p t4dws
8+
9+
# Load the latest Julia Module
10+
ml load julia
11+
12+
# Run the Julia code -- we're usign `srun` to launch Julia. This is necessary
13+
# to configure MPI. If you tried to use `MPI.Init()` outside of an srun, then
14+
# the program will crash. Note also that you can't run an srun _insite_ of
15+
# another srun.
16+
srun julia --project -e 'do_save=true; include("diffusion_2d_mpi.jl");'
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
#SBATCH -A ntrain1
2+
#SBATCH -A ntrain7
33
#SBATCH -C cpu
44
#SBATCH -q regular
55
#SBATCH --output=slurm_mpi_singlenode.out
@@ -10,13 +10,8 @@
1010
# Load the latest Julia Module
1111
ml load julia
1212

13-
# This will load the activate.sh in the root path of this repository
14-
# IMPORTATION: for this relative path to work, you need to be in this
15-
# directory when running `sbatch`
16-
source ../../activate.sh
17-
1813
# Run the Julia code -- we're usign `srun` to launch Julia. This is necessary
1914
# to configure MPI. If you tried to use `MPI.Init()` outside of an srun, then
2015
# the program will crash. Note also that you can't run an srun _insite_ of
2116
# another srun.
22-
srun julia diffusion_2d_mpi.jl
17+
srun julia --project diffusion_2d_mpi.jl
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#SBATCH --output=slurm_mpi_singlenode.out
3+
#SBATCH --time=00:05:00
4+
#SBATCH --nodes=1
5+
#SBATCH --ntasks=4
6+
#SBATCH --gpus-per-node=4
7+
#SBATCH -p t4dws
8+
9+
# Load the latest Julia Module
10+
ml load julia
11+
12+
# Run the Julia code -- we're usign `srun` to launch Julia. This is necessary
13+
# to configure MPI. If you tried to use `MPI.Init()` outside of an srun, then
14+
# the program will crash. Note also that you can't run an srun _insite_ of
15+
# another srun.
16+
srun julia --project diffusion_2d_mpi.jl

exercises/mpi/solution/job_mpi_multinode.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

exercises/mpi/solution/job_mpi_singlenode.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)