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
46078e8b
Commit
46078e8b
authored
14 years ago
by
Phil Eckert
Browse files
Options
Downloads
Patches
Plain Diff
bring coding example up to date.
parent
b0c2210c
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
doc/man/man3/slurm_free_job_info_msg.3
+11
-9
11 additions, 9 deletions
doc/man/man3/slurm_free_job_info_msg.3
with
11 additions
and
9 deletions
doc/man/man3/slurm_free_job_info_msg.3
+
11
−
9
View file @
46078e8b
...
@@ -289,6 +289,8 @@ SLURM controller.
...
@@ -289,6 +289,8 @@ SLURM controller.
.LP
.LP
#include <stdio.h>
#include <stdio.h>
.br
.br
#include <stdlib.h>
.br
#include <slurm/slurm.h>
#include <slurm/slurm.h>
.br
.br
#include <slurm/slurm_errno.h>
#include <slurm/slurm_errno.h>
...
@@ -301,7 +303,7 @@ int main (int argc, char *argv[])
...
@@ -301,7 +303,7 @@ int main (int argc, char *argv[])
.br
.br
int i;
int i;
.br
.br
job_info_msg_t * job_
info_msg
= NULL;
job_info_msg_t * job_
buffer_ptr
= NULL;
.br
.br
job_info_t * job_ptr;
job_info_t * job_ptr;
.br
.br
...
@@ -321,7 +323,7 @@ int main (int argc, char *argv[])
...
@@ -321,7 +323,7 @@ int main (int argc, char *argv[])
.LP
.LP
/* The easy way to print... */
/* The easy way to print... */
.br
.br
slurm_print_job_info_msg (stdout, job_buffer_ptr);
slurm_print_job_info_msg (stdout, job_buffer_ptr
, 0
);
.LP
.LP
/* A harder way.. */
/* A harder way.. */
.br
.br
...
@@ -329,7 +331,7 @@ int main (int argc, char *argv[])
...
@@ -329,7 +331,7 @@ int main (int argc, char *argv[])
.br
.br
job_ptr = &job_buffer_ptr\->job_array[i];
job_ptr = &job_buffer_ptr\->job_array[i];
.br
.br
slurm_print_job_info(stdout, job_ptr);
slurm_print_job_info(stdout, job_ptr
, 1
);
.br
.br
}
}
.LP
.LP
...
@@ -353,21 +355,21 @@ int main (int argc, char *argv[])
...
@@ -353,21 +355,21 @@ int main (int argc, char *argv[])
.LP
.LP
if (job_buffer_ptr\->record_count >= 1) {
if (job_buffer_ptr\->record_count >= 1) {
.br
.br
uint16_t
rotate
;
uint16_t
nodes
;
.br
.br
if (slurm_get_select_jobinfo(
if (slurm_get_select_jobinfo(
.br
.br
job_buffer_ptr\->job_array[0].select_jobinfo,
job_buffer_ptr\->job_array[0].select_jobinfo,
.br
.br
SELECT_DATA_
ROTATE
,
SELECT_
JOB
DATA_
NODE_CNT
,
.br
.br
&
rotate
) == SLURM_SUCCESS)
&
nodes
) == SLURM_SUCCESS)
.br
.br
printf("JobId=%u
Rotate
=%u\\n",
printf("JobId=%u
Nodes
=%u\\n",
.br
.br
job_buffer_ptr\->job_array[0].job_id,
job_buffer_ptr\->job_array[0].job_id,
.br
.br
rotate
);
nodes
);
.br
.br
}
}
.LP
.LP
...
@@ -380,7 +382,7 @@ int main (int argc, char *argv[])
...
@@ -380,7 +382,7 @@ int main (int argc, char *argv[])
else
else
.br
.br
printf ("Slurm job id = %u\\n", job_id);
printf ("Slurm job id = %u\\n", job_id);
.
br
.
LP
exit (0);
exit (0);
.br
.br
}
}
...
...
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