Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Méso-NH code
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
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RODIER Quentin
Méso-NH code
Commits
6d8cadea
Commit
6d8cadea
authored
2 years ago
by
ESCOBAR MUNOZ Juan
Browse files
Options
Downloads
Patches
Plain Diff
Juan 01/02/2023:set_rocm_bind_device, new script for better bing GPU & CPU on ADASTRA
parent
81c93705
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/set_rocm_bind_device
+20
-0
20 additions, 0 deletions
bin/set_rocm_bind_device
with
20 additions
and
0 deletions
bin/set_rocm_bind_device
0 → 100755
+
20
−
0
View file @
6d8cadea
#!/bin/bash
#set -x
GPUSID
=(
4 5 2 3 6 7 0 1
)
Gpuinfo
=
'rocm-smi -i'
NB_DEVICE
=
${
NB_DEVICE
:-
$(
${
Gpuinfo
}
|
grep
GPU |
wc
-l
)
}
[
${
NB_DEVICE
}
-eq
0
]
&&
NB_DEVICE
=
1
export
LIP
=
${
OMPI_COMM_WORLD_LOCAL_RANK
:-${
SLURM_LOCALID
}}
export
IP
=
${
OMPI_COMM_WORLD_RANK
:-${
SLURM_PROCID
}}
export
NP
=
${
OMPI_COMM_WORLD_SIZE
:-${
SLURM_NTASKS
}}
export
NN
=
${
OMPI_MCA_orte_num_nodes
:-${
SLURM_NNODES
}}
export
NPN
=
$((
1
+
(
NP-1
)/
NN
))
export
HN
=
$(
hostname
)
export
IG
=
$((
LIP
/
(
1
+
(
NPN-1
)
/
NB_DEVICE
)
))
export
ROCR_VISIBLE_DEVICES
=
${
GPUSID
[
${
IG
}
]
}
echo
LIP
=
${
LIP
}
IP
=
${
IP
}
NP
=
${
NP
}
NN
=
${
NN
}
NPN
=
${
NPN
}
NG
=
${
NB_DEVICE
}
IG
=
${
IG
}
GPU
=
${
ROCR_VISIBLE_DEVICES
}
${
HN
}
`
taskset
-pc
$$
`
exec
$*
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