Repository navigation
Adding catalyst #51
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
base: pre_v5
Are you sure you want to change the base?
Adding catalyst #51
Changes from all commits
3a2013f
d3f985e
4021a37
45f4977
99fb509
6e8fbb0
06f5deb
50ec2b0
401ef31
8354e55
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 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -97,12 +97,82 @@ RUN mkdir -p /opt/veloc \ | |||||||||||
| && ./auto-install.py /opt/veloc | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
| # stage : pre_main image with VeloC | ||||||||||||
| # stage : catalyst builder | ||||||||||||
| FROM pre_main AS builder_catalyst | ||||||||||||
|
|
||||||||||||
| ARG CATALYST_VERSION | ||||||||||||
| ARG CMAKE_MINIMAL_VERSION_FOR_CATALYST | ||||||||||||
|
|
||||||||||||
| RUN mkdir -p /opt | ||||||||||||
| ENV HOME=/opt | ||||||||||||
| WORKDIR ${HOME} | ||||||||||||
|
|
||||||||||||
| RUN set -ex \ | ||||||||||||
| && export DEBIAN_FRONTEND=noninteractive \ | ||||||||||||
| && apt-get update -y \ | ||||||||||||
| && apt-get upgrade -y \ | ||||||||||||
| && apt-get install -y --no-install-recommends \ | ||||||||||||
| apt-transport-https \ | ||||||||||||
| ca-certificates \ | ||||||||||||
| git \ | ||||||||||||
| ninja-build \ | ||||||||||||
| curl \ | ||||||||||||
| && rm -rf /var/lib/apt/lists/* | ||||||||||||
|
|
||||||||||||
| RUN <<EORUN | ||||||||||||
| set -ex | ||||||||||||
| #cmake_installed=$(cmake --version | head -1 | cut -f3 -d" ") | ||||||||||||
| # | ||||||||||||
| #mapfile -t sorted < <(printf "%s\n" "$cmake_installed" "$CMAKE_MINIMAL_VERSION_FOR_CATALYST" | sort -V) | ||||||||||||
| # | ||||||||||||
| #cmake_exec=cmake | ||||||||||||
| #if [[ ${sorted[0]} == ${CMAKE_MINIMAL_VERSION_FOR_CATALYST} ]]; then | ||||||||||||
|
|
||||||||||||
| rejected_cmake_version="$(printf "%s\n" "$(cmake --version | head -1 | cut -f3 -d" ")" "$CMAKE_MINIMAL_VERSION_FOR_CATALYST" | sort -V | head -1)" | ||||||||||||
|
|
||||||||||||
| if [ "${rejected_cmake_version}" = "${CMAKE_MINIMAL_VERSION_FOR_CATALYST}" ]; then | ||||||||||||
| cmake_exec=cmake | ||||||||||||
| else | ||||||||||||
| curl -LfsSo cmake-bin.tar.gz "https://github.com/Kitware/CMake/releases/download/v"${CMAKE_MINIMAL_VERSION_FOR_CATALYST}"/cmake-"${CMAKE_MINIMAL_VERSION_FOR_CATALYST}"-linux-x86_64.tar.gz" | ||||||||||||
| tar -xf cmake-bin.tar.gz | ||||||||||||
| cmake_exec=${HOME}/cmake-${CMAKE_MINIMAL_VERSION_FOR_CATALYST}-linux-x86_64/bin/cmake | ||||||||||||
| fi | ||||||||||||
|
|
||||||||||||
| git clone --branch v${CATALYST_VERSION}.0 \ | ||||||||||||
| --single-branch \ | ||||||||||||
|
Member
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.
Suggested change
If that works, that prevents us from downloading the whole history for nothing and handles the submodules at the same time |
||||||||||||
| --depth 1 \ | ||||||||||||
| --recurse-submodules \ | ||||||||||||
| --shallow-submodules \ | ||||||||||||
| https://gitlab.kitware.com/paraview/catalyst.git \ | ||||||||||||
| ${HOME}/catalyst_clone/ | ||||||||||||
| cd ${HOME}/catalyst_clone/ | ||||||||||||
| mkdir build | ||||||||||||
|
|
||||||||||||
| ${cmake_exec} -GNinja -DCATALYST_BUILD_TESTING:BOOL=OFF \ | ||||||||||||
| -DCATALYST_USE_MPI:BOOL=ON \ | ||||||||||||
| -DCATALYST_WRAP_FORTRAN:BOOL=OFF \ | ||||||||||||
| -DCATALYST_WRAP_PYTHON:BOOL=ON \ | ||||||||||||
| -DCMAKE_INSTALL_PREFIX:PATH=/opt/catalyst/ \ | ||||||||||||
| -S ${HOME}/catalyst_clone/ -B ${HOME}/catalyst_clone/build | ||||||||||||
| ${cmake_exec} --build ${HOME}/catalyst_clone/build | ||||||||||||
| ${cmake_exec} --install ${HOME}/catalyst_clone/build | ||||||||||||
| EORUN | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
| # stage : pre_main image with VeloC and Catalyst | ||||||||||||
| FROM pre_main AS main | ||||||||||||
|
|
||||||||||||
| ARG DISTRO | ||||||||||||
| ARG DISTRO_VERSION | ||||||||||||
| ARG MPI | ||||||||||||
|
|
||||||||||||
| # add Catalyst | ||||||||||||
| COPY --from=builder_catalyst /opt/catalyst /opt/catalyst | ||||||||||||
| #ENV catalyst_DIR=/opt/catalyst/lib/cmake/catalyst-${CATALYST_VERSION} | ||||||||||||
| ENV catalyst_ROOT=/opt/catalyst/ | ||||||||||||
| RUN echo "/opt/catalyst/lib" > /etc/ld.so.conf.d/image_catalyst.conf \ | ||||||||||||
| && ldconfig | ||||||||||||
|
|
||||||||||||
| COPY --from=velocdl /opt/veloc /opt/veloc | ||||||||||||
|
|
||||||||||||
| ENV veloc_ROOT=/opt/veloc | ||||||||||||
|
|
@@ -127,7 +197,8 @@ WORKDIR ${HOME} | |||||||||||
| # stage : PDI download for tests | ||||||||||||
| FROM alpine/git AS pdidl | ||||||||||||
|
|
||||||||||||
| RUN git -C /root clone --recurse-submodules https://github.com/pdidev/pdi.git /root/pdi | ||||||||||||
| #RUN git -C /root clone --recurse-submodules https://github.com/pdidev/pdi.git /root/pdi | ||||||||||||
| RUN git -C /root clone -b catalyst-plugin --recurse-submodules https://github.com/francois-kitware/pdi /root/pdi | ||||||||||||
|
Comment on lines
+200
to
+201
Contributor
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. this will have to be reverted before integration |
||||||||||||
|
|
||||||||||||
|
|
||||||||||||
| # stage : test | ||||||||||||
|
|
||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,7 +3,9 @@ BASE_BUILDDEPS="cmake doxygen pkgconf py-setuptools" | |||||||
| # libraries that are required in all cases | ||||||||
| BASE_LIBS="py-numpy py-pyyaml python" | ||||||||
| # libraries that depend on MPI & are required in all cases | ||||||||
| BASE_MPILIBS="py-mpi4py veloc" | ||||||||
| BASE_MPILIBS="py-mpi4py veloc libcatalyst+mpi+python" | ||||||||
| #TODO: libcatalyst+python was introduced in spack 0.22, switch back to a single list when our minimum requirement goes at or above that | ||||||||
| BASE_MPILIBS_OLDSPACK="py-mpi4py veloc libcatalyst+mpi" | ||||||||
|
Member
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.
Suggested change
|
||||||||
| # libraries that are optional because embedded in PDI | ||||||||
| OPT_LIBS="paraconf py-pybind11 spdlog" | ||||||||
| # libraries that depend on MPI & are optional because embedded in PDI | ||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,6 +13,16 @@ ARG SPACK_INSTALL_ARGS="--show-log-on-error --fail-fast" | |||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| # Add our MPI of choice and base MPI-dependant libs to the environment and install it | ||||||||||||||||||||||||||||||||||||
| RUN spack -e pdienv add -l mpi "${MPI}" | ||||||||||||||||||||||||||||||||||||
| RUN . deps.sh && spack -e pdienv add -l mpilibs ${BASE_MPILIBS} | ||||||||||||||||||||||||||||||||||||
| RUN <<EORUN | ||||||||||||||||||||||||||||||||||||
|
Member
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.
Suggested change
|
||||||||||||||||||||||||||||||||||||
| #TODO: introduced to handle a missing variant in spack<0.22, remove when our minimum requirement goes at or above that | ||||||||||||||||||||||||||||||||||||
| set -e | ||||||||||||||||||||||||||||||||||||
| . deps.sh | ||||||||||||||||||||||||||||||||||||
| if ( spack --version | grep -qs '^1\.' ) | ||||||||||||||||||||||||||||||||||||
| then | ||||||||||||||||||||||||||||||||||||
| spack -e pdienv add -l mpilibs ${BASE_MPILIBS} | ||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||
| spack -e pdienv add -l mpilibs ${BASE_MPILIBS_OLDSPACK} | ||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||
| EORUN | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+20
to
+26
Member
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.
Suggested change
|
||||||||||||||||||||||||||||||||||||
| RUN spack -e pdienv concretize -f --reuse | ||||||||||||||||||||||||||||||||||||
| RUN spack -e pdienv install ${SPACK_INSTALL_ARGS} | ||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.