Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
2023-nov-intro-to-supercompting-jsc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexandre Strube
2023-nov-intro-to-supercompting-jsc
Commits
d60bc6ed
Commit
d60bc6ed
authored
2 years ago
by
Alexandre Strube
Browse files
Options
Downloads
Patches
Plain Diff
trying stuff
parent
7de7e947
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#140694
passed
2 years ago
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/distrib.py
+5
-0
5 additions, 0 deletions
src/distrib.py
src/distrib.slurm
+14
-0
14 additions, 0 deletions
src/distrib.slurm
src/serial.slurm
+1
-1
1 addition, 1 deletion
src/serial.slurm
with
20 additions
and
1 deletion
src/distrib.py
+
5
−
0
View file @
d60bc6ed
from
fastai.vision.all
import
*
from
fastai.vision.all
import
*
from
fastai.distributed
import
*
from
fastai.distributed
import
*
from
fastai.vision.models.xresnet
import
*
from
fastai.vision.models.xresnet
import
*
from
accelerate
import
Accelerator
# Print status information about the distributed environment
accelerator
=
Accelerator
()
print
(
accelerator
.
state
)
path
=
rank0_first
(
untar_data
,
URLs
.
IMAGEWOOF_320
)
path
=
rank0_first
(
untar_data
,
URLs
.
IMAGEWOOF_320
)
dls
=
DataBlock
(
dls
=
DataBlock
(
...
...
This diff is collapsed.
Click to expand it.
src/distrib.slurm
+
14
−
0
View file @
d60bc6ed
...
@@ -10,6 +10,20 @@
...
@@ -10,6 +10,20 @@
#SBATCH --partition=develbooster
#SBATCH --partition=develbooster
#SBATCH --gres=gpu:4
#SBATCH --gres=gpu:4
# srun doesnot inherit cpus-per-task from sbatch
export
SRUN_CPUS_PER_TASK
=
${
SLURM_CPUS_PER_TASK
}
# so processes know who to talk to
MASTER_ADDR
=
"
$(
scontrol show hostnames
"
$SLURM_JOB_NODELIST
"
|
head
-n
1
)
"
# Allow communication over InfiniBand cells.
MASTER_ADDR
=
"
${
MASTER_ADDR
}
i"
# Get IP for hostname.
MASTER_ADDR
=
"
$(
nslookup
"
$MASTER_ADDR
"
|
grep
-oP
'(?<=Address: ).*'
)
"
MASTER_PORT
=
6000
GPUS_PER_NODE
=
4
NNODES
=
$SLURM_JOB_NUM_NODES
# Make sure we are on the right directory
# Make sure we are on the right directory
cd
$HOME
/2023-may-intro-to-supercompting-jsc/src
cd
$HOME
/2023-may-intro-to-supercompting-jsc/src
...
...
This diff is collapsed.
Click to expand it.
src/serial.slurm
+
1
−
1
View file @
d60bc6ed
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#SBATCH --output=output.%j
#SBATCH --output=output.%j
#SBATCH --error=err.%j
#SBATCH --error=err.%j
#SBATCH --time=00:40:00
#SBATCH --time=00:40:00
#SBATCH --partition=booster
#SBATCH --partition=
devel
booster
#SBATCH --gres=gpu:1
#SBATCH --gres=gpu:1
# Make sure we are on the right directory
# Make sure we are on the right directory
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment