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
1ca5c80c
Commit
1ca5c80c
authored
18 years ago
by
Christopher J. Morrone
Browse files
Options
Downloads
Patches
Plain Diff
Added nodefile support. Still need to deal with fewer tasks requested than
there are entries in the nodelist
parent
9e3f2264
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/slaunch/opt.c
+28
-3
28 additions, 3 deletions
src/slaunch/opt.c
src/slaunch/opt.h
+2
-1
2 additions, 1 deletion
src/slaunch/opt.h
with
30 additions
and
4 deletions
src/slaunch/opt.c
+
28
−
3
View file @
1ca5c80c
...
...
@@ -678,6 +678,7 @@ static void _opt_default()
opt
.
contiguous
=
false
;
opt
.
exclusive
=
false
;
opt
.
nodelist
=
NULL
;
opt
.
nodefile
=
NULL
;
opt
.
max_launch_time
=
120
;
/* 120 seconds to launch job */
opt
.
max_exit_timeout
=
60
;
/* Warn user 60 seconds after task exit */
opt
.
msg_timeout
=
5
;
/* Default launch msg timeout */
...
...
@@ -907,6 +908,7 @@ void set_options(const int argc, char **argv, int first)
{
"chdir"
,
required_argument
,
0
,
'D'
},
{
"local-error"
,
required_argument
,
0
,
'e'
},
{
"remote-error"
,
required_argument
,
0
,
'E'
},
{
"nodefile"
,
required_argument
,
0
,
'F'
},
{
"geometry"
,
required_argument
,
0
,
'g'
},
{
"local-input"
,
required_argument
,
0
,
'i'
},
{
"remote-input"
,
required_argument
,
0
,
'I'
},
...
...
@@ -959,7 +961,7 @@ void set_options(const int argc, char **argv, int first)
{
"multi-prog"
,
no_argument
,
0
,
LONG_OPT_MULTI
},
{
NULL
,
0
,
0
,
0
}
};
char
*
opt_string
=
"+c:Cd:D:e:E:g:i:I:J:kKlm:n:N:"
char
*
opt_string
=
"+c:Cd:D:e:E:
F:
g:i:I:J:kKlm:n:N:"
"o:O:Qr:R:t:uvVw:W:Z"
;
struct
option
*
optz
=
spank_option_table_create
(
long_options
);
...
...
@@ -1021,6 +1023,19 @@ void set_options(const int argc, char **argv, int first)
else
opt
.
local_efname
=
xstrdup
(
optarg
);
break
;
case
(
int
)
'F'
:
if
(
!
first
&&
opt
.
nodefile
)
break
;
xfree
(
opt
.
nodefile
);
opt
.
nodefile
=
xstrdup
(
optarg
);
#ifdef HAVE_BG
info
(
"
\t
The nodefile option should only be used if
\n
"
"
\t
the block you are asking for can be created.
\n
"
"
\t
Please consult smap before using this option
\n
"
"
\t
or your job may be stuck with no way to run."
);
#endif
break
;
case
(
int
)
'E'
:
if
(
!
first
&&
opt
.
remote_efname
)
break
;
...
...
@@ -1417,6 +1432,16 @@ static bool _opt_verify(void)
hostlist_t
hl
=
NULL
;
hostlist_t
hl_unique
=
NULL
;
if
(
opt
.
nodelist
!=
NULL
&&
opt
.
nodefile
!=
NULL
)
{
error
(
"The -w,--nodelist and -F,--nodefile parameters"
" may not be used at the same time."
);
verified
=
false
;
}
else
if
(
opt
.
nodefile
!=
NULL
)
{
char
*
tmp
;
tmp
=
slurm_read_hostfile
(
opt
.
nodefile
,
0
);
opt
.
nodelist
=
xstrdup
(
tmp
);
free
(
tmp
);
}
if
(
opt
.
nodelist
!=
NULL
)
{
hl
=
hostlist_create
(
opt
.
nodelist
);
hl_unique
=
hostlist_copy
(
hl
);
...
...
@@ -1451,7 +1476,7 @@ static bool _opt_verify(void)
if
(
!
opt
.
num_nodes_set
&&
opt
.
num_tasks_set
&&
opt
.
num_tasks
<
opt
.
num_nodes
)
opt
.
num_nodes
=
opt
.
num_tasks
;
if
(
opt
.
n
um_nodes_se
t
if
(
opt
.
n
ode_lis
t
&&
opt
.
num_nodes
!=
hostlist_count
(
hl_unique
))
{
if
(
opt
.
num_nodes
>
hostlist_count
(
hl_unique
))
{
error
(
"Asked for more nodes (%d) "
...
...
@@ -1459,7 +1484,7 @@ static bool _opt_verify(void)
opt
.
num_nodes
,
hostlist_count
(
hl_unique
));
verified
=
false
;
}
else
{
/* num_nodes < hostlist_count */
/* shrink the nodelist instead of an error
?
*/
/*
FIXME -
shrink the nodelist instead of an error */
error
(
"Asked for fewer nodes (%d) "
"than listed in the nodelist (%d)"
,
opt
.
num_nodes
,
hostlist_count
(
hl_unique
));
...
...
This diff is collapsed.
Click to expand it.
src/slaunch/opt.h
+
2
−
1
View file @
1ca5c80c
...
...
@@ -115,7 +115,8 @@ typedef struct slaunch_options {
long
tmpdisk
;
/* --tmp=n */
char
*
constraints
;
/* --constraints=, -C constraint*/
bool
contiguous
;
/* --contiguous */
char
*
nodelist
;
/* --nodelist=node1,node2,... */
char
*
nodelist
;
/* -w,--nodelist=node1,node2,...*/
char
*
nodefile
;
/* -F,--nodefile=filename */
int
relative
;
/* --relative -r N */
bool
relative_set
;
/* true if --relative set explicitly */
bool
no_alloc
;
/* --no-allocate, -Z */
...
...
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