From 18945338bf3cf3e0e3e70744fe7fb04071c93a8f Mon Sep 17 00:00:00 2001 From: Frederick Roy Date: Mon, 13 Sep 2021 13:42:07 +0200 Subject: [PATCH 1/8] fix with linearalgebra lib --- src/SofaCaribou/Algebra/BaseVectorOperations.h | 12 ++++++++++-- src/SofaCaribou/Solver/LinearSolver.h | 15 +++++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/SofaCaribou/Algebra/BaseVectorOperations.h b/src/SofaCaribou/Algebra/BaseVectorOperations.h index 020abe4e..acee695b 100644 --- a/src/SofaCaribou/Algebra/BaseVectorOperations.h +++ b/src/SofaCaribou/Algebra/BaseVectorOperations.h @@ -5,10 +5,18 @@ // Various utilities to perform numerical operations on SOFA's BaseVector. // These utilities are responsible to automatically find the type of vector // and perform the optimal operations on them. - +#if (defined(SOFA_VERSION) && SOFA_VERSION < 211299) +namespace sofa::defaulttype { + class BaseVector; +} +#else +namespace sofa::linearalgebra { + class BaseVector; +} namespace sofa::defaulttype { -class BaseVector; + using BaseVector = sofa::linearalgebra::BaseVector; } +#endif // (defined(SOFA_VERSION) && SOFA_VERSION < 211299) namespace SofaCaribou::Algebra { diff --git a/src/SofaCaribou/Solver/LinearSolver.h b/src/SofaCaribou/Solver/LinearSolver.h index 29f6838f..a3ea1900 100644 --- a/src/SofaCaribou/Solver/LinearSolver.h +++ b/src/SofaCaribou/Solver/LinearSolver.h @@ -2,10 +2,21 @@ #include +#if (defined(SOFA_VERSION) && SOFA_VERSION < 211299) namespace sofa::defaulttype { -class BaseMatrix; -class BaseVector; + class BaseMatrix; + class BaseVector; } +#else +namespace sofa::linearalgebra { + class BaseVector; + class BaseMatrix; +} +namespace sofa::defaulttype { + using BaseVector = sofa::linearalgebra::BaseVector; + using BaseMatrix = sofa::linearalgebra::BaseMatrix; +} +#endif // (defined(SOFA_VERSION) && SOFA_VERSION < 211299) namespace SofaCaribou::solver { From b02192874c6059904df8be45d25f3cc137f3aa3f Mon Sep 17 00:00:00 2001 From: Frederick Roy Date: Tue, 14 Sep 2021 13:14:54 +0200 Subject: [PATCH 2/8] add sofa.h to get SOFA_VERSION --- src/SofaCaribou/Algebra/BaseVectorOperations.cpp | 4 ++++ src/SofaCaribou/Algebra/BaseVectorOperations.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/SofaCaribou/Algebra/BaseVectorOperations.cpp b/src/SofaCaribou/Algebra/BaseVectorOperations.cpp index 7a0bee56..438776a1 100644 --- a/src/SofaCaribou/Algebra/BaseVectorOperations.cpp +++ b/src/SofaCaribou/Algebra/BaseVectorOperations.cpp @@ -3,7 +3,11 @@ DISABLE_ALL_WARNINGS_BEGIN #include +#if (defined(SOFA_VERSION) && SOFA_VERSION < 211299) #include +#else +#include +#endif // #if (defined(SOFA_VERSION) && SOFA_VERSION < 211299) #include DISABLE_ALL_WARNINGS_END diff --git a/src/SofaCaribou/Algebra/BaseVectorOperations.h b/src/SofaCaribou/Algebra/BaseVectorOperations.h index acee695b..ea17497b 100644 --- a/src/SofaCaribou/Algebra/BaseVectorOperations.h +++ b/src/SofaCaribou/Algebra/BaseVectorOperations.h @@ -5,6 +5,10 @@ // Various utilities to perform numerical operations on SOFA's BaseVector. // These utilities are responsible to automatically find the type of vector // and perform the optimal operations on them. +DISABLE_ALL_WARNINGS_BEGIN +#include // for SOFA_VERSION +DISABLE_ALL_WARNINGS_END + #if (defined(SOFA_VERSION) && SOFA_VERSION < 211299) namespace sofa::defaulttype { class BaseVector; From 711e4f4085a30e9007ec0e8d3ed93c874f7cfa3c Mon Sep 17 00:00:00 2001 From: Jean-Nicolas Brunet Date: Thu, 30 Sep 2021 21:48:08 -0400 Subject: [PATCH 3/8] [CI] Artifacts are now deployed only on schedule events --- .github/workflows/ubuntu.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 52a0f45a..84d34e75 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -193,10 +193,12 @@ jobs: python3 $CARIBOU_ROOT/bin/pytest/SofaCaribou_Forcefield_HyperelasticForcefield.py + deploy: name: Deploy ${{ matrix.sofa_version }} needs: [test] runs-on: ubuntu-20.04 + if: github.event_name == 'schedule' strategy: matrix: sofa_version: [ v20.06.01, v20.12.03, v21.06.00, master ] @@ -261,4 +263,4 @@ jobs: mv $ARTIFACT_TARGET/SofaCaribou.tar.gz $ARTIFACT_TARGET.tar.gz rm -rf $ARTIFACT_TARGET rm -f $ARTIFACT_LATEST - ln -s $ARTIFACT_TARGET.tar.gz $ARTIFACT_LATEST \ No newline at end of file + ln -s $ARTIFACT_TARGET.tar.gz $ARTIFACT_LATEST From 5fc313ba6fa574b6f47cfd5d17a9b39912711be9 Mon Sep 17 00:00:00 2001 From: Frederick Roy Date: Fri, 1 Oct 2021 04:38:37 +0200 Subject: [PATCH 4/8] Fix for ScopedAdvancedTimer (#68) * fix include for scopedtimer * fix compilation * compile with older releases Co-authored-by: Jean-Nicolas Brunet --- src/SofaCaribou/Forcefield/TractionForcefield.inl | 5 ++++- src/SofaCaribou/Mass/CaribouMass.inl | 3 +++ src/SofaCaribou/Ode/NewtonRaphsonSolver.cpp | 3 +++ src/SofaCaribou/Solver/ConjugateGradientSolver.inl | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/SofaCaribou/Forcefield/TractionForcefield.inl b/src/SofaCaribou/Forcefield/TractionForcefield.inl index cdb28458..235f2243 100644 --- a/src/SofaCaribou/Forcefield/TractionForcefield.inl +++ b/src/SofaCaribou/Forcefield/TractionForcefield.inl @@ -7,6 +7,9 @@ DISABLE_ALL_WARNINGS_BEGIN #include #include #include +#if (defined(SOFA_VERSION) && SOFA_VERSION >= 210600) +#include +#endif DISABLE_ALL_WARNINGS_END #if (defined(SOFA_VERSION) && SOFA_VERSION <= 201299) @@ -275,4 +278,4 @@ TractionForcefield::get_gauss_nodes(const size_t & /*element_id*/, cons return gauss_nodes; } -} // namespace SofaCaribou::forcefield \ No newline at end of file +} // namespace SofaCaribou::forcefield diff --git a/src/SofaCaribou/Mass/CaribouMass.inl b/src/SofaCaribou/Mass/CaribouMass.inl index 8893a1e4..6833a4d2 100644 --- a/src/SofaCaribou/Mass/CaribouMass.inl +++ b/src/SofaCaribou/Mass/CaribouMass.inl @@ -6,6 +6,9 @@ DISABLE_ALL_WARNINGS_BEGIN #include +#if (defined(SOFA_VERSION) && SOFA_VERSION >= 210600) +#include +#endif #include #include DISABLE_ALL_WARNINGS_END diff --git a/src/SofaCaribou/Ode/NewtonRaphsonSolver.cpp b/src/SofaCaribou/Ode/NewtonRaphsonSolver.cpp index d8b12e0c..34b52f1b 100644 --- a/src/SofaCaribou/Ode/NewtonRaphsonSolver.cpp +++ b/src/SofaCaribou/Ode/NewtonRaphsonSolver.cpp @@ -6,6 +6,9 @@ DISABLE_ALL_WARNINGS_BEGIN #include #include +#if (defined(SOFA_VERSION) && SOFA_VERSION >= 210600) +#include +#endif #include #include #include diff --git a/src/SofaCaribou/Solver/ConjugateGradientSolver.inl b/src/SofaCaribou/Solver/ConjugateGradientSolver.inl index fe606d5c..f8ca4214 100644 --- a/src/SofaCaribou/Solver/ConjugateGradientSolver.inl +++ b/src/SofaCaribou/Solver/ConjugateGradientSolver.inl @@ -7,6 +7,9 @@ DISABLE_ALL_WARNINGS_BEGIN #include +#if (defined(SOFA_VERSION) && SOFA_VERSION >= 210600) +#include +#endif #include #include DISABLE_ALL_WARNINGS_END From 9b2308661ca951c8aa3ffdfc78a006da26a3bccc Mon Sep 17 00:00:00 2001 From: Frederick Roy Date: Fri, 1 Oct 2021 05:01:47 +0200 Subject: [PATCH 5/8] fix dll ex/import (#70) Co-authored-by: Jean-Nicolas Brunet --- .../HyperelasticForcefieldRecomputeF.h | 18 +++++++++--------- .../HyperelasticForcefieldStoreF.h | 18 +++++++++--------- .../HyperelasticForcefieldStoreFAndS.h | 18 +++++++++--------- Benchmark/SofaCaribou/init.cpp | 12 ++++++------ 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Benchmark/SofaCaribou/Forcefield/RecomputeOrStore/HyperelasticForcefieldRecomputeF.h b/Benchmark/SofaCaribou/Forcefield/RecomputeOrStore/HyperelasticForcefieldRecomputeF.h index 05f43f9b..09ccfd98 100644 --- a/Benchmark/SofaCaribou/Forcefield/RecomputeOrStore/HyperelasticForcefieldRecomputeF.h +++ b/Benchmark/SofaCaribou/Forcefield/RecomputeOrStore/HyperelasticForcefieldRecomputeF.h @@ -69,34 +69,34 @@ class HyperelasticForcefieldRecomputeF : public ::SofaCaribou::forcefield::Carib // Public methods - CARIBOU_API + HyperelasticForcefieldRecomputeF(); - CARIBOU_API + void init() override; - CARIBOU_API + void addForce(const sofa::core::MechanicalParams* mparams, sofa::core::MultiVecDerivId fId ) override; - CARIBOU_API + void addForce( const sofa::core::MechanicalParams* mparams, sofa::core::objectmodel::Data& d_f, const sofa::core::objectmodel::Data& d_x, const sofa::core::objectmodel::Data& d_v) override; - CARIBOU_API + void addDForce( const sofa::core::MechanicalParams* /*mparams*/, sofa::core::objectmodel::Data& /*d_df*/, const sofa::core::objectmodel::Data& /*d_dx*/) override; - CARIBOU_API + SReal getPotentialEnergy( const sofa::core::MechanicalParams* /* mparams */, const sofa::core::objectmodel::Data& /* d_x */) const override; - CARIBOU_API + void addKToMatrix(sofa::defaulttype::BaseMatrix * /*matrix*/, SReal /*kFact*/, unsigned int & /*offset*/) override; /** Get the set of Gauss integration nodes of an element */ @@ -148,11 +148,11 @@ class HyperelasticForcefieldRecomputeF : public ::SofaCaribou::forcefield::Carib } /** Get the eigen values of the tangent stiffness matrix */ - CARIBOU_API + auto eigenvalues() -> const Vector &; /** Get the condition number of the tangent stiffness matrix */ - CARIBOU_API + auto cond() -> Real; /** diff --git a/Benchmark/SofaCaribou/Forcefield/RecomputeOrStore/HyperelasticForcefieldStoreF.h b/Benchmark/SofaCaribou/Forcefield/RecomputeOrStore/HyperelasticForcefieldStoreF.h index 340041be..d8b4b21e 100644 --- a/Benchmark/SofaCaribou/Forcefield/RecomputeOrStore/HyperelasticForcefieldStoreF.h +++ b/Benchmark/SofaCaribou/Forcefield/RecomputeOrStore/HyperelasticForcefieldStoreF.h @@ -70,34 +70,34 @@ class HyperelasticForcefieldStoreF : public ::SofaCaribou::forcefield::CaribouFo // Public methods - CARIBOU_API + HyperelasticForcefieldStoreF(); - CARIBOU_API + void init() override; - CARIBOU_API + void addForce(const sofa::core::MechanicalParams* mparams, sofa::core::MultiVecDerivId fId ) override; - CARIBOU_API + void addForce( const sofa::core::MechanicalParams* mparams, sofa::core::objectmodel::Data& d_f, const sofa::core::objectmodel::Data& d_x, const sofa::core::objectmodel::Data& d_v) override; - CARIBOU_API + void addDForce( const sofa::core::MechanicalParams* /*mparams*/, sofa::core::objectmodel::Data& /*d_df*/, const sofa::core::objectmodel::Data& /*d_dx*/) override; - CARIBOU_API + SReal getPotentialEnergy( const sofa::core::MechanicalParams* /* mparams */, const sofa::core::objectmodel::Data& /* d_x */) const override; - CARIBOU_API + void addKToMatrix(sofa::defaulttype::BaseMatrix * /*matrix*/, SReal /*kFact*/, unsigned int & /*offset*/) override; /** Get the set of Gauss integration nodes of an element */ @@ -149,11 +149,11 @@ class HyperelasticForcefieldStoreF : public ::SofaCaribou::forcefield::CaribouFo } /** Get the eigen values of the tangent stiffness matrix */ - CARIBOU_API + auto eigenvalues() -> const Vector &; /** Get the condition number of the tangent stiffness matrix */ - CARIBOU_API + auto cond() -> Real; /** diff --git a/Benchmark/SofaCaribou/Forcefield/RecomputeOrStore/HyperelasticForcefieldStoreFAndS.h b/Benchmark/SofaCaribou/Forcefield/RecomputeOrStore/HyperelasticForcefieldStoreFAndS.h index e80057c3..f206be4f 100644 --- a/Benchmark/SofaCaribou/Forcefield/RecomputeOrStore/HyperelasticForcefieldStoreFAndS.h +++ b/Benchmark/SofaCaribou/Forcefield/RecomputeOrStore/HyperelasticForcefieldStoreFAndS.h @@ -73,34 +73,34 @@ class HyperelasticForcefieldStoreFAndS : public ::SofaCaribou::forcefield::Carib // Public methods - CARIBOU_API + HyperelasticForcefieldStoreFAndS(); - CARIBOU_API + void init() override; - CARIBOU_API + void addForce(const sofa::core::MechanicalParams* mparams, sofa::core::MultiVecDerivId fId ) override; - CARIBOU_API + void addForce( const sofa::core::MechanicalParams* mparams, sofa::core::objectmodel::Data& d_f, const sofa::core::objectmodel::Data& d_x, const sofa::core::objectmodel::Data& d_v) override; - CARIBOU_API + void addDForce( const sofa::core::MechanicalParams* /*mparams*/, sofa::core::objectmodel::Data& /*d_df*/, const sofa::core::objectmodel::Data& /*d_dx*/) override; - CARIBOU_API + SReal getPotentialEnergy( const sofa::core::MechanicalParams* /* mparams */, const sofa::core::objectmodel::Data& /* d_x */) const override; - CARIBOU_API + void addKToMatrix(sofa::defaulttype::BaseMatrix * /*matrix*/, SReal /*kFact*/, unsigned int & /*offset*/) override; /** Get the set of Gauss integration nodes of an element */ @@ -152,11 +152,11 @@ class HyperelasticForcefieldStoreFAndS : public ::SofaCaribou::forcefield::Carib } /** Get the eigen values of the tangent stiffness matrix */ - CARIBOU_API + auto eigenvalues() -> const Vector &; /** Get the condition number of the tangent stiffness matrix */ - CARIBOU_API + auto cond() -> Real; /** diff --git a/Benchmark/SofaCaribou/init.cpp b/Benchmark/SofaCaribou/init.cpp index 287cca52..9c7016c6 100644 --- a/Benchmark/SofaCaribou/init.cpp +++ b/Benchmark/SofaCaribou/init.cpp @@ -2,12 +2,12 @@ #include extern "C" { -CARIBOU_API void initExternalModule(); -CARIBOU_API const char* getModuleName(); -CARIBOU_API const char* getModuleVersion(); -CARIBOU_API const char* getModuleLicense(); -CARIBOU_API const char* getModuleDescription(); -CARIBOU_API const char* getModuleComponentList(); + void initExternalModule(); + const char* getModuleName(); + const char* getModuleVersion(); + const char* getModuleLicense(); + const char* getModuleDescription(); + const char* getModuleComponentList(); } void initExternalModule() From 29671e74c6de4c155d9289be503f9f76b84a0a85 Mon Sep 17 00:00:00 2001 From: Jean-Nicolas Brunet Date: Fri, 1 Oct 2021 15:20:26 -0400 Subject: [PATCH 6/8] [CI] Update the SOFA master binaries link --- .github/workflows/macos.yml | 2 +- .github/workflows/ubuntu.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index f477f25e..d71cb486 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -107,7 +107,7 @@ jobs: - name: Download SOFA Release run: | if [ "$SOFA_VERSION" = "master" ]; then - curl --output sofa.zip -L "https://ci.inria.fr/sofa-ci-dev/job/nightly-generate-binaries/lastStableBuild/CI_BRANCH=master,CI_SCOPE=standard/artifact/MacOS/*zip*/MacOS.zip" + curl --output sofa.zip -L "https://ci.inria.fr/sofa-ci-dev/job/nightly-generate-binaries/CI_BRANCH=master,CI_SCOPE=standard/lastSuccessfulBuild/artifact/MacOS/*zip*/MacOS.zip" else curl --output sofa.zip -L "https://github.com/sofa-framework/sofa/releases/download/$SOFA_VERSION/SOFA_"$SOFA_VERSION"_MacOS.zip" fi diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 84d34e75..5d05d2e4 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -35,7 +35,7 @@ jobs: - name: Download SOFA Release run: | if [ "$SOFA_VERSION" = "master" ]; then - curl --output sofa.zip -L "https://ci.inria.fr/sofa-ci-dev/job/nightly-generate-binaries/lastStableBuild/CI_BRANCH=master,CI_SCOPE=standard/artifact/Linux/*zip*/Linux.zip" + curl --output sofa.zip -L "https://ci.inria.fr/sofa-ci-dev/job/nightly-generate-binaries/CI_BRANCH=master,CI_SCOPE=standard/lastSuccessfulBuild/artifact/Linux/*zip*/Linux.zip" unzip sofa.zip -d temp mv temp/Linux/`ls temp/Linux` sofa.zip rm -rf temp @@ -128,7 +128,7 @@ jobs: - name: Install SOFA run: | if [ "$SOFA_VERSION" = "master" ]; then - curl --output sofa.zip -L "https://ci.inria.fr/sofa-ci-dev/job/nightly-generate-binaries/lastStableBuild/CI_BRANCH=master,CI_SCOPE=standard/artifact/Linux/*zip*/Linux.zip" + curl --output sofa.zip -L "https://ci.inria.fr/sofa-ci-dev/job/nightly-generate-binaries/CI_BRANCH=master,CI_SCOPE=standard/lastSuccessfulBuild/artifact/Linux/*zip*/Linux.zip" unzip sofa.zip -d temp mv temp/Linux/`ls temp/Linux` sofa.zip rm -rf temp From 3877322b4bc837df4918545c36811d03c6ddee16 Mon Sep 17 00:00:00 2001 From: Jean-Nicolas Brunet Date: Fri, 1 Oct 2021 18:21:45 -0400 Subject: [PATCH 7/8] [CI] Update the linux builder container to 20.04 for SOFA master --- .github/workflows/ubuntu.yml | 35 ++++++++++++++++--- ubuntu_builder_18.04.dockerfile | 4 +++ ubuntu_builder_20.04.dockerfile | 27 +++++++++----- .../test_hyperelasticforcefield.cpp | 2 ++ .../Forcefield/test_tractionforce.cpp | 4 +++ unittest/SofaCaribou/ODE/test_static.cpp | 10 ++++++ .../Topology/test_cariboutopology.cpp | 8 +++++ .../Topology/test_fictitiousgrid.cpp | 2 ++ 8 files changed, 78 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 5d05d2e4..6b5dd06f 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -12,14 +12,28 @@ jobs: build: name: Building with ${{ matrix.sofa_version }} runs-on: ubuntu-20.04 - container: jnbrunet/caribou-ubuntu-1804-builder:latest + container: ${{ matrix.CONTAINER }} strategy: fail-fast: false matrix: sofa_version: [ v20.06.01, v20.12.03, v21.06.00, master ] + include: + - sofa_version: master + CONTAINER: jnbrunet/caribou-ubuntu-2004-builder:latest + PYTHON_VERSION: 3.8 + - sofa_version: v21.06.00 + CONTAINER: jnbrunet/caribou-ubuntu-1804-builder:latest + PYTHON_VERSION: 3.7 + - sofa_version: v20.12.03 + CONTAINER: jnbrunet/caribou-ubuntu-1804-builder:latest + PYTHON_VERSION: 3.7 + - sofa_version: v20.06.01 + CONTAINER: jnbrunet/caribou-ubuntu-1804-builder:latest + PYTHON_VERSION: 3.7 env: SOFA_VERSION: ${{ matrix.sofa_version }} SOFA_ROOT: /opt/sofa + PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }} steps: - uses: actions/checkout@v2 @@ -75,19 +89,21 @@ jobs: CCACHE_COMPRESS: true CCACHE_COMPRESSLEVEL: 6 CCACHE_MAXSIZE: "500M" + PYTHONEXE: ${{ format('/usr/bin/python{0}', matrix.PYTHON_VERSION) }} run: export CCACHE_BASEDIR=$GITHUB_WORKSPACE && export CCACHE_DIR=$GITHUB_WORKSPACE/.ccache && ccache -z && cmake - -DPYTHON_EXECUTABLE=/usr/bin/python3.7 + -GNinja + -DPYTHON_EXECUTABLE=$PYTHONEXE -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCARIBOU_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=SofaCaribou . - && make && make install + && cmake --build . && cmake --install . && tar czvf SofaCaribou.tar.gz SofaCaribou && echo ${CCACHE_BASEDIR} && ccache -s @@ -107,16 +123,25 @@ jobs: fail-fast: false matrix: sofa_version: [ v20.06.01, v20.12.03, v21.06.00, master ] + include: + - sofa_version: master + PYTHON_VERSION: 3.8 + - sofa_version: v21.06.00 + PYTHON_VERSION: 3.7 + - sofa_version: v20.12.03 + PYTHON_VERSION: 3.7 + - sofa_version: v20.06.01 + PYTHON_VERSION: 3.7 env: SOFA_VERSION: ${{ matrix.sofa_version }} SOFA_ROOT: /opt/sofa CARIBOU_ROOT: /opt/sofa/plugins/SofaCaribou steps: - - name: Set up Python 3.7 + - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.7' + python-version: ${{ matrix.PYTHON_VERSION }} - name: Install dependencies run: | diff --git a/ubuntu_builder_18.04.dockerfile b/ubuntu_builder_18.04.dockerfile index 6a4b068d..9a1e6fde 100644 --- a/ubuntu_builder_18.04.dockerfile +++ b/ubuntu_builder_18.04.dockerfile @@ -22,6 +22,10 @@ RUN chmod a+x /tmp/cmake-3.20.1-linux-x86_64.sh \ && /tmp/cmake-3.20.1-linux-x86_64.sh --skip-license --prefix=/usr/local \ && rm /tmp/cmake-3.20.1-linux-x86_64.sh +# Install Ninja 1.10 +ADD https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip /tmp +RUN unzip /tmp/ninja-linux.zip -d /usr/bin + # Install pybind11 RUN git clone --depth 1 -b v2.4 https://github.com/pybind/pybind11.git /tmp/pybind11 \ && cmake -S/tmp/pybind11 -B/tmp/pybind11/build -DPYBIND11_TEST=OFF -DCMAKE_BUILD_TYPE=Release \ diff --git a/ubuntu_builder_20.04.dockerfile b/ubuntu_builder_20.04.dockerfile index 7a9bad4e..3913713b 100644 --- a/ubuntu_builder_20.04.dockerfile +++ b/ubuntu_builder_20.04.dockerfile @@ -2,20 +2,29 @@ FROM ubuntu:20.04 ENV DEBIAN_FRONTEND noninteractive SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN apt-get -qq update \ -&& apt-get -qq --no-install-recommends install software-properties-common \ -&& add-apt-repository -y ppa:deadsnakes \ -&& add-apt-repository -y ppa:mhier/libboost-latest \ -&& apt-get -qq update +RUN apt-get -qq update && apt-get -qq upgrade -RUN apt-get -qq --no-install-recommends install libpython3.7 python3.7 python3-pip libpython3.7-dev pybind11-dev \ +RUN apt-get -qq --no-install-recommends install libpython3.8 python3.8 python3-pip libpython3.8-dev \ && apt-get -qq --no-install-recommends install qtbase5-dev libqt5charts5-dev libqt5opengl5-dev qtwebengine5-dev libopengl0 libeigen3-dev libglew-dev zlib1g-dev \ -&& apt-get -qq --no-install-recommends install libboost1.67-dev libboost-system1.67-dev libboost-filesystem1.67-dev libboost-program-options1.67-dev libboost-thread1.67-dev \ +&& apt-get -qq --no-install-recommends install libboost1.71-dev libboost-system1.71-dev libboost-filesystem1.71-dev libboost-program-options1.71-dev libboost-thread1.71-dev \ && apt-get -qq --no-install-recommends install libmkl-dev libmkl-interface-dev libmkl-threading-dev libmkl-computational-dev \ -&& apt-get -qq --no-install-recommends install g++ cmake ccache ninja-build curl unzip git \ -&& python3.7 -m pip install numpy \ +&& apt-get -qq --no-install-recommends install g++ ccache ninja-build curl unzip git \ +&& python3.8 -m pip install numpy \ && apt-get clean +# Install CMake +ADD https://github.com/Kitware/CMake/releases/download/v3.20.1/cmake-3.20.1-linux-x86_64.sh /tmp +RUN chmod a+x /tmp/cmake-3.20.1-linux-x86_64.sh \ +&& /tmp/cmake-3.20.1-linux-x86_64.sh --skip-license --prefix=/usr/local \ +&& rm /tmp/cmake-3.20.1-linux-x86_64.sh + +# Install pybind11 +RUN git clone --depth 1 -b v2.4 https://github.com/pybind/pybind11.git /tmp/pybind11 \ +&& cmake -GNinja -S/tmp/pybind11 -B/tmp/pybind11/build -DPYBIND11_TEST=OFF -DCMAKE_BUILD_TYPE=Release \ +&& cmake --install /tmp/pybind11/build \ +&& rm -rf /tmp/pybind11 + +# Install VTK RUN git clone --depth 1 --branch v9.0.1 https://gitlab.kitware.com/vtk/vtk.git /tmp/vtk \ && cd /tmp/vtk \ && git submodule update --init \ diff --git a/unittest/SofaCaribou/Forcefield/test_hyperelasticforcefield.cpp b/unittest/SofaCaribou/Forcefield/test_hyperelasticforcefield.cpp index 668217bd..5ce6cec7 100644 --- a/unittest/SofaCaribou/Forcefield/test_hyperelasticforcefield.cpp +++ b/unittest/SofaCaribou/Forcefield/test_hyperelasticforcefield.cpp @@ -27,6 +27,8 @@ TEST(HyperelasticForcefield, Hexahedron_from_SOFA) { setSimulation(new sofa::simulation::graph::DAGSimulation()); auto root = getSimulation()->createNewNode("root"); + createObject(root, "DefaultAnimationLoop"); + createObject(root, "DefaultVisualManagerLoop"); #if (defined(SOFA_VERSION) && SOFA_VERSION >= 201200) createObject(root, "RequiredPlugin", {{"pluginName", "SofaBoundaryCondition SofaEngine"}}); #else diff --git a/unittest/SofaCaribou/Forcefield/test_tractionforce.cpp b/unittest/SofaCaribou/Forcefield/test_tractionforce.cpp index 3895c92b..2d9156d3 100644 --- a/unittest/SofaCaribou/Forcefield/test_tractionforce.cpp +++ b/unittest/SofaCaribou/Forcefield/test_tractionforce.cpp @@ -32,6 +32,8 @@ class TractionForcefield : public sofa::helper::testing::BaseTest { TEST_F(TractionForcefield, Triangle) { EXPECT_MSG_NOEMIT(Error, Warning) ; + createObject(root, "DefaultAnimationLoop"); + createObject(root, "DefaultVisualManagerLoop"); createObject(root, "MechanicalObject", {{"position", "-1 0 1 1 0 1 -1 0 -1 1 0 -1 0 0 1 0 0 -1 -1 0 0 1 0 0 0 0 0"}}); createObject(root, "TriangleSetTopologyContainer", {{"triangles", "7 5 8 8 2 6 4 6 0 1 8 4 7 3 5 8 5 2 4 8 6 1 7 8"}}); auto traction = dynamic_cast> *>( @@ -50,6 +52,8 @@ TEST_F(TractionForcefield, Triangle) { TEST_F(TractionForcefield, Quad) { EXPECT_MSG_NOEMIT(Error, Warning) ; + createObject(root, "DefaultAnimationLoop"); + createObject(root, "DefaultVisualManagerLoop"); createObject(root, "MechanicalObject", {{"position", "-1 0 1 1 0 1 -1 0 -1 1 0 -1 0 0 1 0 0 -1 -1 0 0 1 0 0 0 0 0"}}); createObject(root, "QuadSetTopologyContainer", {{"quads", "8 7 3 5 6 8 5 2 0 4 8 6 4 1 7 8"}}); auto traction = createObject(root, "TractionForcefield", {{"traction", "0 5 0"}, {"slope", std::to_string(1/5.)}}); diff --git a/unittest/SofaCaribou/ODE/test_static.cpp b/unittest/SofaCaribou/ODE/test_static.cpp index 2b85f9e7..3a26b31d 100644 --- a/unittest/SofaCaribou/ODE/test_static.cpp +++ b/unittest/SofaCaribou/ODE/test_static.cpp @@ -27,6 +27,8 @@ TEST(StaticODESolver, InitWithoutSolver) { setSimulation(new sofa::simulation::graph::DAGSimulation()); auto root = getSimulation()->createNewNode("root"); + createObject(root, "DefaultAnimationLoop"); + createObject(root, "DefaultVisualManagerLoop"); createObject(root, "StaticODESolver", {{"printLog", "true"}}); getSimulation()->init(root.get()); getSimulation()->unload(root); @@ -39,6 +41,8 @@ TEST(StaticODESolver, InitSofaSolver) { setSimulation(new sofa::simulation::graph::DAGSimulation()); auto root = getSimulation()->createNewNode("root"); + createObject(root, "DefaultAnimationLoop"); + createObject(root, "DefaultVisualManagerLoop"); createObject(root, "StaticODESolver", {{"printLog", "true"}}); createObject(root, "CGLinearSolver"); createObject(root, "CGLinearSolver"); @@ -54,6 +58,8 @@ TEST(StaticODESolver, InitCaribouSolver) { setSimulation(new sofa::simulation::graph::DAGSimulation()); auto root = getSimulation()->createNewNode("root"); + createObject(root, "DefaultAnimationLoop"); + createObject(root, "DefaultVisualManagerLoop"); createObject(root, "StaticODESolver", {{"printLog", "true"}}); createObject(root, "CGLinearSolver"); createObject(root, "LDLTSolver"); @@ -69,6 +75,8 @@ TEST(StaticODESolver, InitMultipleCaribouSolver) { setSimulation(new sofa::simulation::graph::DAGSimulation()); auto root = getSimulation()->createNewNode("root"); + createObject(root, "DefaultAnimationLoop"); + createObject(root, "DefaultVisualManagerLoop"); createObject(root, "StaticODESolver", {{"printLog", "true"}}); createObject(root, "LDLTSolver", {{"name", "first_solver"}}); createObject(root, "LDLTSolver", {{"name", "second_solver"}}); @@ -83,6 +91,8 @@ TEST(StaticODESolver, Beam) { setSimulation(new sofa::simulation::graph::DAGSimulation()); auto root = getSimulation()->createNewNode("root"); + createObject(root, "DefaultAnimationLoop"); + createObject(root, "DefaultVisualManagerLoop"); #if (defined(SOFA_VERSION) && SOFA_VERSION >= 201200) createObject(root, "RequiredPlugin", {{"pluginName", "SofaBoundaryCondition SofaEngine"}}); #else diff --git a/unittest/SofaCaribou/Topology/test_cariboutopology.cpp b/unittest/SofaCaribou/Topology/test_cariboutopology.cpp index d477abbb..f124d86a 100644 --- a/unittest/SofaCaribou/Topology/test_cariboutopology.cpp +++ b/unittest/SofaCaribou/Topology/test_cariboutopology.cpp @@ -1331,6 +1331,8 @@ TEST(CaribouTopology, HexahedronLinearAttachDomain) { setSimulation(new sofa::simulation::graph::DAGSimulation()); auto root = getSimulation()->createNewNode("root"); + createObject(root, "DefaultAnimationLoop"); + createObject(root, "DefaultVisualManagerLoop"); // Add the CaribouTopology component auto topo = dynamic_cast> *> ( @@ -1382,6 +1384,8 @@ TEST(CaribouTopology, HexahedronLinearFromIndices) { setSimulation(new sofa::simulation::graph::DAGSimulation()); auto root = getSimulation()->createNewNode("root"); + createObject(root, "DefaultAnimationLoop"); + createObject(root, "DefaultVisualManagerLoop"); // Add a mechanical object required for the creation of an internal mesh auto mo = dynamic_cast *>( @@ -1460,6 +1464,8 @@ TEST(CaribouTopology, HexahedronQuadraticAttachDomain) { setSimulation(new sofa::simulation::graph::DAGSimulation()); auto root = getSimulation()->createNewNode("root"); + createObject(root, "DefaultAnimationLoop"); + createObject(root, "DefaultVisualManagerLoop"); // Add the CaribouTopology component auto topo = dynamic_cast> *> ( @@ -1511,6 +1517,8 @@ TEST(CaribouTopology, HexahedronQuadraticFromIndices) { setSimulation(new sofa::simulation::graph::DAGSimulation()); auto root = getSimulation()->createNewNode("root"); + createObject(root, "DefaultAnimationLoop"); + createObject(root, "DefaultVisualManagerLoop"); // Add a mechanical object required for the creation of an internal mesh auto mo = dynamic_cast *>( diff --git a/unittest/SofaCaribou/Topology/test_fictitiousgrid.cpp b/unittest/SofaCaribou/Topology/test_fictitiousgrid.cpp index 6c859645..1c32639a 100644 --- a/unittest/SofaCaribou/Topology/test_fictitiousgrid.cpp +++ b/unittest/SofaCaribou/Topology/test_fictitiousgrid.cpp @@ -22,6 +22,8 @@ class FictitiousGrid : public sofa::helper::testing::BaseTest { #if (defined(SOFA_VERSION) && SOFA_VERSION >= 201200) createObject(root, "RequiredPlugin", {{"pluginName", "SofaGeneralLoader"}}); #endif + createObject(root, "DefaultAnimationLoop"); + createObject(root, "DefaultVisualManagerLoop"); } void TearDown() override { root.reset(); From 2b00ae6716b076fcdabdbb745e519f9bf9a49d64 Mon Sep 17 00:00:00 2001 From: Jean-Nicolas Brunet Date: Wed, 6 Oct 2021 21:22:32 -0400 Subject: [PATCH 8/8] [SofaCaribou] Minor adjustments to linear solver bindings --- src/SofaCaribou/Python/CMakeLists.txt | 10 +++++++++- .../Python/Solver/ConjugateGradientSolver.h | 16 ++++++++-------- src/SofaCaribou/Python/Solver/LDLTSolver.cpp | 1 - src/SofaCaribou/Python/Solver/LDLTSolver.h | 16 ++++++++-------- src/SofaCaribou/Python/Solver/LLTSolver.cpp | 1 - src/SofaCaribou/Python/Solver/LLTSolver.h | 16 ++++++++-------- src/SofaCaribou/Python/Solver/LUSolver.cpp | 1 - src/SofaCaribou/Python/Solver/LUSolver.h | 16 ++++++++-------- src/SofaCaribou/SofaCaribouConfig.cmake.in | 11 +++++++++++ 9 files changed, 52 insertions(+), 36 deletions(-) diff --git a/src/SofaCaribou/Python/CMakeLists.txt b/src/SofaCaribou/Python/CMakeLists.txt index 112c9ebb..a63f95e5 100644 --- a/src/SofaCaribou/Python/CMakeLists.txt +++ b/src/SofaCaribou/Python/CMakeLists.txt @@ -41,7 +41,15 @@ set(PYTHON_TEST_FILES ) find_package(SofaPython3 REQUIRED) -find_package(MKL REQUIRED) + +if (CARIBOU_WITH_MKL) + set(MKL_STATIC ON) + if (NOT CARIBOU_WITH_OPENMP) + set(MKL_THREADING_VENDOR SEQUENTIAL) + endif() + find_package(MKL REQUIRED QUIET) +endif() + caribou_add_python_module(SofaCaribou TARGET_NAME ${PROJECT_NAME} TARGET_ALIAS Caribou::Python.SofaCaribou diff --git a/src/SofaCaribou/Python/Solver/ConjugateGradientSolver.h b/src/SofaCaribou/Python/Solver/ConjugateGradientSolver.h index c02ce1a7..5b0b21f2 100644 --- a/src/SofaCaribou/Python/Solver/ConjugateGradientSolver.h +++ b/src/SofaCaribou/Python/Solver/ConjugateGradientSolver.h @@ -13,17 +13,17 @@ namespace SofaCaribou::solver::python { template void bind_ConjugateGradientSolver(pybind11::module & m) { namespace py = pybind11; - using SOLVER = ConjugateGradientSolver; - py::class_> c(m, "ConjugateGradientSolver"); + using SolverType = ConjugateGradientSolver; + py::class_> c(m, "ConjugateGradientSolver"); - c.def("A", [](SOLVER & solver){return solver.A()->matrix();}); + c.def("A", [](const SolverType & solver){return solver.A()->matrix();}); - c.def("x", [](SOLVER & solver){return solver.x()->vector();}); + c.def("x", [](const SolverType & solver){return solver.x()->vector();}); - c.def("b", [](SOLVER & solver){return solver.b()->vector();}); + c.def("b", [](const SolverType & solver){return solver.b()->vector();}); - c.def("assemble", [](SOLVER & solver, double m, double b, double k) { + c.def("assemble", [](SolverType & solver, double m, double b, double k) { sofa::core::MechanicalParams mparams; mparams.setMFactor(m); mparams.setBFactor(b); @@ -31,8 +31,8 @@ void bind_ConjugateGradientSolver(pybind11::module & m) { solver.assemble(&mparams); }, py::arg("m") = static_cast(1), py::arg("b") = static_cast(1), py::arg("k") = static_cast(1)); - sofapython3::PythonFactory::registerType([](sofa::core::objectmodel::Base* o) { - return py::cast(dynamic_cast(o)); + sofapython3::PythonFactory::registerType([](sofa::core::objectmodel::Base* o) { + return py::cast(dynamic_cast(o)); }); } diff --git a/src/SofaCaribou/Python/Solver/LDLTSolver.cpp b/src/SofaCaribou/Python/Solver/LDLTSolver.cpp index 9b774e62..b1ba7ed6 100644 --- a/src/SofaCaribou/Python/Solver/LDLTSolver.cpp +++ b/src/SofaCaribou/Python/Solver/LDLTSolver.cpp @@ -7,7 +7,6 @@ namespace SofaCaribou::solver::python { void addLDLTSolver(py::module & m) { bind_LDLTSolver, Eigen::Lower, Eigen::AMDOrdering>>(m); - } } // namespace SofaCaribou::solver::python \ No newline at end of file diff --git a/src/SofaCaribou/Python/Solver/LDLTSolver.h b/src/SofaCaribou/Python/Solver/LDLTSolver.h index 838ca925..52ff7a6b 100644 --- a/src/SofaCaribou/Python/Solver/LDLTSolver.h +++ b/src/SofaCaribou/Python/Solver/LDLTSolver.h @@ -14,17 +14,17 @@ namespace SofaCaribou::solver::python { template void bind_LDLTSolver(pybind11::module & m) { namespace py = pybind11; - using SOLVER = SofaCaribou::solver::LDLTSolver; - py::class_> c(m, "LDLTSolver"); + using SolverType = SofaCaribou::solver::LDLTSolver; + py::class_> c(m, "LDLTSolver"); - c.def("A", [](SOLVER & solver){return solver.A()->matrix();}); + c.def("A", [](const SolverType & solver){return solver.A()->matrix();}); - c.def("x", [](SOLVER & solver){return solver.x()->vector();}); + c.def("x", [](const SolverType & solver){return solver.x()->vector();}); - c.def("b", [](SOLVER & solver){return solver.b()->vector();}); + c.def("b", [](const SolverType & solver){return solver.b()->vector();}); - c.def("assemble", [](SOLVER & solver, double m, double b, double k) { + c.def("assemble", [](SolverType & solver, double m, double b, double k) { sofa::core::MechanicalParams mparams; mparams.setMFactor(m); mparams.setBFactor(b); @@ -32,8 +32,8 @@ namespace SofaCaribou::solver::python { solver.assemble(&mparams); }, py::arg("m") = static_cast(1), py::arg("b") = static_cast(1), py::arg("k") = static_cast(1)); - sofapython3::PythonFactory::registerType([](sofa::core::objectmodel::Base* o) { - return py::cast(dynamic_cast(o)); + sofapython3::PythonFactory::registerType([](sofa::core::objectmodel::Base* o) { + return py::cast(dynamic_cast(o)); }); } diff --git a/src/SofaCaribou/Python/Solver/LLTSolver.cpp b/src/SofaCaribou/Python/Solver/LLTSolver.cpp index fde85921..567d2f74 100644 --- a/src/SofaCaribou/Python/Solver/LLTSolver.cpp +++ b/src/SofaCaribou/Python/Solver/LLTSolver.cpp @@ -6,7 +6,6 @@ namespace SofaCaribou::solver::python { void addLLTSolver(py::module & m) { bind_LLTSolver, Eigen::Lower, Eigen::AMDOrdering>>(m); - } } // namespace SofaCaribou::solver::python \ No newline at end of file diff --git a/src/SofaCaribou/Python/Solver/LLTSolver.h b/src/SofaCaribou/Python/Solver/LLTSolver.h index 8f1587ee..263e574d 100644 --- a/src/SofaCaribou/Python/Solver/LLTSolver.h +++ b/src/SofaCaribou/Python/Solver/LLTSolver.h @@ -14,16 +14,16 @@ namespace SofaCaribou::solver::python { template void bind_LLTSolver(pybind11::module & m) { namespace py = pybind11; - using SOLVER = LLTSolver; - py::class_> c(m, "LLTSolver"); + using SolverType = LLTSolver; + py::class_> c(m, "LLTSolver"); - c.def("A", [](SOLVER & solver){return solver.A()->matrix();}); + c.def("A", [](const SolverType & solver){return solver.A()->matrix();}); - c.def("x", [](SOLVER & solver){return solver.x()->vector();}); + c.def("x", [](const SolverType & solver){return solver.x()->vector();}); - c.def("b", [](SOLVER & solver){return solver.b()->vector();}); + c.def("b", [](const SolverType & solver){return solver.b()->vector();}); - c.def("assemble", [](SOLVER & solver, double m, double b, double k) { + c.def("assemble", [](SolverType & solver, double m, double b, double k) { sofa::core::MechanicalParams mparams; mparams.setMFactor(m); mparams.setBFactor(b); @@ -31,8 +31,8 @@ namespace SofaCaribou::solver::python { solver.assemble(&mparams); }, py::arg("m") = static_cast(1), py::arg("b") = static_cast(1), py::arg("k") = static_cast(1)); - sofapython3::PythonFactory::registerType([](sofa::core::objectmodel::Base* o) { - return py::cast(dynamic_cast(o)); + sofapython3::PythonFactory::registerType([](sofa::core::objectmodel::Base* o) { + return py::cast(dynamic_cast(o)); }); } diff --git a/src/SofaCaribou/Python/Solver/LUSolver.cpp b/src/SofaCaribou/Python/Solver/LUSolver.cpp index 0f6241bc..775f376a 100644 --- a/src/SofaCaribou/Python/Solver/LUSolver.cpp +++ b/src/SofaCaribou/Python/Solver/LUSolver.cpp @@ -6,7 +6,6 @@ namespace SofaCaribou::solver::python { void addLUSolver(py::module & m) { bind_LUSolver, Eigen::AMDOrdering>>(m); - } } // namespace SofaCaribou::solver::python \ No newline at end of file diff --git a/src/SofaCaribou/Python/Solver/LUSolver.h b/src/SofaCaribou/Python/Solver/LUSolver.h index 845850f1..89cd6580 100644 --- a/src/SofaCaribou/Python/Solver/LUSolver.h +++ b/src/SofaCaribou/Python/Solver/LUSolver.h @@ -14,16 +14,16 @@ namespace SofaCaribou::solver::python { template void bind_LUSolver(pybind11::module & m) { namespace py = pybind11; - using SOLVER = LUSolver; - py::class_> c(m, "LUSolver"); + using SolverType = LUSolver; + py::class_> c(m, "LUSolver"); - c.def("A", [](SOLVER & solver){return solver.A()->matrix();}); + c.def("A", [](const SolverType & solver){return solver.A()->matrix();}); - c.def("x", [](SOLVER & solver){return solver.x()->vector();}); + c.def("x", [](const SolverType & solver){return solver.x()->vector();}); - c.def("b", [](SOLVER & solver){return solver.b()->vector();}); + c.def("b", [](const SolverType & solver){return solver.b()->vector();}); - c.def("assemble", [](SOLVER & solver, double m, double b, double k) { + c.def("assemble", [](SolverType & solver, double m, double b, double k) { sofa::core::MechanicalParams mparams; mparams.setMFactor(m); mparams.setBFactor(b); @@ -31,8 +31,8 @@ namespace SofaCaribou::solver::python { solver.assemble(&mparams); }, py::arg("m") = static_cast(1), py::arg("b") = static_cast(1), py::arg("k") = static_cast(1)); - sofapython3::PythonFactory::registerType([](sofa::core::objectmodel::Base* o) { - return py::cast(dynamic_cast(o)); + sofapython3::PythonFactory::registerType([](sofa::core::objectmodel::Base* o) { + return py::cast(dynamic_cast(o)); }); } diff --git a/src/SofaCaribou/SofaCaribouConfig.cmake.in b/src/SofaCaribou/SofaCaribouConfig.cmake.in index 2a4f2b0a..6765c5fd 100644 --- a/src/SofaCaribou/SofaCaribouConfig.cmake.in +++ b/src/SofaCaribou/SofaCaribouConfig.cmake.in @@ -3,6 +3,7 @@ # OPTIONS set(CARIBOU_WITH_OPENMP "@CARIBOU_WITH_OPENMP@") set(CARIBOU_WITH_SP3 "@CARIBOU_WITH_SP3@") +set(CARIBOU_WITH_MKL "@CARIBOU_WITH_MKL@") # Caribou find_package(Caribou COMPONENTS Algebra Geometry Topology Mechanics REQUIRED) @@ -13,6 +14,16 @@ if (CARIBOU_WITH_SP3) find_package(Caribou COMPONENTS Python REQUIRED) endif() +# MKL support +if (CARIBOU_WITH_MKL) + set(MKL_STATIC ON) + if (NOT CARIBOU_WITH_OPENMP) + set(MKL_THREADING_VENDOR SEQUENTIAL) + endif() + find_package(MKL REQUIRED QUIET) +endif() + + # Sofa's packages find_package(SOFA COMPONENTS SofaFramework SofaBaseLinearSolver SofaBaseTopology SofaEigen2Solver QUIET MODULE REQUIRED)