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
a04a28a2
Commit
a04a28a2
authored
2 years ago
by
Fabian.Jakub
Browse files
Options
Downloads
Patches
Plain Diff
enhance spack icon-nwp package to allow a build with PETSc and 3D radiation
parent
3c2c2749
No related branches found
No related tags found
1 merge request
!5
Update readme
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
spack_repo/packages/icon-nwp/package.py
+22
-2
22 additions, 2 deletions
spack_repo/packages/icon-nwp/package.py
spack_repo/packages/tenstream/package.py
+51
-0
51 additions, 0 deletions
spack_repo/packages/tenstream/package.py
with
73 additions
and
2 deletions
spack_repo/packages/icon-nwp/package.py
+
22
−
2
View file @
a04a28a2
...
...
@@ -27,6 +27,8 @@ class IconNwp(Package):
version
(
"
psp
"
,
branch
=
"
icon-nwp/icon-nwp-psp
"
)
variant
(
"
lmu
"
,
default
=
False
,
description
=
"
if git.url and submodules should be patched to use the LMU mirrors
"
)
variant
(
"
plexrt
"
,
default
=
False
,
description
=
"
add 3D radiation support with TenStream
"
)
variant
(
"
petsc
"
,
default
=
False
,
description
=
"
add PETSc support
"
)
# Dependencies
depends_on
(
"
mpi
"
)
...
...
@@ -35,6 +37,10 @@ class IconNwp(Package):
depends_on
(
"
eccodes+fortran
"
)
depends_on
(
"
libxml2
"
)
depends_on
(
"
petsc
"
,
when
=
"
+petsc
"
)
depends_on
(
"
petsc
"
,
when
=
"
+plexrt
"
)
depends_on
(
"
tenstream
"
,
when
=
"
+plexrt
"
)
# Openblas? best way of doing it?
depends_on
(
"
openblas
"
,
when
=
"
%gcc
"
)
depends_on
(
"
intel-mkl
"
,
when
=
"
%intel
"
)
...
...
@@ -162,13 +168,27 @@ class IconNwp(Package):
libs
.
append
(
"
-lyaml
"
)
mtune
=
"
generic
"
INCLUDES
=
f
"
-I
{
spec
[
'
libxml2
'
].
prefix
}
/include/libxml2
"
INCLUDES
=
[
f
"
-I
{
spec
[
'
libxml2
'
].
prefix
}
/include/libxml2
"
,
]
CPPFLAGS
=
[]
if
"
+plexrt
"
in
self
.
spec
:
CPPFLAGS
.
append
(
"
-DHAVE_PLEXRT
"
)
INCLUDES
.
append
(
f
"
-I
{
spec
[
'
tenstream
'
].
prefix
}
/include
"
)
libs
.
append
(
f
"
-L
{
spec
[
'
tenstream
'
].
prefix
.
lib
}
-ltenstream
"
)
if
"
+petsc
"
in
self
.
spec
:
CPPFLAGS
.
append
(
"
-DHAVE_PETSC
"
)
INCLUDES
.
append
(
f
"
-I
{
spec
[
'
petsc
'
].
prefix
}
/include
"
)
libs
.
append
(
f
"
-L
{
spec
[
'
petsc
'
].
prefix
.
lib
}
-lpetsc
"
)
options
=
[
f
"
CC=
{
spec
[
'
mpi
'
].
mpicc
}
"
,
f
"
FC=
{
spec
[
'
mpi
'
].
mpifc
}
"
,
f
"
CFLAGS=-g -mpc64
{
INCLUDES
}
"
,
f
"
CFLAGS=-g -mpc64
{
'
'
.
join
(
INCLUDES
)
}
"
,
f
"
ICON_CFLAGS=-O3 -g -mtune=
{
mtune
}
"
,
f
"
ICON_BUNDLED_CFLAGS=-O3 -mtune=
{
mtune
}
"
,
f
"
CPPFLAGS=
{
'
'
.
join
(
CPPFLAGS
)
}
"
,
"
FCFLAGS=-std=legacy -fmodule-private -fimplicit-none -fmax-identifier-length=63 -Wall -Wcharacter-truncation -Wconversion -Wunderflow -Wunused-parameter -Wno-surprising -fall-intrinsics -g -mpc64 -w
"
,
"
ICON_FCFLAGS=-fbacktrace -fbounds-check -fstack-protector-all -finit-real=nan -finit-integer=-2147483648 -finit-character=127 -w -O2
"
,
f
"
ICON_OCEAN_FCFLAGS=-O3 -mtune=
{
mtune
}
"
,
...
...
This diff is collapsed.
Click to expand it.
spack_repo/packages/tenstream/package.py
0 → 100644
+
51
−
0
View file @
a04a28a2
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from
spack.package
import
*
class
Tenstream
(
CMakePackage
):
"""
Recipe to build TenStream radiative transfer lib.
"""
homepage
=
"
https://gitlab.com/jakubfabian/tenstream.git
"
git
=
"
https://gitlab.com/jakubfabian/tenstream.git
"
version
(
"
master
"
,
branch
=
"
master
"
)
version
(
"
next
"
,
branch
=
"
next
"
)
variant
(
"
debug
"
,
default
=
False
,
description
=
"
use debug flags to build
"
)
variant
(
"
rayli
"
,
default
=
False
,
description
=
"
download and build with RayLI - MonteCarlo raytracer for unstructured meshes
"
)
# Dependencies
depends_on
(
"
mpi
"
)
depends_on
(
"
cmake
"
)
depends_on
(
"
netcdf-fortran
"
)
depends_on
(
"
petsc
"
)
def
setup_build_environment
(
self
,
env
):
spec
=
self
.
spec
# Some environment variables to set
env_variables_to_set
=
{
"
CC
"
:
spec
[
"
mpi
"
].
mpicc
,
"
CXX
"
:
spec
[
"
mpi
"
].
mpicxx
,
"
FC
"
:
spec
[
"
mpi
"
].
mpifc
,
"
F77
"
:
spec
[
"
mpi
"
].
mpif77
,
}
for
variable
,
value
in
env_variables_to_set
.
items
():
env
.
set
(
variable
,
value
)
def
cmake_args
(
self
):
args
=
[]
if
"
+debug
"
in
self
.
spec
:
args
.
append
(
'
-DCMAKE_BUILD_TYPE=DEBUG
'
)
if
"
+rayli
"
in
self
.
spec
:
args
.
append
(
"
-DBUILD_RAYLI=ON
"
)
return
args
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