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
b1cf7b08
Commit
b1cf7b08
authored
7 years ago
by
Morris Jette
Browse files
Options
Downloads
Patches
Plain Diff
harden test38.6 more
parent
3cdc190f
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
testsuite/expect/test38.6
+13
-6
13 additions, 6 deletions
testsuite/expect/test38.6
testsuite/expect/test38.6.prog.c
+13
-8
13 additions, 8 deletions
testsuite/expect/test38.6.prog.c
with
26 additions
and
14 deletions
testsuite/expect/test38.6
+
13
−
6
View file @
b1cf7b08
...
@@ -276,18 +276,23 @@ if {[wait_for_file $file_out] == 0} {
...
@@ -276,18 +276,23 @@ if {[wait_for_file $file_out] == 0} {
wait
wait
}
}
}
}
set fail_cnt 0
if {$matches_sbatch != 2} {
if {$matches_sbatch != 2} {
send_user "\nFAILURE: local (sbatch) sbatch spank plugin failure ($matches_sbatch != 2)\n"
send_user "\nFAILURE: local (sbatch) sbatch spank plugin failure ($matches_sbatch != 2)\n"
end_it 1
set fail_cnt 1
} elseif {$matches_srun != 2} {
}
if {$matches_srun != 2} {
send_user "\nFAILURE: local (srun) srun spank plugin failure ($matches_srun != 2)\n"
send_user "\nFAILURE: local (srun) srun spank plugin failure ($matches_srun != 2)\n"
end_it 1
set fail_cnt 1
} elseif {$matches != 2} {
}
if {$matches != 2} {
send_user "\nFAILURE: local (srun) spank plugin failure ($matches != 2)\n"
send_user "\nFAILURE: local (srun) spank plugin failure ($matches != 2)\n"
set fail_cnt 1
}
if {$fail_cnt != 0} {
end_it 1
end_it 1
} else {
send_user "\nlocal (srun) spank plugin success\n"
}
}
send_user "\nlocal (srun) spank plugin success\n"
} else {
} else {
end_it 1
end_it 1
}
}
...
@@ -363,6 +368,8 @@ if {[wait_for_file $spank_out] == 0} {
...
@@ -363,6 +368,8 @@ if {[wait_for_file $spank_out] == 0} {
end_it 1
end_it 1
}
}
send_user "\nRemote (slurmd) spank plugin success\n"
send_user "\nRemote (slurmd) spank plugin success\n"
} else {
end_it 1
}
}
end_it $exit_code
end_it $exit_code
This diff is collapsed.
Click to expand it.
testsuite/expect/test38.6.prog.c
+
13
−
8
View file @
b1cf7b08
...
@@ -147,16 +147,19 @@ int slurm_spank_task_init(spank_t sp, int ac, char **av)
...
@@ -147,16 +147,19 @@ int slurm_spank_task_init(spank_t sp, int ac, char **av)
char
hostname
[
64
]
=
""
;
char
hostname
[
64
]
=
""
;
gethostname
(
hostname
,
sizeof
(
hostname
));
gethostname
(
hostname
,
sizeof
(
hostname
));
if
(
opt_out_file
)
{
if
(
opt_out_file
&&
(
opt_arg_sbatch
||
opt_arg_srun
)
)
{
FILE
*
fp
=
NULL
;
FILE
*
fp
=
NULL
;
usleep
(
getpid
()
%
500000
);
/* Reduce NFS collisions */
for
(
i
=
0
;
(
i
<
10
)
&&
!
fp
;
i
++
)
for
(
i
=
0
;
(
i
<
10
)
&&
!
fp
;
i
++
)
fp
=
fopen
(
opt_out_file
,
"a"
);
fp
=
fopen
(
opt_out_file
,
"a"
);
if
(
!
fp
)
if
(
!
fp
)
{
slurm_error
(
"%s: could not open %s"
,
__func__
,
opt_out_file
);
return
-
1
;
return
-
1
;
if
(
opt_arg_sbatch
||
opt_arg_srun
)
}
usleep
(
getpid
()
%
500000
);
/* Reduce NFS collisions */
fprintf
(
fp
,
"%s: opt_arg_sbatch=%d opt_arg_srun=%d hostname=%s
\n
"
,
fprintf
(
fp
,
"%s: opt_arg_sbatch=%d opt_arg_srun=%d hostname=%s
\n
"
,
__func__
,
opt_arg_sbatch
,
opt_arg_srun
,
hostname
);
__func__
,
opt_arg_sbatch
,
opt_arg_srun
,
hostname
);
fflush
(
fp
);
if
(
spank_get_item
(
sp
,
S_JOB_UID
,
&
my_uid
)
==
ESPANK_SUCCESS
)
if
(
spank_get_item
(
sp
,
S_JOB_UID
,
&
my_uid
)
==
ESPANK_SUCCESS
)
fprintf
(
fp
,
"spank_get_item: my_uid=%d
\n
"
,
my_uid
);
fprintf
(
fp
,
"spank_get_item: my_uid=%d
\n
"
,
my_uid
);
if
(
spank_get_item
(
sp
,
S_JOB_ARGV
,
&
argc
,
&
argv
)
==
if
(
spank_get_item
(
sp
,
S_JOB_ARGV
,
&
argc
,
&
argv
)
==
...
@@ -189,14 +192,16 @@ int slurm_spank_exit(spank_t sp, int ac, char **av)
...
@@ -189,14 +192,16 @@ int slurm_spank_exit(spank_t sp, int ac, char **av)
int
i
;
int
i
;
gethostname
(
hostname
,
sizeof
(
hostname
));
gethostname
(
hostname
,
sizeof
(
hostname
));
if
(
opt_out_file
)
{
if
(
opt_out_file
&&
(
opt_arg_sbatch
||
opt_arg_srun
)
)
{
FILE
*
fp
=
NULL
;
FILE
*
fp
=
NULL
;
usleep
(
getpid
()
%
500000
);
/* Reduce NFS collisions */
for
(
i
=
0
;
(
i
<
10
)
&&
!
fp
;
i
++
)
for
(
i
=
0
;
(
i
<
10
)
&&
!
fp
;
i
++
)
fp
=
fopen
(
opt_out_file
,
"a"
);
fp
=
fopen
(
opt_out_file
,
"a"
);
if
(
!
fp
)
if
(
!
fp
)
{
slurm_error
(
"%s: could not open %s"
,
__func__
,
opt_out_file
);
return
-
1
;
return
-
1
;
if
(
opt_arg_sbatch
||
opt_arg_srun
)
}
usleep
(
getpid
()
%
500000
);
/* Reduce NFS collisions */
fprintf
(
fp
,
"%s: opt_arg_sbatch=%d opt_arg_srun=%d hostname=%s
\n
"
,
fprintf
(
fp
,
"%s: opt_arg_sbatch=%d opt_arg_srun=%d hostname=%s
\n
"
,
__func__
,
opt_arg_sbatch
,
opt_arg_srun
,
hostname
);
__func__
,
opt_arg_sbatch
,
opt_arg_srun
,
hostname
);
fclose
(
fp
);
fclose
(
fp
);
...
...
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