Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
autoicon
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
w2w
autoicon
Commits
9c168783
Commit
9c168783
authored
2 years ago
by
Fabian.Jakub
Browse files
Options
Downloads
Patches
Plain Diff
first try to run through the icon install with a encapsulated spack
parent
d1652911
No related branches found
No related tags found
1 merge request
!3
Refactor folder structure. Putting configuration files and namelists inside...
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
platforms/common/spack_utils.sh
+22
-2
22 additions, 2 deletions
platforms/common/spack_utils.sh
templates/common/build_icon.sh
+16
-12
16 additions, 12 deletions
templates/common/build_icon.sh
with
38 additions
and
14 deletions
platforms/common/spack_utils.sh
+
22
−
2
View file @
9c168783
function
spack_env
()
{
export
SPACK_SETUP_ENV
=
spack/share/spack/setup-env.sh
export
SPACK_VENV
=
spack_icon_env
export
SPACK_USER_CACHE_PATH
=
${
WORKDIR
}
/SPACK_USER_CACHE_PATH
export
SPACK_DISABLE_LOCAL_CONFIG
=
true
}
function
install_spack
()
{
spack_env
#TODO: Would be good to enable the re-utilization of existing spack packages (via packages.yaml or upstreams.yaml)
if
[
!
-f
${
SPACK_SETUP_ENV
}
]
;
then
git clone
${
SPACK_URL
}
-b
${
SPACK_BRANCH
}
fi
.
${
SPACK_SETUP_ENV
}
spack
env
create
$SPACK_VENV
spack
env
activate
-p
$SPACK_VENV
spack compiler find
}
function
load_spack
()
{
}
\ No newline at end of file
spack_env
if
[
!
-f
${
SPACK_SETUP_ENV
}
]
;
then
install_spack
;
fi
.
${
SPACK_SETUP_ENV
}
spack
env
activate
-p
$SPACK_VENV
}
This diff is collapsed.
Click to expand it.
templates/common/build_icon.sh
+
16
−
12
View file @
9c168783
...
...
@@ -14,24 +14,28 @@ fi
# Go to the working directory
cd
${
WORKDIR
}
# Check if experiment's spack installation already exists, if it doesn't, clone it.
SPACK_ENV
=
spack/share/spack/setup-env.sh
if
[
!
-f
${
SPACK_ENV
}
]
;
then
git clone
${
SPACK_URL
}
-b
${
SPACK_BRANCH
}
#TODO: Would be good to enable the re-utilization of existing spack packages (via packages.yaml or upstreams.yaml)
fi
# Setup the environment
source
${
SPACK_ENV
}
.
${
WORKDIR
}
/proj/platforms/common/spack_utils.sh
load_spack
if
[
$(
spack find icon-nwp@
${
ICON_VERSION
}
&>/dev/null
echo
$?
)
-ne
0
]
;
then
echo
"Installing icon-nwp@
${
ICON_VERSION
}
."
# Compile openmpi with schedulers=slurm
spack
install
openmpi%
${
SPACK_COMPILER
}
+legacylaunchers
schedulers
=
slurm
spack
install
icon-nwp@
${
ICON_VERSION
}
%
${
SPACK_COMPILER
}
^openmpi%
${
SPACK_COMPILER
}
if
[[
$(
spack compiler info
${
SPACK_COMPILER
}
)
]]
;
then
echo
"Found Compiler"
else
echo
"could not find compiler, try to install it... this may take a while"
spack add
${
SPACK_COMPILER
}
spack
install
spack compiler add
$(
spack location
--install-dir
$SPACK_COMPILER
)
fi
spack add ucx%
${
SPACK_COMPILER
}
+dc+dm+ib_hw_tm+mlx5_dv+rc+rdmacm+thread_multiple+ud+verbs~cuda
spack add openmpi%
${
SPACK_COMPILER
}
+pmi+legacylaunchers~cuda
schedulers
=
slurm
fabrics
=
ucx
spack add icon-nwp@
${
ICON_VERSION
}
%
${
SPACK_COMPILER
}
^openmpi%
${
SPACK_COMPILER
}
spack
install
else
echo
"icon-nwp@
${
ICON_VERSION
}
already installed!"
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