Error building with Catalyst support

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
antoineb
Posts: 16
Joined: Mon Sep 16, 2019 4:06 pm

Error building with Catalyst support

Post by antoineb »

Hi all,

I'm having a bit of trouble installing Code_saturne 6.0.2 with Catalyst support.

I built Paraview 5.6.3 with catalyst and python flags activated, as well as install files flag.
I then used "make" and "make install", but when I provide the installation path to CS, I have the following error during building :

Code: Select all

../../../code_saturne-6.0.2/src/fvm/fvm_to_catalyst.cxx: At global scope:
../../../code_saturne-6.0.2/src/fvm/fvm_to_catalyst.cxx:402:23: error: ISO C++ forbids declaration of ‘_init_coprocessor’ with no type [-fpermissive]
 _init_coprocessor(void)
                       ^
../../../code_saturne-6.0.2/src/fvm/fvm_to_catalyst.cxx: In function ‘int _init_coprocessor()’:
../../../code_saturne-6.0.2/src/fvm/fvm_to_catalyst.cxx:458:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
make[3]: *** [Makefile:1284: fvm_catalyst_la-fvm_to_catalyst.lo] Error 1
make[3] : on quitte le répertoire « /home/antoine/Téléchargements/build/src/fvm »
make[2]: *** [Makefile:973: all-recursive] Error 1
make[2] : on quitte le répertoire « /home/antoine/Téléchargements/build/src »
make[1]: *** [Makefile:1595: all-recursive] Error 1
make[1] : on quitte le répertoire « /home/antoine/Téléchargements/build »
make: *** [Makefile:1039: all] Error 2
What Am I doing wrong ?

I saw that the paraview built inside Salome 9.4.0 has Catalyst installed, can I use this one to build CS with catalyst support ?

Best regards,

Antoine
antoineb
Posts: 16
Joined: Mon Sep 16, 2019 4:06 pm

Re: Error building with Catalyst support

Post by antoineb »

UPDATE 1 :

In file "fvm_to_catalyst.cxx", line 397, in "src" folder, replacing :

Code: Select all

#if defined(HAVE_MPI)
static void
_init_coprocessor(bool      private_comm,
                  MPI_Comm  comm)
#else
_init_coprocessor(void)
#endif
With :

Code: Select all

#if defined(HAVE_MPI)
static void
_init_coprocessor(bool      private_comm,
                  MPI_Comm  comm)
#else
static void
_init_coprocessor(void)
#endif
Building worked fine.

Hope everything else works fine now !

------------------------------------------------------------

UPDATE 2 :

I managed to build and install Code_Saturne, it works fine, catalyst is now available under postrprocess writers.

I need to setup a writer to see if the results are OK.
Yvan Fournier
Posts: 3424
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error building with Catalyst support

Post by Yvan Fournier »

Hello,

Which version of ParaView are you using ? Do you have in install of code_saturne with out MPI ?

In the internal EDF builds of Salome 9.4, ParaView is build with MPI support, and is usable for Catalyst support.

But last time I tested using a ParaView build without MPI (some months ago), I got an error message indicating MPI support was needed.

So you'll see when you get further in the test, but if you get a similar error, you will need to build ParaView with MPI support... Not difficult to build, but can take hours to compile depending on your machine...

Best regards,

Yvan
antoineb
Posts: 16
Joined: Mon Sep 16, 2019 4:06 pm

Re: Error building with Catalyst support

Post by antoineb »

Hi Yvan,

I did build Paraview with MPI support.
I'm using Paraview 5.6.3 and Code_Saturne 6.0.2, both with MPI support.

I did not manage to get the Salome paraview to work for building Code_Saturne if that was your question.

Are you saying that the issue I had means Paraview was not built with MPI support ?

Best regards,
Antoine
Yvan Fournier
Posts: 3424
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error building with Catalyst support

Post by Yvan Fournier »

Hello,

Yes, it was possibly due to that. The issue you fixed was related to the case where code_saturne does not have MPI support, it seems (which is why we did not catch it before, as this is an unlikely combo).

If you have MPI support for both, things should go pretty well (hoping you do not get OpenGL-related issues, which could require additional install iterations).

Best regards,

Yvan
antoineb
Posts: 16
Joined: Mon Sep 16, 2019 4:06 pm

Re: Error building with Catalyst support

Post by antoineb »

Good catch !

I forgot the mpi flag in CS configure... My bad !

Trying again...
antoineb
Posts: 16
Joined: Mon Sep 16, 2019 4:06 pm

Re: Error building with Catalyst support

Post by antoineb »

I built again with MPI, and it works !
Thanks Yvan :D

I have one small issue, which is the images won't go in the folder set in code_saturne writers tab. Do you know why ? The folder gets created, but the images are in the root result folder of the run.

Best regards,
Antoine
Yvan Fournier
Posts: 3424
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error building with Catalyst support

Post by Yvan Fournier »

Hello,

Yes, the images go into the execution directory by default, but you can configure that in the Catalyst Python scripts (either modify the path, or with recent ParaView versions, define the "root" directory, which can be "./postprocessing" I think; you can even do that under ParaView in the exports definition).

In v6.0, ParaView error messages go in the main log, but in 6.1, they go into postprocessing/catalyst.log. If the file deos not exist, it means there were no errors/warnings.

Best regards,

Yvan
Antech
Posts: 144
Joined: Wed Jun 10, 2015 10:02 am

Re: Error building with Catalyst support

Post by Antech »

Hello. I'm switching to CodeSaturne 6.x branch on Kubuntu 16 (up-to-date) and have problems with Saturne compilation.

Versions 6.0.6 (current main version) and 6.3.0 (current feature version) build successfully in basic configuration but won't compile in Catalyst mode. I use ParaView 5.8.1 (current version). I configured it with options below:

Code: Select all

CMAKE_INSTALL_PREFIX             /Programs/ParaView-5.8.1/install-catalyst
PARAVIEW_BUILD_EDITION           CATALYST
PARAVIEW_INSTALL_DEVELOPMENT_F   ON
PARAVIEW_USE_PYTHON              ON
PARAVIEW_USE_MPI                 ON
MPIEXEC_EXECUTABLE               /Programs/openmpi-1.8.4/build/bin/mpiexec
MPIEXEC_MAX_NUMPROCS             16 (Number of cores)
MPIEXEC_NUMPROC_FLAG             -np
It configured and built OK, but when I compile Saturne with standard options I used for version 5.x

Code: Select all

./configure --prefix=/Programs/Code_Saturne-6.0.6-mpi-1.8.4-PV-5.2.0/build-catalyst/ \
            --with-libxml2=/Programs/libxml2-2.9.0/build/ \
            --with-med=/Programs/med-3.2.0/build/ \
            --with-hdf5=/Programs/hdf5-1.8.10/build/ \
            --with-mpi=/Programs/openmpi-1.8.4/build/ \
            --with-cgns=/Programs/cgnslib-3.2.1/build \
            --with-scotch=/Programs/scotch-5.1.12/build \
            --with-catalyst=/Programs/ParaView-5.8.1/install-catalyst \
            --enable-openmp
I get the following on Saturne configure:

Code: Select all

...
checking ParaView/Catalyst version above 5.6... CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find MPI (missing: MPI_C_FOUND C)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /Programs/ParaView-5.8.1/install-catalyst/lib/cmake/paraview-5.8/vtk/patches/3.16/FindMPI.cmake:1705 (find_package_handle_standard_args)
  /Programs/ParaView-5.8.1/install-catalyst/lib/cmake/paraview-5.8/vtk/VTK-vtk-module-find-packages.cmake:203 (find_package)
  /Programs/ParaView-5.8.1/install-catalyst/lib/cmake/paraview-5.8/vtk/vtk-config.cmake:129 (include)
  /Programs/ParaView-5.8.1/install-catalyst/lib/cmake/paraview-5.8/paraview-config.cmake:53 (find_package)
  CMakeLists.txt:6 (find_package)


no
checking ParaView/Catalyst version 5.6 or older... CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find MPI (missing: MPI_C_FOUND C)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /Programs/ParaView-5.8.1/install-catalyst/lib/cmake/paraview-5.8/vtk/patches/3.16/FindMPI.cmake:1705 (find_package_handle_standard_args)
  /Programs/ParaView-5.8.1/install-catalyst/lib/cmake/paraview-5.8/vtk/VTK-vtk-module-find-packages.cmake:203 (find_package)
  /Programs/ParaView-5.8.1/install-catalyst/lib/cmake/paraview-5.8/vtk/vtk-config.cmake:129 (include)
  /Programs/ParaView-5.8.1/install-catalyst/lib/cmake/paraview-5.8/paraview-config.cmake:53 (find_package)
  CMakeLists.txt:5 (FIND_PACKAGE)


CMake Warning (dev) in /Programs/ParaView-5.8.1/install-catalyst/lib/cmake/paraview-5.8/vtk/vtk-config.cmake:
  Policy CMP0011 is not set: Included scripts do automatic cmake_policy PUSH
  and POP.  Run "cmake --help-policy CMP0011" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  The included script

    /Programs/ParaView-5.8.1/install-catalyst/lib/cmake/paraview-5.8/vtk/vtk-config.cmake

  affects policy settings.  CMake is implying the NO_POLICY_SCOPE option for
  compatibility, so the effects are applied to the including context.
Call Stack (most recent call first):
  /Programs/ParaView-5.8.1/install-catalyst/lib/cmake/paraview-5.8/paraview-config.cmake:53 (find_package)
  CMakeLists.txt:5 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

no
configure: error: in `/Programs/Code_Saturne-6.0.6-mpi-1.8.4-PV-5.2.0/source':
configure: error: Catalyst co-processing support requested, but test for Catalyst failed!
See `config.log' for more details

What can be the problem? You can find software versions used in configure arguments above. System MPI version is 2.1.1. Both Saturne and ParaView-5.8.1 compiled with OpenMPI-1.8.4 because later versions caused very nasty random crashes. I tried ParaView-5.2.0 but it looks like modern Saturne doesn't support it (there are some VTK functions problems). Standard Saturne configuration witn MPI-1.8.4 is OK (configure/build/run GUI). Need your help...
Yvan Fournier
Posts: 3424
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error building with Catalyst support

Post by Yvan Fournier »

Hello,

The MPI detection issue is surprising, because it seems very similar to an issue that was solved a few months ago. And which should not appear anymore in 6.3.0 or 6.0.6,

In any case, It is strongly recommend to use a separate directory for building the code (running configure from a separate, empty directory). In tree builds are not supported. So I suggest trying that first.

Also, having a recent enough CMake version may be necessary (we check for a minimum version but might be too lax).

Best regards,

Yvan
Post Reply