Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mpsd-software-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MPSD Computational Science
mpsd-software-manager
Commits
0c0d5827
Commit
0c0d5827
authored
1 year ago
by
Ashwin Kumar Karnad
Browse files
Options
Downloads
Patches
Plain Diff
Update task to be independent of spack-environments
parent
ebc96c85
No related branches found
No related tags found
2 merge requests
!19
Move linux-debian11 into main
,
!1
Resolve "First draft for user interface for top level install command"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
install-mpsd-software-environment.py
+10
-11
10 additions, 11 deletions
install-mpsd-software-environment.py
with
11 additions
and
11 deletions
.gitignore
0 → 100644
+
1
−
0
View file @
0c0d5827
.vscode
\ No newline at end of file
This diff is collapsed.
Click to expand it.
install-mpsd-software-environment.py
+
10
−
11
View file @
0c0d5827
...
...
@@ -42,20 +42,14 @@ def build_toolchains(
# Checks
## Check
if current Git branch name and MPSD_SPACK_VER( If passed ) match
## Check
that some mpsd_spack_ver is passed.
if
mpsd_spack_ver
is
None
:
mpsd_spack_ver
=
current_branch
elif
current_branch
!=
mpsd_spack_ver
:
# Ensure that the current Git branch name matches MPSD_SPACK_VER
raise
invoke
.
Exit
(
f
"
Error: Current Git branch name
{
current_branch
}
\n\
does not match argument for MPSD_SPACK_VER:
{
mpsd_spack_ver
}
"
"
Error: MPSD_SPACK_VER not passed. Please pass the MPSD Software stack version.
"
)
## Check if toolchains directory exists
toolchains_path
=
os
.
path
.
join
(
toolchain_base_dir
,
mpsd_os
,
mpsd_spack_ver
,
mpsd_microarch
)
spack_env_path
=
os
.
path
.
join
(
toolchain_base_dir
,
mpsd_os
,
mpsd_spack_ver
)
toolchains_path
=
os
.
path
.
join
(
spack_env_path
,
mpsd_microarch
)
if
not
os
.
path
.
exists
(
toolchains_path
):
os
.
makedirs
(
toolchains_path
)
else
:
...
...
@@ -64,6 +58,10 @@ def build_toolchains(
f
"
Error: Toolchains directory
{
toolchains_path
}
already exists.
\n\
Please remove it and try again.
"
)
### Clone spack-env repo at spack_env_path
with
c
.
cd
(
spack_env_path
+
"
/spack-environments
"
):
c
.
run
(
"
git clone git@gitlab.gwdg.de:mpsd-cs/spack-environments.git .
"
)
c
.
run
(
f
"
git checkout
{
mpsd_spack_ver
}
"
)
## Check if TOOLCHAIN_LIST is valid
available_toolchains
=
os
.
listdir
(
"
toolchains
"
)
...
...
@@ -85,13 +83,14 @@ def build_toolchains(
)
# Build toolchains
log_file
=
f
"
build_toolchains_
{
mpsd_spack_ver
}
_
{
time
.
strftime
(
'
%Y%m%d-%H%M%S
'
)
}
.log
"
print
(
f
"
Building at
{
toolchains_path
}
...
"
)
for
toolchain
in
toolchains
:
with
c
.
cd
(
toolchains_path
):
c
.
run
(
f
"
echo
'
>>>> Building
{
toolchain
}
...
'
| tee -a
{
log_file
}
"
)
c
.
run
(
f
"
bash
{
current_dir
}
/spack_setup.sh
{
flags
}
{
toolchain
}
|tee -a
{
log_file
}
2>&1
"
f
"
bash
{
spack_env_path
}
/spack-environments
/spack_setup.sh
{
flags
}
{
toolchain
}
|tee -a
{
log_file
}
2>&1
"
)
# copy the octopus configs to the toolchain directory
# c.run(f"cp -r {current_dir}/octopus {toolchains_path}")
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