Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dedal
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EBRAINS RI
Tech Hub
Platform
EBRAINS Software Distribution
dedal
Commits
721b828e
Commit
721b828e
authored
8 months ago
by
Eric Müller
Browse files
Options
Downloads
Patches
Plain Diff
feat: parallelize spack install (i.e. build) of uncached packages
Change-Id: Ibb9cb13002dcfe159e93cd1676cb7d5e142ff328
parent
c11627ad
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/yashchiki
+1
-1
1 addition, 1 deletion
bin/yashchiki
lib/yashchiki/install_spack_packages.sh
+8
-2
8 additions, 2 deletions
lib/yashchiki/install_spack_packages.sh
with
9 additions
and
3 deletions
bin/yashchiki
+
1
−
1
View file @
721b828e
...
...
@@ -120,7 +120,7 @@ parser.add_argument(
# optional options
parser
.
add_argument
(
"
-j
"
,
"
--jobs
"
,
type
=
int
,
default
=
1
,
help
=
"
Number of parallel jobs to use when concurt execution of tasks is available.
"
)
help
=
"
Number of parallel jobs to use when concur
ren
t execution of tasks is available.
"
)
parser
.
add_argument
(
"
--debug
"
,
action
=
"
store_true
"
,
help
=
"
Enable debug-level logging.
"
)
...
...
This diff is collapsed.
Click to expand it.
lib/yashchiki/install_spack_packages.sh
+
8
−
2
View file @
721b828e
...
...
@@ -14,6 +14,8 @@ cd "$HOME"
install_from_buildcache
"
${
spack_packages
[@]+
"
${
spack_packages
[@]
}
"
}
"
echo
"INSTALLING PACKAGES"
# heurisitic: let's use -j 8 typically… (and parallelize spack builds)
SPACK_INSTALL_PARALLELISM
=
1
# ECM (2024-09-16): disabled $(( (${YASHCHIKI_JOBS} - 8) / 8 + 1))
for
package
in
"
${
spack_packages
[@]+
"
${
spack_packages
[@]
}
"
}
"
;
do
# Disable cache because we already installed from build cache.
# Also there is a bug that when `--no-cache` is not specified, install will
...
...
@@ -24,8 +26,12 @@ for package in "${spack_packages[@]+"${spack_packages[@]}"}"; do
echo
"ERROR: Failed to concretize
${
package
}
for install."
>
&2
exit
1
fi
echo
"Installing:
${
package
}
"
>
&2
${
MY_SPACK_CMD
}
"
${
SPACK_ARGS_INSTALL
[@]+
"
${
SPACK_ARGS_INSTALL
[@]
}
"
}
"
install
--fresh
--no-cache
--show-log-on-error
--file
"
${
specfile
}
"
echo
"Installing:
${
package
}
(parallelism factor
${
SPACK_INSTALL_PARALLELISM
}
)"
>
&2
for
i
in
`
seq
1
${
SPACK_INSTALL_PARALLELISM
}
`
;
do
(
nohup
${
MY_SPACK_CMD
}
"
${
SPACK_ARGS_INSTALL
[@]+
"
${
SPACK_ARGS_INSTALL
[@]
}
"
}
"
install
-j
$((
(
${
YASHCHIKI_JOBS
}
-
${
SPACK_INSTALL_PARALLELISM
}
)
/
${
SPACK_INSTALL_PARALLELISM
}
+
1
))
--fresh
--no-cache
--show-log-on-error
--file
"
${
specfile
}
"
|
sed
-e
"s:^:[
${
package
}
-
${
i
}
] :g"
)
&
done
wait
done
# create the filesystem views (exposed via singularity --app option)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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