Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gekkofs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc
gekkofs
Commits
25fd2f35
Verified
Commit
25fd2f35
authored
3 years ago
by
Alberto Miranda
Browse files
Options
Downloads
Patches
Plain Diff
dep_scripts: Allow install scripts to easily check the provided dependencies
parent
8a0867c8
No related branches found
Branches containing commit
No related tags found
1 merge request
!111
Resolve "Various issues with dependency scripts"
Pipeline
#2095
passed
3 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/compile_dep.sh
+35
-0
35 additions, 0 deletions
scripts/compile_dep.sh
scripts/profiles/0.8.0/install/mercury.install
+2
-4
2 additions, 4 deletions
scripts/profiles/0.8.0/install/mercury.install
with
37 additions
and
4 deletions
scripts/compile_dep.sh
+
35
−
0
View file @
25fd2f35
...
...
@@ -330,6 +330,41 @@ determine_compiler() {
fi
}
# Check whether the loaded profile defines a particular dependency name.
# The function requires a valid bash regex argument to do the search. The
# function is meant to be used in a conditional context.
#
# Examples:
# 1. Check whether any flavor of 'libfabric' is defined by the profile:
#
# if profile_has_dependency "^libfabric%.*$"; then
# echo "libfabric found"
# fi
#
# 2. Check whether a specific flavor of 'libfabric' is defined by the profile:
#
# if profile_has_dependency "^libfabric%experimental$"; then
# echo "libfabric.experimental found"
# fi
profile_has_dependency
()
{
if
[[
"$#"
-ne
1
]]
;
then
>
&2
echo
"FATAL: Missing argument in profile_has_dependency()"
exit
1
fi
regex
=
"
$1
"
for
name
in
"
${
PROFILE_DEP_LIST
[@]
}
"
;
do
if
[[
"
${
name
}
"
=
~
${
regex
}
]]
;
then
return
0
fi
done
return
1
}
POSITIONAL
=()
while
[[
$#
-gt
0
]]
;
do
...
...
This diff is collapsed.
Click to expand it.
scripts/profiles/0.8.0/install/mercury.install
+
2
−
4
View file @
25fd2f35
...
...
@@ -45,8 +45,6 @@
pkg_install
()
{
set
-
x
# if the profile compiles bmi, enable it
if
[[
-
n
"${PROFILE_DEP_NAMES['bmi']}"
]];
then
USE_BMI
=
"-DNA_USE_BMI:BOOL=ON"
...
...
@@ -54,8 +52,8 @@ pkg_install() {
USE_BMI
=
"-DNA_USE_BMI:BOOL=OFF"
fi
# if the profile
compiles
libfabric, enable it
if
[[
-
n
"${PROFILE_DEP_NAMES['
libfabric
']}"
]]
;
then
# if the profile
provides any flavour of
libfabric, enable it
if
profile_has_dependency
"^
libfabric
.*$"
;
then
USE_OFI
=
"-DNA_USE_OFI:BOOL=ON"
else
USE_OFI
=
"-DNA_USE_OFI:BOOL=OFF"
...
...
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