8000 Add basic Flux support by adammoody · Pull Request #484 · LLNL/scr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add basic Flux support #484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmake/SCR_OPTIONS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ ELSE()
ENDIF()
MESSAGE(STATUS "SCR_LINK_STATIC: ${SCR_LINK_STATIC}")

SET(SCR_RESOURCE_MANAGER "SLURM" CACHE STRING "Resource Manager for CLI (SLURM APRUN LSF NONE)")
SET_PROPERTY(CACHE SCR_RESOURCE_MANAGER PROPERTY STRINGS SLURM APRUN LSF NONE)
LIST(APPEND RMS SLURM APRUN LSF NONE)
SET(SCR_RESOURCE_MANAGER "SLURM" CACHE STRING "Resource Manager for CLI (SLURM APRUN FLUX LSF NONE)")
SET_PROPERTY(CACHE SCR_RESOURCE_MANAGER PROPERTY STRINGS SLURM APRUN FLUX LSF NONE)
LIST(APPEND RMS SLURM APRUN FLUX LSF NONE)
LIST(FIND RMS ${SCR_RESOURCE_MANAGER} _index)
IF(${_index} GREATER -1)
MESSAGE(STATUS "SCR_RESOURCE_MANAGER: ${SCR_RESOURCE_MANAGER}")
Expand Down
5 changes: 5 additions & 0 deletions scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ IF(${SCR_RESOURCE_MANAGER} STREQUAL "APRUN")
SET(cliscr_run_name "scr_aprun")
ENDIF(${SCR_RESOURCE_MANAGER} STREQUAL "APRUN")

IF(${SCR_RESOURCE_MANAGER} STREQUAL "FLUX")
SET(cliscr_dir_name "FLUX")
SET(cliscr_run_name "scr_fluxrun")
ENDIF(${SCR_RESOURCE_MANAGER} STREQUAL "FLUX")

IF(${SCR_RESOURCE_MANAGER} STREQUAL "LSF")
SET(cliscr_dir_name "LSF")
SET(cliscr_run_name "scr_jsrun")
Expand Down
Empty file added scripts/FLUX/scr_env.in
Empty file.
Empty file.
Empty file added scripts/FLUX/scr_halt.in
Empty file.
Empty file added scripts/FLUX/scr_inspect.in
Empty file.
Empty file.
Empty file.
Empty file added scripts/FLUX/scr_run.in
Empty file.
Empty file added scripts/FLUX/scr_scavenge.in
Empty file.
11 changes: 11 additions & 0 deletions src/scr_env.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,17 @@ char* scr_env_jobid()
char* jobid = NULL;

char* value;
#ifdef SCR_RESOURCE_MANAGER_FLUX
/* read $FLUX_JOB_ID environment variable for jobid string */
if ((value = getenv("FLUX_JOB_ID")) != NULL) {
jobid = strdup(value);
if (jobid == NULL) {
scr_err("Failed to allocate memory to record jobid (%s) @ %s:%d",
value, __FILE__, __LINE__
);
}
}
#endif
#ifdef SCR_RESOURCE_MANAGER_SLURM
/* read $SLURM_JOBID environment variable for jobid string */
if ((value = getenv("SLURM_JOBID")) != NULL) {
Expand Down
0