Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
OGS Container Maker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
ogs
OGS Container Maker
Commits
2f0f21f7
Commit
2f0f21f7
authored
5 years ago
by
Lars Bilke
Browse files
Options
Downloads
Patches
Plain Diff
Added parameter --insitu.
parent
9548e73d
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
ogscm/building_blocks/__init__.py
+1
-0
1 addition, 0 deletions
ogscm/building_blocks/__init__.py
ogscm/building_blocks/paraview.py
+119
-0
119 additions, 0 deletions
ogscm/building_blocks/paraview.py
ogscm/cli.py
+23
-8
23 additions, 8 deletions
ogscm/cli.py
ogscm/cli_args.py
+4
-0
4 additions, 0 deletions
ogscm/cli_args.py
with
147 additions
and
8 deletions
ogscm/building_blocks/__init__.py
+
1
−
0
View file @
2f0f21f7
...
@@ -10,6 +10,7 @@ from ogscm.building_blocks.lmod import lmod
...
@@ -10,6 +10,7 @@ from ogscm.building_blocks.lmod import lmod
from
ogscm.building_blocks.ogs
import
ogs
from
ogscm.building_blocks.ogs
import
ogs
from
ogscm.building_blocks.ogs_base
import
ogs_base
from
ogscm.building_blocks.ogs_base
import
ogs_base
from
ogscm.building_blocks.osu_benchmarks
import
osu_benchmarks
from
ogscm.building_blocks.osu_benchmarks
import
osu_benchmarks
from
ogscm.building_blocks.paraview
import
paraview
from
ogscm.building_blocks.petsc
import
petsc
from
ogscm.building_blocks.petsc
import
petsc
from
ogscm.building_blocks.pm_conan
import
pm_conan
from
ogscm.building_blocks.pm_conan
import
pm_conan
from
ogscm.building_blocks.pm_easybuild
import
pm_easybuild
from
ogscm.building_blocks.pm_easybuild
import
pm_easybuild
...
...
This diff is collapsed.
Click to expand it.
ogscm/building_blocks/paraview.py
0 → 100644
+
119
−
0
View file @
2f0f21f7
# pylint: disable=invalid-name, too-few-public-methods
# pylint: disable=too-many-instance-attributes
"""
paraview building block
"""
from
__future__
import
absolute_import
from
__future__
import
unicode_literals
from
__future__
import
print_function
import
re
import
os
import
hpccm.templates.wget
from
hpccm.building_blocks.base
import
bb_base
from
hpccm.building_blocks.generic_cmake
import
generic_cmake
from
hpccm.building_blocks.packages
import
packages
from
hpccm.primitives.comment
import
comment
from
hpccm.primitives.copy
import
copy
from
hpccm.primitives.environment
import
environment
from
hpccm.toolchain
import
toolchain
from
hpccm.primitives.shell
import
shell
class
paraview
(
bb_base
,
hpccm
.
templates
.
CMakeBuild
,
hpccm
.
templates
.
ldconfig
,
hpccm
.
templates
.
rm
,
hpccm
.
templates
.
tar
,
hpccm
.
templates
.
wget
):
"""
The `paraview` building block downloads and installs the
[paraview](https://paraview.org/) component.
# Parameters
prefix: The top level installation location. The default value
is `/usr/local/paraview`.
version: The version of paraview source to download. The default
value is `master`.
# Examples
```python
paraview()
```
"""
def
__init__
(
self
,
**
kwargs
):
super
(
paraview
,
self
).
__init__
(
**
kwargs
)
self
.
__cmake_args
=
kwargs
.
get
(
'
cmake_args
'
,
[])
self
.
__edition
=
kwargs
.
get
(
'
CANONICAL
'
)
self
.
__ospackages
=
kwargs
.
get
(
'
ospackages
'
,
[])
self
.
__parallel
=
kwargs
.
get
(
'
parallel
'
,
'
$(nproc)
'
)
self
.
__prefix
=
kwargs
.
get
(
'
prefix
'
,
'
/usr/local/paraview
'
)
self
.
__shared
=
kwargs
.
get
(
'
shared
'
,
True
)
self
.
__toolchain
=
kwargs
.
get
(
'
toolchain
'
,
toolchain
())
self
.
__version
=
kwargs
.
get
(
'
version
'
,
'
master
'
)
# TODO:
if
False
:
match
=
re
.
match
(
r
'
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<revision>\d+)
'
,
self
.
__version
)
short_version
=
'
{0}.{1}
'
.
format
(
match
.
groupdict
()[
'
major
'
],
match
.
groupdict
()[
'
minor
'
])
self
.
__baseurl
=
kwargs
.
get
(
'
baseurl
'
,
'
https://www.paraview.org/files/release/{0}
'
.
format
(
short_version
))
self
.
__environment_variables
=
{}
self
.
__instructions
()
def
__instructions
(
self
):
self
+=
comment
(
'
paraview {}
'
.
format
(
self
.
__version
))
# if ubuntu:
self
.
__ospackages
.
append
(
'
ninja-build
'
)
self
+=
packages
(
ospackages
=
self
.
__ospackages
)
self
.
__cmake_args
.
extend
([
'
-G Ninja
'
,
'
-D CMAKE_BUILD_TYPE=Release
'
,
'
-D PARAVIEW_BUILD_EDITION={}
'
.
format
(
self
.
__edition
)])
if
not
self
.
__shared
:
self
.
__cmake_args
.
append
(
'
-D BUILD_SHARED_LIBS=OFF
'
)
if
self
.
__toolchain
.
CC
==
'
mpicc
'
:
self
.
__cmake_args
.
append
(
'
-D PARAVIEW_USE_MPI=ON
'
)
# TODO: Install dependencies for rendering editions (ospackages)
self
+=
generic_cmake
(
branch
=
self
.
__version
,
cmake_opts
=
self
.
__cmake_args
,
directory
=
'
paraview-{}
'
.
format
(
self
.
__version
),
prefix
=
self
.
__prefix
,
toolchain
=
self
.
__toolchain
,
recursive
=
True
,
repository
=
'
https://gitlab.kitware.com/paraview/paraview.git
'
)
self
.
__environment_variables
[
'
ParaView_DIR
'
]
=
self
.
__prefix
# Set library path
if
self
.
__shared
:
libpath
=
os
.
path
.
join
(
self
.
__prefix
,
'
lib
'
)
if
self
.
ldconfig
:
self
+=
shell
(
commands
=
[
self
.
ldcache_step
(
directory
=
libpath
)])
else
:
self
.
__environment_variables
[
'
LD_LIBRARY_PATH
'
]
=
'
{}:$LD_LIBRARY_PATH
'
.
format
(
libpath
)
self
+=
environment
(
variables
=
self
.
__environment_variables
)
def
runtime
(
self
,
_from
=
'
0
'
):
if
not
self
.
__shared
:
return
str
(
comment
(
'
ParaView (empty)
'
))
instructions
=
[]
instructions
.
append
(
comment
(
'
ParaView {}
'
.
format
(
self
.
__version
)))
instructions
.
append
(
copy
(
_from
=
_from
,
src
=
self
.
__prefix
,
dest
=
self
.
__prefix
))
if
self
.
ldconfig
:
libpath
=
os
.
path
.
join
(
self
.
__prefix
,
'
lib
'
)
instructions
.
append
(
shell
(
commands
=
[
self
.
ldcache_step
(
directory
=
libpath
)]))
instructions
.
append
(
environment
(
variables
=
self
.
__environment_variables
))
return
'
\n
'
.
join
(
str
(
x
)
for
x
in
instructions
)
This diff is collapsed.
Click to expand it.
ogscm/cli.py
+
23
−
8
View file @
2f0f21f7
...
@@ -31,7 +31,8 @@ from ogscm.config import package_manager
...
@@ -31,7 +31,8 @@ from ogscm.config import package_manager
from
ogscm.container_info
import
container_info
from
ogscm.container_info
import
container_info
from
ogscm.version
import
__version__
from
ogscm.version
import
__version__
from
ogscm.building_blocks
import
ccache
,
cppcheck
,
cvode
,
eigen
,
iwyy
,
\
from
ogscm.building_blocks
import
ccache
,
cppcheck
,
cvode
,
eigen
,
iwyy
,
\
jenkins_node
,
ogs_base
,
ogs
,
osu_benchmarks
,
petsc
,
pm_conan
,
vtk
,
pm_spack
jenkins_node
,
ogs_base
,
ogs
,
osu_benchmarks
,
petsc
,
pm_conan
,
vtk
,
\
pm_spack
,
paraview
def
main
():
# pragma: no cover
def
main
():
# pragma: no cover
...
@@ -121,6 +122,10 @@ def main(): # pragma: no cover
...
@@ -121,6 +122,10 @@ def main(): # pragma: no cover
version
=
args
.
compiler_version
)
version
=
args
.
compiler_version
)
toolchain
=
compiler
.
toolchain
toolchain
=
compiler
.
toolchain
Stage0
+=
compiler
Stage0
+=
compiler
# Upgrade stdc++ lib after installing new compiler
# https://stackoverflow.com/a/46613656/80480
if
args
.
compiler
==
'
gcc
'
and
args
.
compiler_version
!=
None
:
Stage0
+=
packages
(
apt
=
[
'
libstdc++6
'
])
if
args
.
compiler
==
'
clang
'
:
if
args
.
compiler
==
'
clang
'
:
Stage0
+=
packages
(
Stage0
+=
packages
(
apt
=
[
apt
=
[
...
@@ -284,13 +289,19 @@ def main(): # pragma: no cover
...
@@ -284,13 +289,19 @@ def main(): # pragma: no cover
Stage0
+=
boost
(
version
=
'
1.66.0
'
)
# header only?
Stage0
+=
boost
(
version
=
'
1.66.0
'
)
# header only?
Stage0
+=
environment
(
variables
=
{
'
BOOST_ROOT
'
:
'
/usr/local/boost
'
})
Stage0
+=
environment
(
variables
=
{
'
BOOST_ROOT
'
:
'
/usr/local/boost
'
})
Stage0
+=
eigen
()
Stage0
+=
eigen
()
vtk_cmake_args
=
[
if
args
.
insitu
:
'
-DVTK_Group_StandAlone=OFF
'
,
'
-DVTK_Group_Rendering=OFF
'
,
Stage0
+=
paraview
(
cmake_args
=
[
'
-D PARAVIEW_USE_PYTHON=ON
'
],
'
-DModule_vtkIOXML=ON
'
edition
=
'
CATALYST
'
,
]
ldconfig
=
True
,
Stage0
+=
vtk
(
cmake_args
=
vtk_cmake_args
,
toolchain
=
toolchain
)
toolchain
=
toolchain
,
else
:
ldconfig
=
True
)
vtk_cmake_args
=
[
'
-DVTK_Group_StandAlone=OFF
'
,
'
-DVTK_Group_Rendering=OFF
'
,
'
-DModule_vtkIOXML=ON
'
]
Stage0
+=
vtk
(
cmake_args
=
vtk_cmake_args
,
toolchain
=
toolchain
,
ldconfig
=
True
)
if
ompi
!=
'
off
'
:
if
ompi
!=
'
off
'
:
Stage0
+=
petsc
(
version
=
'
3.11.3
'
,
ldconfig
=
True
)
Stage0
+=
petsc
(
version
=
'
3.11.3
'
,
ldconfig
=
True
)
if
args
.
cvode
:
if
args
.
cvode
:
...
@@ -319,6 +330,8 @@ def main(): # pragma: no cover
...
@@ -319,6 +330,8 @@ def main(): # pragma: no cover
cmake_args
.
append
(
'
-DOGS_USE_CVODE=ON
'
)
cmake_args
.
append
(
'
-DOGS_USE_CVODE=ON
'
)
if
args
.
gui
:
if
args
.
gui
:
cmake_args
.
append
(
'
-DOGS_BUILD_GUI=ON
'
)
cmake_args
.
append
(
'
-DOGS_BUILD_GUI=ON
'
)
if
args
.
insitu
:
cmake_args
.
append
(
'
-DOGS_INSITU=ON
'
)
if
not
scif_installed
:
if
not
scif_installed
:
Stage0
+=
pip
(
packages
=
[
'
scif
'
],
pip
=
'
pip3
'
)
# SCI-F
Stage0
+=
pip
(
packages
=
[
'
scif
'
],
pip
=
'
pip3
'
)
# SCI-F
...
@@ -363,6 +376,8 @@ def main(): # pragma: no cover
...
@@ -363,6 +376,8 @@ def main(): # pragma: no cover
src
=
'
/usr/local/bin/mpi_*
'
,
src
=
'
/usr/local/bin/mpi_*
'
,
dest
=
'
/usr/local/bin/
'
)
dest
=
'
/usr/local/bin/
'
)
Stage1
+=
Stage0
.
runtime
()
Stage1
+=
Stage0
.
runtime
()
if
args
.
compiler
==
'
gcc
'
and
args
.
compiler_version
!=
None
:
Stage1
+=
packages
(
apt
=
[
'
libstdc++6
'
])
stages_string
+=
"
\n\n
"
+
str
(
Stage1
)
stages_string
+=
"
\n\n
"
+
str
(
Stage1
)
# ---------------------------- recipe end -----------------------------
# ---------------------------- recipe end -----------------------------
...
...
This diff is collapsed.
Click to expand it.
ogscm/cli_args.py
+
4
−
0
View file @
2f0f21f7
...
@@ -170,6 +170,10 @@ class Cli_Args(argparse.ArgumentParser):
...
@@ -170,6 +170,10 @@ class Cli_Args(argparse.ArgumentParser):
dest
=
'
dev
'
,
dest
=
'
dev
'
,
action
=
'
store_true
'
,
action
=
'
store_true
'
,
help
=
'
Installs development tools (vim, gdb)
'
)
help
=
'
Installs development tools (vim, gdb)
'
)
switches_g
.
add_argument
(
'
--insitu
'
,
dest
=
'
insitu
'
,
action
=
'
store_true
'
,
help
=
'
Builds with insitu capabilities
'
)
maint_g
=
self
.
add_argument_group
(
'
Maintenance
'
)
maint_g
=
self
.
add_argument_group
(
'
Maintenance
'
)
maint_g
.
add_argument
(
maint_g
.
add_argument
(
'
--clean
'
,
'
--clean
'
,
...
...
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