Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mpi-start
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
IFCA Computing
mpi-start
Commits
1c88c40a
Commit
1c88c40a
authored
11 years ago
by
Enol Fernandez
Browse files
Options
Downloads
Patches
Plain Diff
Fix
#6
by loading specific distro config files.
parent
21a7907e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!7
Release 1.5.2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mpi-start.in
+60
-6
60 additions, 6 deletions
src/mpi-start.in
with
60 additions
and
6 deletions
src/mpi-start.in
+
60
−
6
View file @
1c88c40a
...
@@ -441,6 +441,62 @@ mpi_start_get_plugin() {
...
@@ -441,6 +441,62 @@ mpi_start_get_plugin() {
}
}
#======================================================================
# Load the mpi configuration variables
#======================================================================
mpi_start_load_mpi_config
()
{
local
pfx
=
mpi-config
local
cfiles
=
${
pfx
}
.
${
MPI_START_UNAME
}
if
test
"x
${
MPI_START_OS_DIST_TYPE
}
"
!=
"x"
;
then
cfiles
=
"
${
pfx
}
.
${
MPI_START_OS_DIST_TYPE
}
$cfiles
"
if
test
"x
${
MPI_START_OS_RELEASE_MAJOR
}
"
!=
"x"
;
then
cfiles
=
"
${
pfx
}
.
${
MPI_START_OS_DIST_TYPE
}${
MPI_START_OS_RELEASE_MAJOR
}
$cfiles
"
if
test
"x
${
MPI_START_ARCH
}
"
!=
"x"
;
then
cfiles
=
"
${
pfx
}
.
${
MPI_START_OS_DIST_TYPE
}${
MPI_START_OS_RELEASE_MAJOR
}
-
${
MPI_START_ARCH
}
$cfiles
"
fi
fi
fi
for
c
in
$cfiles
;
do
mpi_start_get_plugin
$c
1
if
test
"x
${
MPI_START_PLUGIN_FILES
}
"
!=
"x"
;
then
info_msg
"Loading configuration from
$MPI_START_PLUGIN_FILES
"
.
${
MPI_START_PLUGIN_FILES
}
break
fi
done
# finally load the mpi-config.local if available
mpi_start_get_plugin
"mpi-config.local"
1
if
test
"x
${
MPI_START_PLUGIN_FILES
}
"
!=
"x"
;
then
info_msg
"Loading local configuration from
$MPI_START_PLUGIN_FILES
"
.
${
MPI_START_PLUGIN_FILES
}
fi
}
#======================================================================
# Try to find out the current OS distribution
#======================================================================
mpi_start_detect_os
()
{
MPI_START_UNAME
=
`
uname
-s
|
tr
"[:upper:]"
"[:lower:]"
`
MPI_START_ARCH
=
`
uname
-m
`
if
test
"x
${
MPI_START_UNAME
}
"
=
"xlinux"
;
then
which lsb_release 2> /dev/null
>
/dev/null
if
test
$?
-eq
0
;
then
export
MPI_START_OS_DIST
=
`
lsb_release
-si
2> /dev/null
`
echo
$MPI_START_OS_DIST
| egrep
-i
"debian|ubuntu"
>
/dev/null
if
test
$?
-eq
0
;
then
export
MPI_START_OS_DIST_TYPE
=
"debian"
fi
echo
$MPI_START_OS_DIST
| egrep
-i
"redhat|scientificlinux"
>
/dev/null
if
test
$?
-eq
0
;
then
export
MPI_START_OS_DIST_TYPE
=
"el"
fi
export
MPI_START_OS_RELEASE
=
`
lsb_release
-sr
2> /dev/null
`
export
MPI_START_OS_RELEASE_MAJOR
=
`
echo
$MPI_START_OS_RELEASE
|
cut
-f1
-d
"."
`
fi
fi
}
#======================================================================
#======================================================================
# Checks that mpi-start are correct and coherent
# Checks that mpi-start are correct and coherent
#======================================================================
#======================================================================
...
@@ -468,7 +524,8 @@ mpi_start_check_options() {
...
@@ -468,7 +524,8 @@ mpi_start_check_options() {
set
-x
set
-x
fi
fi
MPI_START_UNAME
=
`
uname
-s
|
tr
"[:upper:]"
"[:lower:]"
`
# detect os flavor
mpi_start_detect_os
if
test
-r
"
${
I2G_MPI_CONFIG
}
"
;
then
if
test
-r
"
${
I2G_MPI_CONFIG
}
"
;
then
.
${
I2G_MPI_CONFIG
}
.
${
I2G_MPI_CONFIG
}
...
@@ -546,11 +603,8 @@ mpi_start_check_options() {
...
@@ -546,11 +603,8 @@ mpi_start_check_options() {
dump_env
dump_env
fi
fi
# source the local mpi-start variables if any
# try to source the OS mpi variables
mpi_start_get_plugin
"mpi-config.local"
1
mpi_start_load_mpi_config
if
test
"x
${
MPI_START_PLUGIN_FILES
}
"
!=
"x"
;
then
.
${
MPI_START_PLUGIN_FILES
}
fi
}
}
...
...
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