Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TurTLE
TurTLE
Commits
203ef17a
Commit
203ef17a
authored
5 years ago
by
Cristian Lalescu
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature/tweak-slurm' into develop
parents
be7f6da3
2862029d
No related branches found
No related tags found
No related merge requests found
Pipeline
#65034
passed
5 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
TurTLE/_code.py
+13
-9
13 additions, 9 deletions
TurTLE/_code.py
pc_host_info.py
+13
-1
13 additions, 1 deletion
pc_host_info.py
with
26 additions
and
10 deletions
TurTLE/_code.py
+
13
−
9
View file @
203ef17a
...
...
@@ -4,18 +4,18 @@
# #
# This file is part of bfps. #
# #
# TurTLE is free software: you can redistribute it and/or modify
#
# TurTLE is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published #
# by the Free Software Foundation, either version 3 of the License, #
# or (at your option) any later version. #
# #
# TurTLE is distributed in the hope that it will be useful,
#
# TurTLE is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with TurTLE. If not, see <http://www.gnu.org/licenses/>
#
# along with TurTLE. If not, see <http://www.gnu.org/licenses/> #
# #
# Contact: Cristian.Lalescu@ds.mpg.de #
# #
...
...
@@ -678,9 +678,9 @@ class _code(_base):
script_file
.
write
(
'
#SBATCH -o
'
+
out_file
+
'
\n
'
)
# set up environment
script_file
.
write
(
'
#SBATCH --get-user-env
\n
'
)
script_file
.
write
(
'
#SBATCH --partition={0}
\n
'
.
format
(
self
.
host_info
[
'
environment
'
]))
if
self
.
host_info
[
'
explicit_slurm_environment
'
]:
script_file
.
write
(
'
#SBATCH --partition={0}
\n
'
.
format
(
self
.
host_info
[
'
environment
'
]))
if
'
account
'
in
self
.
host_info
.
keys
():
script_file
.
write
(
'
#SBATCH --account={0}
\n
'
.
format
(
self
.
host_info
[
'
account
'
]))
...
...
@@ -717,11 +717,15 @@ class _code(_base):
script_file
.
write
(
'
#SBATCH --mail-type=none
\n
'
)
script_file
.
write
(
'
#SBATCH --time={0}:{1:0>2d}:00
\n
'
.
format
(
hours
,
minutes
))
if
'
extra_slurm_lines
'
in
self
.
host_info
.
keys
():
for
line
in
self
.
host_info
[
'
extra_slurm_lines
'
]:
script_file
.
write
(
line
+
'
\n
'
)
## following cleans up environment for job.
## put these in the 'extra_slurm_lines' list if you need them
## make sure that "~/.config/TurTLE/bashrc" exists and builds desired job environment
script_file
.
write
(
'
#SBATCH --export=NONE
\n
'
)
script_file
.
write
(
'
#SBATCH --get-user-env
\n
'
)
script_file
.
write
(
'
source ~/.config/TurTLE/bashrc
\n
'
)
#
script_file.write('#SBATCH --export=NONE\n')
#
script_file.write('#SBATCH --get-user-env\n')
#
script_file.write('source ~/.config/TurTLE/bashrc\n')
if
nb_threads_per_process
>
1
:
script_file
.
write
(
'
export OMP_NUM_THREADS={0}
\n
'
.
format
(
nb_threads_per_process
))
script_file
.
write
(
'
export OMP_PLACES=cores
\n
'
)
...
...
This diff is collapsed.
Click to expand it.
pc_host_info.py
+
13
−
1
View file @
203ef17a
...
...
@@ -32,7 +32,9 @@ host_info = {'type' : 'pc'}
# 'deltanprocs' : info_template_deltanprocs,
# 'mail_address': info_template_mail_address,
# 'account' : info_template_account,
# 'executable_launcher': info_template_executable_launcher}
# 'executable_launcher' : info_template_executable_launcher,
# 'extra_slurm_lines' : info_template_extra_slurm_lines,
# 'explicit_slurm_environment' : info_template_explicit_slurm_environment}
# info_template_type can be one of:
# 'pc' --- jobs run interactively
...
...
@@ -59,3 +61,13 @@ host_info = {'type' : 'pc'}
# info_template_executable_launcher, relevant for 'SLURM' clusters,
# is the binary that should be called to execute the hybrid MPI/OpenMP code.
# by default it is 'srun', but it may be 'mpiexec' for some machines.
# info_template_extra_slurm_lines, relevant for 'SLURM' clusters,
# is a list of strings, written as extra options within the SLURM file.
# for example something like `#SBATCH --get-user-env`
# info_template_explicit_slurm_environment, relevant for `SLURM` clusters,
# is a bool specifying whether the environment must be mentioned explicitly
# in the submission script, or whether the cluster chooses it based on the
# resources requested
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