-
Notifications
You must be signed in to change notification settings - Fork 2
Reworking of Paraview and TTK build: catalyst adaptor working in WFA #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f709fd1
c4528ab
3fd7f80
bdd481e
2e0af0b
4ebbe96
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import os | ||
| import sysconfig | ||
|
|
||
| prefix = os.environ["prefix"] | ||
| venv = os.environ.get("VIRTUAL_ENV", None) | ||
|
|
||
| if venv: | ||
| venv_site_packages = sysconfig.get_path("platlib") | ||
| print(f'prepend-path PYTHONPATH "{venv_site_packages}"') | ||
|
|
||
| print(f'setenv VIRTUAL_ENV "{prefix}"') |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,8 @@ | ||
| #%Module | ||
| module-whatis "Wildfire Analyst VESTEC app" | ||
|
|
||
| if {![is-loaded ttk]} { | ||
| module load ttk/0.9.9 | ||
| } | ||
| setenv FIREAPP_DIR "${prefix}" | ||
| prepend-path PATH "${prefix}/bin" |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/bin/bash | ||
| if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then | ||
| echo "Don't source me" | ||
| return 1 | ||
| fi | ||
| set -e | ||
|
|
||
| thisdir=$(readlink -f $(dirname $BASH_SOURCE)) | ||
| . $thisdir/env.sh | ||
|
|
||
| # Set up the virtual env first | ||
| if [ ! -f $prefix/bin/activate ]; then | ||
| python3 -m venv --system-site-packages $prefix | ||
| fi | ||
| . $prefix/bin/activate | ||
|
|
||
| pip3 install numpy==${numpy_version} | ||
|
|
||
| $thisdir/main-configure.sh |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,23 +13,33 @@ if [ -z "$INSTALLER_PARAVIEW_ENV_SH" ]; then | |
| name=paraview | ||
| version=5.9.0 | ||
| version_tag=v${version} | ||
| numpy_version=1.19.2 | ||
|
|
||
| source_dir_name=paraview-$version_tag | ||
| build_dir_name=build-$version_tag | ||
|
|
||
| declare -A cmake_vars | ||
|
|
||
| installer_init | ||
|
|
||
| declare -A cmake_vars | ||
| cmake_vars[BUILD_TESTING]=OFF | ||
| cmake_vars[PARAVIEW_BUILD_SHARED_LIBS]=ON | ||
| cmake_vars[PARAVIEW_BUILD_EDITION]=CATALYST_RENDERING | ||
| cmake_vars[paraview_SOURCE_SELECTION]=$version | ||
| cmake_vars[ENABLE_boost]=ON | ||
| cmake_vars[USE_SYSTEM_boost]=ON | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why using the system boost ?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd equally ask why not? Boost is available as a system module so means the install is a little faster and uses less disk |
||
| cmake_vars[ENABLE_numpy]=ON | ||
| cmake_vars[USE_SYSTEM_numpy]=ON | ||
| cmake_vars[ENABLE_protobuf]=ON | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is TTK now ? in #5 I update this part to use the one provided by the superbuild |
||
| cmake_vars[ENABLE_python]=ON | ||
| cmake_vars[ENABLE_python3]=ON | ||
| cmake_vars[USE_SYSTEM_python3]=ON | ||
| cmake_vars[USE_SYSTEM_boost]=ON | ||
| cmake_vars[ENABLE_gdal]=ON | ||
| cmake_vars[USE_SYSTEM_zlib]=ON | ||
| # PV superbuild uses this instead of CMAKE_INSTALL_PREFIX | ||
| cmake_vars[superbuild_install_location]=$prefix | ||
| # Also doesn't use the standard -j flag for parallelism | ||
| cmake_vars[SUPERBUILD_PROJECT_PARALLELISM]=$make_parallelism | ||
|
|
||
| python_layer_env=$(prefix=$prefix python3 $installer_dir/generic/pip/module_venv_paths.py) | ||
| fi | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../generic/cmake/configure.sh |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,12 @@ | ||
| #%Module | ||
| module-whatis "ParaView-$version server (Catalyst edition)" | ||
|
|
||
| if {![is-loaded python]} { | ||
| module load python/3.8.5 | ||
| } | ||
|
|
||
| ${python_layer_venv} | ||
|
|
||
| setenv PARAVIEW_DIR "${prefix}" | ||
| prepend-path PATH "${prefix}/bin" | ||
| setenv PARAVIEW_VERSION "${version}" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,22 +12,10 @@ if [ -z "$INSTALLER_TTK_ENV_SH" ]; then | |
| build_dir_name=build-$version | ||
|
|
||
| # TTK needs a patched version of Paraview | ||
| pv_version=5.8.1 | ||
| pv_source_dir_name=ParaView-v$pv_version | ||
| pv_version=5.9.0 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. update here too. |
||
|
|
||
| declare -A cmake_vars | ||
|
|
||
| module load paraview/$pv_version | ||
| installer_init | ||
|
|
||
| if [ -x $prefix/bin/pvpython ]; then | ||
| # This only possible after install; only needed for module | ||
| pvpython_sitepackage_dir=$($prefix/bin/pvpython $thisdir/get_site_packages.py) | ||
| fi | ||
| if [ -f $prefix/bin/activate ]; then | ||
| python_sitepackage_dir=$( | ||
| ( . /lustre/home/shared/dc118/sw/ttk/0.9.9/bin/activate; | ||
| python -c 'import sysconfig; print(sysconfig.get_path("platlib"))' | ||
| ) | ||
| ) | ||
| fi | ||
| fi | ||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,16 @@ | ||
| #%Module | ||
| module-whatis "TTK version ${version} including Paraview ${pv_version}" | ||
| module-whatis "TTK version ${version}" | ||
|
|
||
| setenv TTK_DIR "${prefix}" | ||
| prepend-path PATH "${prefix}/bin" | ||
|
|
||
| setenv VIRTUAL_ENV "${prefix}" | ||
| prepend-path PV_PLUGIN_PATH "${prefix}/bin/plugins" | ||
|
|
||
| # This is needed to ensure that TTK/Paraview work in another venv with | ||
| # this module loaded. | ||
| prepend-path PYTHONPATH "${pvpython_sitepackage_dir}" | ||
| # And this one is for numpy | ||
| prepend-path PYTHONPATH "${python_sitepackage_dir}" | ||
| if {![is-loaded paraview]} { | ||
| module load paraview/${pv_version} | ||
| } | ||
|
|
||
| if {![is-loaded boost]} { | ||
| module load boost/1.73.0 | ||
| } | ||
|
|
||
| setenv TTK_DIR "${prefix}" | ||
| prepend-path PATH "${prefix}/bin" | ||
|
|
||
| prepend-path PV_PLUGIN_PATH "${prefix}/bin/plugins" | ||
| prepend-path PYTHONPATH "${prefix}/lib/python3.8/site-packages" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should use 5.9.1, or even master / git