Cannot make it work

Hello again,

as expected I have to stop by over here. I did multiple things that failed so I will try to develop it here as clearly as possible.

First let’s talk about the environment :

  • My system is Linux MX 18.3 which is Debian 9 based
  • I performed everything within an anaconda environment on python 3.6.10

1st case :

After setting the compilers, mpi and other basic useful libraries in the environment by calling them through the conda install system, I tried to install code_saturne 6.0.1 by letting it download and compile HDF5, CGNS, MED, SCOTCH and METIS.
This fails at the code_saturne compilation stage apparently due to a cgns problem :

and the end of the log file :

That’s it for the first part, I cannot find how to make it work. I tried with the version 5.0.11 of code_saturne and ended up with the same result so it seems something in my installation is shady.

2nd case :

So to not stay on such failure, I decided to install all the necessary library beforehand through anaconda. So after

conda install -c conda-forge hdf5 cgns libmed scotch metis

I retry the installation by pointing the setup file to these libraries, and surprise it works.

So I go and make a very simple test case with it, and there goes my luck. It can load the meshfile but can’t even run a mesh quality analysis, says solver failed and leave a corrupted listing file so I can only show you the summary file.
I also tried this with a different version of code_saturne for the same result. Difficult to interpret since I don’t have any hint on what is wrong besides a solver failed message.

By the way, I installed syrthes 4.3.5 with the same anaconda libraries and it experiences no problem so far…
second_case.tar.gz (4.65 MB)
first_case.tar.gz (211 KB)

Hello,

Would your CGNS version perchance be version 3.4.1 ? The CGNS developers broke upwards compatibility in 3.4.0, so to “fix” this, they decided to break it again the other way around, and code_saturne’s tests may not be up to date yet ? Can you first try without CGNS ?

For your case that starts but fails, are you running in parallel or not ? Could you try a serial run first ?
Also, even if you only have a corrupted part of the run_solver.log (listing in 5.0), an a “screen” error message, could you post that ? I suspect some mix between multiple versions of some libraries.

Best regards,

Yvan

Hello !

Ok, so, in order to test and eliminate as much conflicts as possible, I created a virtual machine under MX Linux 18.3.
I just performed the base package update and created one environment under python 3.6
Sorry in advance the post is going to be long due to the quotes, but I thought it might be clearer that way. I will treat each case in separate replies.

This case correspond to the automatic download and installation of libraries by install_saturne.py
Here are the packages in the environment when I attempted automatic installation :

For this try I didn’t exclude the cgns :

get the following console output :

And the error seems to be HDF5 related :

install_saturne.log (2.43 MB)

This is the case where HDF5, CGNS and MED were installed through conda in the environment

Here are the libraries in the environment :

Here is the setup file :

Installation perform with success :

Then the error occurs while testing code_saturne again on a mesh quality :

The full folder of the test case is in the attached tarball, with the error files.
test_case.tar.gz (4.81 MB)

Hello,

Could you post the output of

export LD_LIBRARY_PATH="/home/cosmo/anaconda3/envs/SCFD/lib":$LD_LIBRARY_PATH
ldd /home/cosmo/anaconda3/envs/SCFD/opt/code_saturne/6.0.1/code_saturne-6.0.1/arch/Linux_x86_64/libexec/code_saturne/cs_solver

And attach the “run_solver.log” file from your results case (“listing” is only a symbolic link, so does not contain the backtrace) ?

Running using your “mesh_input” file, things work fine on my side, so this is certainly a build issue. The preprocessor/mesh import stage worked fine…

Best regards,

Yvan

Hello,

Unfortunately there is no run_solver.log file generated. I even launched a search for it in the whole /cosmo root just in case.
And yes, listing is only a symbolic link, but it is a broken one in my case. It doesn’t make reference to anything…

As for what you requested, here is the output :

Best regards

Hello,

The symbolic link might be broken because it is created by the script, before cs_solver starts and creates the real run_solver.log. It is more surprising that the run_solver script is not created, as this is standard script business It is usually cleaned up whe na case does not finish in error, so in the runcase file, you might add --initialize to the run command (you can also do it using the advanced settings in the GUI, “initialize only”). This prepares the run but does not start it, so you should have that file.

Otherwise, what is the output of:

/home/cosmo/anaconda3/envs/SCFD/opt/code_saturne/6.0.1/code_saturne-6.0.1/arch/Linux_x86_64/libexec/code_saturne/cs_solver --system-info

? I did not notice anything strange about the ldd output.

Best regards,

Yvan

Good morning,

Even with --initialize nothing is created except the preprocessor.log and summary, listing link is still broken.
Worse, the solver seems to be corrupted :

best regards

Hello,

Is suspected the solver might be corrupted, but am not sure why. Tis type of issue usually occurs when mixing incompatible dependencies, but I did not notice anything wrong in your “ldd” output (though things may be subtle).

Did you run your install in several steps, or did you make sure you did a “clean” install, that is, run the whole code_saturne build in a previously empty directory ? If this is not the case, this is the first thing to try (I should have mentioned it before).

Otherwise, the best way to find out what is wrong is to start with a minimal install (no HDF5, MED, CGNS, Scotch, Metis) with maybe just MPI and see if the executable is OK or corrupted (the “system-info check”). If not, try removing MPI. If OK, try progressively adding the other features to see which one is causing trouble.

Best regards,

Yvan

Hello !

At last, I made it.
And I come back to give some updates to all the people out there who might be eager to know what went wrong in my case.

So apparently, code_saturne do not like the full anaconda environment. I didn’t push the research too far but I suspect the environment compilers.

So here is what I did :

  • Started from a clean Linux MX 18.3 install
  • Installed all normal updates and upgrades
  • Install through apt-get if not present : gcc g++ gfortran libstdc++5 build-essential make cmake zlib1g libxml2. Maybe libxml2-dev is also needed but not sure.
  • Install openmpi from tarball (openmpi-4.0.2) in a non protected direction
  • export the mpi path to the LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/your/mpi/path

in the bashrc and source it

  • Install anaconda for python 3 in a non protected direction (follow the website guide)

From there nothing should be done as a superuser except bashrc editing

  • Install Salome-V9_3_0-univ_public.run in a non protected direction
  • create a python 3.6 environment
  • In the environment, install numpy through conda-forge and PyQtChart through pip (it prepares the ground for Syrthes and provide all PyQt libs)
    I think that’s mostly it for setting the system.

Then I followed the normal code_saturne install procedure
logically it should automatically find the usr/bin compilers and the previously installed mpi compilers.
I didn’t integrate code_saturne to Salome but used Salome’s HDF5, CGNS and MED for code_saturne build, it’s important for mesh compatibility later.
scotch and parmetis where installed using the automatic download/install.
And voila, a working and MPI ready code_saturne.

Later I also successfully installed and coupled Syrthes in the same environment, carefully linking the tools used by code_saturne.

Thank you again Yvan and hope this helps some tortured soul out there

Hello,

Thanks for the update. I am not familiar with the Anaconda installer or its subtleties, but if anyone has detailed logs of errors configuring or compiling the code with the Anaconda compilers, I’ll take a look.

I confirm that in general, I do not recommend installing code_saturne as root (more precisely, there is no need to install is as root, and I prefer to avoid root as much as possible in general).

And yes, the Salome distribution of HDF5, MED, and CGNS is nice, while the desktop integration (CFDSTUDY) is not that useful, and probably not worth the additional installation trouble (I am in the process of making ir more modular so as to be installable separately, in a second step).

Best regards,

Yvan