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
4ea7e781
Commit
4ea7e781
authored
22 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Added functions to print job steps to API.
parent
0cb57aab
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/api/job_step_info.c
+30
-2
30 additions, 2 deletions
src/api/job_step_info.c
src/api/slurm.h
+3
-0
3 additions, 0 deletions
src/api/slurm.h
with
33 additions
and
2 deletions
src/api/job_step_info.c
+
30
−
2
View file @
4ea7e781
/*****************************************************************************\
* job_info.c - get/print the job state information of slurm
* job_info.c - get/print the job
step
state information of slurm
*****************************************************************************
* Copyright (C) 2002 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Moe Jette <jette1@llnl.gov> et. al.
* Written by Moe Jette <jette1@llnl.gov>
, Joey Ekstrom <ekstrom1@llnl.gov>
et. al.
* UCRL-CODE-2002-040.
*
* This file is part of SLURM, a resource management program.
...
...
@@ -35,6 +35,34 @@
#include
<src/api/slurm.h>
#include
<src/common/slurm_protocol_api.h>
/* slurm_print_job_step_info_msg - output information about all Slurm job steps */
void
slurm_print_job_step_info_msg
(
FILE
*
out
,
job_step_info_response_msg_t
*
job_step_info_msg_ptr
)
{
int
i
;
job_step_info_t
*
job_step_ptr
=
job_step_info_msg_ptr
->
job_steps
;
fprintf
(
out
,
"Job steps updated at %ld, record count %d
\n
"
,
(
long
)
job_step_info_msg_ptr
->
last_update
,
job_step_info_msg_ptr
->
job_step_count
);
for
(
i
=
0
;
i
<
job_step_info_msg_ptr
->
job_step_count
;
i
++
)
{
slurm_print_job_step_info
(
out
,
&
job_step_ptr
[
i
]
)
;
}
}
/* slurm_print_job_step_info - output information about a specific Slurm job step */
void
slurm_print_job_step_info
(
FILE
*
out
,
job_step_info_t
*
job_step_ptr
)
{
int
j
;
fprintf
(
out
,
"JobId=%u StepId=%u UserId=%u "
,
job_step_ptr
->
job_id
,
job_step_ptr
->
step_id
,
job_step_ptr
->
user_id
);
fprintf
(
out
,
"StartTime=%ld Partition=%s Nodes=%s
\n\n
"
,
(
long
)
job_step_ptr
->
start_time
,
job_step_ptr
->
partition
,
job_step_ptr
->
nodes
);
}
/* slurm_load_job_steps - issue RPC to get Slurm job_step state information */
int
slurm_get_job_steps
(
uint32_t
job_id
,
int16_t
step_id
,
job_step_info_response_msg_t
**
step_response_pptr
)
...
...
This diff is collapsed.
Click to expand it.
src/api/slurm.h
+
3
−
0
View file @
4ea7e781
...
...
@@ -118,6 +118,9 @@ extern int slurm_submit_batch_job (job_desc_msg_t * job_desc_msg,
submit_response_msg_t
**
slurm_alloc_msg
);
extern
int
slurm_get_job_steps
(
uint32_t
job_id
,
int16_t
step_id
,
job_step_info_response_msg_t
**
step_response_pptr
);
extern
void
slurm_print_job_step_info_msg
(
FILE
*
out
,
job_step_info_response_msg_t
*
job_step_info_msg_ptr
);
extern
void
slurm_print_job_step_info
(
FILE
*
out
,
job_step_info_t
*
job_step_ptr
);
/*
* slurm_will_run - determine if a job would execute immediately
* if submitted.
...
...
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