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
94c998e3
Commit
94c998e3
authored
19 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Load bluegene.conf and federation.conf based upon SLURM_CONF env
var (if set).
parent
4073d99a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NEWS
+5
-0
5 additions, 0 deletions
NEWS
src/plugins/select/bluegene/bluegene.c
+27
-3
27 additions, 3 deletions
src/plugins/select/bluegene/bluegene.c
src/plugins/switch/federation/federation.c
+26
-2
26 additions, 2 deletions
src/plugins/switch/federation/federation.c
with
58 additions
and
5 deletions
NEWS
+
5
−
0
View file @
94c998e3
This file describes changes in recent versions of SLURM. It primarily
This file describes changes in recent versions of SLURM. It primarily
documents those changes that are of interest to users and admins.
documents those changes that are of interest to users and admins.
* Changes in SLURM 0.5.0-pre6
=============================
-- Load bluegene.conf and federation.conf based upon SLURM_CONF env
var (if set).
* Changes in SLURM 0.5.0-pre5
* Changes in SLURM 0.5.0-pre5
=============================
=============================
-- Modify slurmctld node hashing function to reduce collisions.
-- Modify slurmctld node hashing function to reduce collisions.
...
...
This diff is collapsed.
Click to expand it.
src/plugins/select/bluegene/bluegene.c
+
27
−
3
View file @
94c998e3
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
#define _DEBUG 0
#define _DEBUG 0
char
*
bgl_conf
=
BLUEGENE_CONFIG_FILE
;
char
*
bgl_conf
=
NULL
;
/* Global variables */
/* Global variables */
rm_BGL_t
*
bgl
;
rm_BGL_t
*
bgl
;
...
@@ -670,7 +670,7 @@ extern int create_static_partitions(List part_list)
...
@@ -670,7 +670,7 @@ extern int create_static_partitions(List part_list)
#endif
#endif
/* Here we are adding a partition that in for the entire machine
/* Here we are adding a partition that in for the entire machine
just incase it isn't in the bluegene.conf file.
just in
case it isn't in the bluegene.conf file.
*/
*/
reset_pa_system
();
reset_pa_system
();
...
@@ -1173,6 +1173,28 @@ static int _delete_old_partitions(void)
...
@@ -1173,6 +1173,28 @@ static int _delete_old_partitions(void)
return
SLURM_SUCCESS
;
return
SLURM_SUCCESS
;
}
}
static
char
*
_get_bgl_conf
(
void
)
{
char
*
val
=
getenv
(
"SLURM_CONF"
);
char
*
rc
;
int
i
;
if
(
!
val
)
return
xstrdup
(
BLUEGENE_CONFIG_FILE
);
/* Replace file name on end of path */
i
=
strlen
(
val
)
-
strlen
(
"slurm.conf"
)
+
strlen
(
"bluegene.conf"
)
+
1
;
rc
=
xmalloc
(
i
);
strcpy
(
rc
,
val
);
val
=
strrchr
(
rc
,
(
int
)
'/'
);
if
(
val
)
/* absolute path */
val
++
;
else
/* not absolute path */
val
=
rc
;
strcpy
(
val
,
"bluegene.conf"
);
return
rc
;
}
/*
/*
* Read and process the bluegene.conf configuration file so to interpret what
* Read and process the bluegene.conf configuration file so to interpret what
* partitions are static/dynamic, torus/mesh, etc.
* partitions are static/dynamic, torus/mesh, etc.
...
@@ -1190,7 +1212,7 @@ extern int read_bgl_conf(void)
...
@@ -1190,7 +1212,7 @@ extern int read_bgl_conf(void)
/* check if config file has changed */
/* check if config file has changed */
if
(
!
bgl_conf
)
if
(
!
bgl_conf
)
fatal
(
"bluegene.conf file not defined"
);
bgl_conf
=
_get_bgl_conf
(
);
if
(
stat
(
bgl_conf
,
&
config_stat
)
<
0
)
if
(
stat
(
bgl_conf
,
&
config_stat
)
<
0
)
fatal
(
"can't stat bluegene.conf file %s: %m"
,
bgl_conf
);
fatal
(
"can't stat bluegene.conf file %s: %m"
,
bgl_conf
);
if
(
last_config_update
)
{
if
(
last_config_update
)
{
...
@@ -1222,6 +1244,7 @@ extern int read_bgl_conf(void)
...
@@ -1222,6 +1244,7 @@ extern int read_bgl_conf(void)
error
(
"_read_bgl_config line %d, of input file %s "
error
(
"_read_bgl_config line %d, of input file %s "
"too long"
,
line_num
,
bgl_conf
);
"too long"
,
line_num
,
bgl_conf
);
fclose
(
bgl_spec_file
);
fclose
(
bgl_spec_file
);
xfree
(
bgl_conf
);
return
E2BIG
;
return
E2BIG
;
}
}
...
@@ -1251,6 +1274,7 @@ extern int read_bgl_conf(void)
...
@@ -1251,6 +1274,7 @@ extern int read_bgl_conf(void)
report_leftover
(
in_line
,
line_num
);
report_leftover
(
in_line
,
line_num
);
}
}
fclose
(
bgl_spec_file
);
fclose
(
bgl_spec_file
);
xfree
(
bgl_conf
);
if
(
!
bluegene_blrts
)
if
(
!
bluegene_blrts
)
fatal
(
"BlrtsImage not configured in bluegene.conf"
);
fatal
(
"BlrtsImage not configured in bluegene.conf"
);
...
...
This diff is collapsed.
Click to expand it.
src/plugins/switch/federation/federation.c
+
26
−
2
View file @
94c998e3
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
#define ZERO 48
#define ZERO 48
#define BUFSIZE 4096
#define BUFSIZE 4096
char
*
fed_conf
=
FEDERATION_CONFIG_FILE
;
char
*
fed_conf
=
NULL
;
/*
/*
* Data structures specific to Federation
* Data structures specific to Federation
...
@@ -398,6 +398,28 @@ static int _set_up_adapter(fed_adapter_t *fed_adapter, char *adapter_name)
...
@@ -398,6 +398,28 @@ static int _set_up_adapter(fed_adapter_t *fed_adapter, char *adapter_name)
return
SLURM_SUCCESS
;
return
SLURM_SUCCESS
;
}
}
static
char
*
_get_fed_conf
(
void
)
{
char
*
val
=
getenv
(
"SLURM_CONF"
);
char
*
rc
;
int
i
;
if
(
!
val
)
return
xstrdup
(
FEDERATION_CONFIG_FILE
);
/* Replace file name on end of path */
i
=
strlen
(
val
)
-
strlen
(
"slurm.conf"
)
+
strlen
(
"federation.conf"
)
+
1
;
rc
=
xmalloc
(
i
);
strcpy
(
rc
,
val
);
val
=
strrchr
(
rc
,
(
int
)
'/'
);
if
(
val
)
/* absolute path */
val
++
;
else
/* not absolute path */
val
=
rc
;
strcpy
(
val
,
"federation.conf"
);
return
rc
;
}
static
int
_parse_fed_file
(
hostlist_t
*
adapter_list
)
static
int
_parse_fed_file
(
hostlist_t
*
adapter_list
)
{
{
FILE
*
fed_spec_file
;
/* pointer to input data file */
FILE
*
fed_spec_file
;
/* pointer to input data file */
...
@@ -409,7 +431,7 @@ static int _parse_fed_file(hostlist_t *adapter_list)
...
@@ -409,7 +431,7 @@ static int _parse_fed_file(hostlist_t *adapter_list)
debug
(
"Reading the federation.conf file"
);
debug
(
"Reading the federation.conf file"
);
if
(
!
fed_conf
)
if
(
!
fed_conf
)
f
atal
(
"federation.conf file not defined"
);
f
ed_conf
=
_get_fed_conf
(
);
fed_spec_file
=
fopen
(
fed_conf
,
"r"
);
fed_spec_file
=
fopen
(
fed_conf
,
"r"
);
if
(
fed_spec_file
==
NULL
)
if
(
fed_spec_file
==
NULL
)
fatal
(
"_get_adapters error opening file %s, %m"
,
fatal
(
"_get_adapters error opening file %s, %m"
,
...
@@ -423,6 +445,7 @@ static int _parse_fed_file(hostlist_t *adapter_list)
...
@@ -423,6 +445,7 @@ static int _parse_fed_file(hostlist_t *adapter_list)
error
(
"_get_adapters line %d, of input file %s "
error
(
"_get_adapters line %d, of input file %s "
"too long"
,
line_num
,
fed_conf
);
"too long"
,
line_num
,
fed_conf
);
fclose
(
fed_spec_file
);
fclose
(
fed_spec_file
);
xfree
(
fed_conf
);
return
E2BIG
;
return
E2BIG
;
}
}
...
@@ -444,6 +467,7 @@ static int _parse_fed_file(hostlist_t *adapter_list)
...
@@ -444,6 +467,7 @@ static int _parse_fed_file(hostlist_t *adapter_list)
report_leftover
(
in_line
,
line_num
);
report_leftover
(
in_line
,
line_num
);
}
}
fclose
(
fed_spec_file
);
fclose
(
fed_spec_file
);
xfree
(
fed_conf
);
return
SLURM_SUCCESS
;
return
SLURM_SUCCESS
;
}
}
...
...
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