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
412846ed
Commit
412846ed
authored
7 years ago
by
Dominik Bartkiewicz
Committed by
Morris Jette
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Avoid using knl_generic plugin except on real KNL nodes
Add "Force=1" to knl_generic.conf to override (for testing) bug 4487
parent
5a23c48a
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
doc/man/man5/knl.conf.5
+8
-2
8 additions, 2 deletions
doc/man/man5/knl.conf.5
src/plugins/node_features/knl_generic/node_features_knl_generic.c
+32
-7
32 additions, 7 deletions
...ins/node_features/knl_generic/node_features_knl_generic.c
with
40 additions
and
9 deletions
doc/man/man5/knl.conf.5
+
8
−
2
View file @
412846ed
.TH "knl.conf" "5" "Slurm Configuration File" "
May
201
6
" "Slurm Configuration File"
.TH "knl.conf" "5" "Slurm Configuration File" "
December
201
7
" "Slurm Configuration File"
.SH "NAME"
knl.conf \- Slurm configuration file for Intel Knights Landing processor.
...
...
@@ -135,6 +135,12 @@ The value can include one of the possible values identified with the
\fBAllowNUMA\fR configuration parameter above.
The default value is "a2a".
.TP
\fBForce\fR
If set to a non\-zero value then load the node_features/generic plugin even
on non\-KNL nodes.
Used primarily for testing purposes.
.TP
\fBLogFile\fR
Fully qualified path to a log file.
...
...
@@ -205,7 +211,7 @@ LogFile=/var/tmp/slurm_node_feature.log
SyscfgPath=/usr/sbin/syscfg
.SH "COPYING"
Copyright (C) 2015-201
6
SchedMD LLC.
Copyright (C) 2015-201
7
SchedMD LLC.
.LP
This file is part of Slurm, a resource management program.
For details, see <https://slurm.schedmd.com/>.
...
...
This diff is collapsed.
Click to expand it.
src/plugins/node_features/knl_generic/node_features_knl_generic.c
+
32
−
7
View file @
412846ed
...
...
@@ -178,6 +178,8 @@ static knl_system_type_t knl_system_type = KNL_SYSTEM_TYPE_INTEL;
static
uint32_t
ume_check_interval
=
0
;
static
pthread_mutex_t
ume_mutex
=
PTHREAD_MUTEX_INITIALIZER
;
static
pthread_t
ume_thread
=
0
;
static
uint32_t
force_load
=
0
;
static
int
hw_is_knl
=
-
1
;
/* Percentage of MCDRAM used for cache by type, updated from syscfg */
static
int
mcdram_pct
[
KNL_MCDRAM_CNT
];
...
...
@@ -190,6 +192,7 @@ static s_p_options_t knl_conf_file_options[] = {
{
"BootTime"
,
S_P_UINT32
},
{
"DefaultMCDRAM"
,
S_P_STRING
},
{
"DefaultNUMA"
,
S_P_STRING
},
{
"Force"
,
S_P_UINT32
},
{
"LogFile"
,
S_P_STRING
},
{
"McPath"
,
S_P_STRING
},
{
"SyscfgPath"
,
S_P_STRING
},
...
...
@@ -714,6 +717,9 @@ extern int init(void)
s_p_hashtbl_t
*
tbl
;
struct
stat
stat_buf
;
int
rc
=
SLURM_SUCCESS
;
char
*
cpuinfo_path
=
"/proc/cpuinfo"
;
FILE
*
cpu_info_file
;
char
buf
[
1024
];
/* Set default values */
allow_mcdram
=
KNL_MCDRAM_FLAG
;
...
...
@@ -774,6 +780,7 @@ extern int init(void)
}
xfree
(
tmp_str
);
}
(
void
)
s_p_get_uint32
(
&
force_load
,
"Force"
,
tbl
);
(
void
)
s_p_get_string
(
&
mc_path
,
"McPath"
,
tbl
);
(
void
)
s_p_get_string
(
&
syscfg_path
,
"SyscfgPath"
,
tbl
);
if
(
s_p_get_string
(
&
tmp_str
,
"SystemType"
,
tbl
))
{
...
...
@@ -802,6 +809,20 @@ extern int init(void)
else
syscfg_found
=
0
;
hw_is_knl
=
0
;
cpu_info_file
=
fopen
(
cpuinfo_path
,
"r"
);
if
(
cpu_info_file
==
NULL
)
{
error
(
"Error opening/reading %s: %m"
,
cpuinfo_path
);
}
else
{
while
(
fgets
(
buf
,
sizeof
(
buf
),
cpu_info_file
))
{
if
(
strstr
(
buf
,
"Xeon Phi"
))
{
hw_is_knl
=
1
;
break
;
}
}
fclose
(
cpu_info_file
);
}
if
((
resume_program
=
slurm_get_resume_program
()))
{
error
(
"Use of ResumeProgram with %s not currently supported"
,
plugin_name
);
...
...
@@ -824,6 +845,7 @@ extern int init(void)
info
(
"BootTIme=%u"
,
boot_time
);
info
(
"DefaultMCDRAM=%s DefaultNUMA=%s"
,
default_mcdram_str
,
default_numa_str
);
info
(
"Force=%u"
,
force_load
);
info
(
"McPath=%s"
,
mc_path
);
info
(
"SyscfgPath=%s"
,
syscfg_path
);
info
(
"SyscfgTimeout=%u msec"
,
syscfg_timeout
);
...
...
@@ -911,11 +933,11 @@ extern void node_features_p_node_state(char **avail_modes, char **current_mode)
if
(
!
syscfg_path
||
!
avail_modes
||
!
current_mode
)
return
;
if
(
syscfg_found
==
0
)
{
if
(
(
syscfg_found
==
0
)
||
(
!
hw_is_knl
&&
!
force_load
))
{
/* This node on cluster lacks syscfg; should not be KNL */
static
bool
log_event
=
true
;
if
(
log_event
)
{
info
(
"%s: syscfg program not found, can not get KNL modes"
,
info
(
"%s: syscfg program not found
or node isn't KNL
, can not get KNL modes"
,
__func__
);
log_event
=
false
;
}
...
...
@@ -1289,11 +1311,14 @@ extern int node_features_p_node_set(char *active_features)
error
(
"%s: SyscfgPath not configured"
,
__func__
);
return
SLURM_ERROR
;
}
if
(
syscfg_found
==
0
)
{
/* This node on cluster lacks syscfg; should not be KNL.
* This code should never be reached */
error
(
"%s: syscfg program not found; can not set KNL modes"
,
__func__
);
if
((
syscfg_found
==
0
)
||
(
!
hw_is_knl
&&
!
force_load
))
{
/* This node on cluster lacks syscfg; should not be KNL */
static
bool
log_event
=
true
;
if
(
log_event
)
{
error
(
"%s: syscfg program not found or node isn't KNL; can not set KNL modes"
,
__func__
);
log_event
=
false
;
}
return
SLURM_ERROR
;
}
...
...
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