Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
9e01e466
Commit
9e01e466
authored
12 years ago
by
Nathan Yee
Committed by
Danny Auble
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
code to get most of the options for aprun
parent
4e88c159
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
src/plugins/launch/aprun/launch_aprun.c
+157
-1
157 additions, 1 deletion
src/plugins/launch/aprun/launch_aprun.c
with
157 additions
and
1 deletion
src/plugins/launch/aprun/launch_aprun.c
+
157
−
1
View file @
9e01e466
...
@@ -174,7 +174,163 @@ extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus,
...
@@ -174,7 +174,163 @@ extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus,
void
(
*
signal_function
)(
int
),
void
(
*
signal_function
)(
int
),
sig_atomic_t
*
destroy_job
)
sig_atomic_t
*
destroy_job
)
{
{
/* FIXME: todo */
if
(
opt
.
cpus_per_task
)
{
xstrfmtcat
(
cmd_line
,
" -d %u"
,
opt
.
cpus_per_task
);
}
if
(
opt
.
nodelist
)
{
char
*
nids
=
_get_nids
(
opt
.
nodelist
);
xstrfmtcat
(
cmd_line
,
" -L %s"
,
nids
);
}
if
(
opt
.
mem_per_cpu
)
{
xstrfmtcat
(
cmd_line
,
" -m %u"
,
opt
.
mem_per_cpu
)
;
}
if
(
opt
.
ntasks_per_node
)
{
xstrfmtcat
(
cmd_line
,
"-N %u"
,
opt
.
ntasks_per_node
);
}
if
(
opt
.
max_nodes
)
{
int
task_per_node
=
int
((
max_nodes
+
max_nodes
-
1
)
/
max_nodes
);
xstrfmtcat
(
cmd_line
,
"-N %u"
,
opt
.
task_per_node
);
}
if
(
opt
.
ntasks
)
{
xstrfmtcat
(
cmd_line
,
"-n %u"
,
opt
.
ntasks
);
}
if
(
opt
.
quiet
)
{
xstrcat
(
cmd_line
,
" -q"
);
}
if
(
opt
.
ntasks_per_socket
)
{
xstrfmtcat
(
cmd_line
,
" -S %u"
,
opt
.
ntask_per_socket
);
}
if
(
opt
.
sockets_per_node
)
{
xstrfmtcat
(
cmd_line
,
" -sn %u"
,
opt
.
sockets_per_node
);
}
if
(
opt
.
time_limit
)
{
int
time_secs
=
get_seconds
(
opt
.
time_limit
);
xstrfmtcat
(
cmd_line
,
" -t %u"
,
time_secs
);
}
/* These are not part of aprun, but here just in case in the
future they add them.
if (opt.disable_status) {
xstrcat(cmd_line, " --disable-status");
}
if (opt.epilog) {
xstrfmtcat(cmd_line, " --epilog=", opt.epilog);
}
if (kill_on_bad_exit) {
xstrcat(cmd_line, " --kill-on-bad-exit");
}
if (label) {
xstrcat(cmd_line, " --label");
}
if (opt.mpi_type) {
xstrfmtcat(cmd_line, " --mpi=", opt.mpi_type);
}
if (opt.msg_timeout) {
xstrfmtcat(cmd_line, " --msg-timeout=", opt.msg_timeout);
}
if (no_allocate) {
xstrcat(cmd_line, " --no-allocate");
}
if (opt.open_mode) {
xstrcat(cmd_line, " --open-mode=", opt.open_mode);
}
if (preserve_env) {
xstrcat(cmd_line, " --preserve_env");
}
if (opt.prolog) {
xstrcat(cmd_line, " --prolog=", opt.prolog );
}
if (opt.propagate) {
xstrcat(cmd_line, " --propagate", opt.propagate );
}
if (pty) {
xstrcat(cmd_line, " --pty");
}
if (quit_on_interrupt) {
xstrcat(cmd_line, " --quit-on-interrupt");
}
if (opt.relative) {
xstrfmtcat(cmd_line, " --relative=", opt.relative);
}
if (restart_dir) {
xstrfmtcat(cmd_line, " --restart-dir=", opt.restart_dir);
}
if (resv_port) {
xstrcat(cmd_line, "--resv-port");
}
if (opt.slurm_debug) {
xstrfmtcat(cmd_line, " --slurmd-debug=", opt.slurm_debug);
}
if (opttask_epilog) {
xstrfmtcat(cmd_line, " --task-epilog=", opt.task_epilog);
}
if (opt.task_prolog) {
xstrfmtcat(cmd_line, " --task-prolog", opt.task_prolog);
}
if (test_only) {
xstrcat(cmd_line, " --test-only");
}
if (unbuffered) {
xstrcat(cmd_line, " --unbuffered");
}
*/
if
(
opt
.
multi_prog
)
{
int
script
=
get_multi_prog
(
opt
.
mult_prog
);
xstrfmtcat
(
cmd_line
,
" %s"
,
script
);
}
if
(
opt
.
ifname
)
{
xstrfmtcat
(
cmd_line
,
" <%s"
,
opt
.
ifname
);
}
if
(
opt
.
ofname
)
{
xstrfmtcat
(
cmd_line
,
" >>%s"
,
opt
.
ofname
);
}
if
(
opt
.
ofname
)
{
xstrfmtcat
(
cmd_line
,
" >%s"
,
opt
.
ofname
);
}
return
0
;
return
0
;
}
}
...
...
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