Installation problem with importing MED file

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
luyz07
Posts: 11
Joined: Mon Mar 18, 2019 4:22 pm

Installation problem with importing MED file

Post by luyz07 »

Hello,

I download the packages of Code_Saturne(version 5.3) from the official website(https://www.code-saturne.org/cms/Interm ... version-53) and installed the code with using an automated installer (install_saturne.py) on my PC (Ubuntu 16.04). However, when I tried to import a MED format mesh into the Code_Saturne, it can not be performed. The contents of preprocessor.log are shown below.
So I realised that I did not install the third-party software, such as MED. So how can I fix this problem? I am not so familiar with Ubuntu system. Thank you!


/usr/local/code_saturne-5.3.3/arch/Linux_x86_64/libexec/code_saturne/cs_preprocess
--reorient --log --out mesh_input
/home/luyz/Code_Saturne/My_Cases/MISTRA_HM1-1_refinedmesh1-new/MESH/MISTRA3DQinjhoriz75vent_refined_1-new-2.med

.------------------------------.
| |
| Code_Saturne Preprocessor |
| |
`------------------------------'

code_saturne version 5.3.3 (built Sat 10 Aug 2019 08:50:44 AM CEST)

Reading of compressed files ('.gz') with Zlib 1.2.8


Error in preprocessor execution
===============================

/home/luyz/Code_Saturne/code_saturne-5.3.3_source/preprocessor/pre-post/ecs_pre.c:486: Fatal error.

File format "MED" support not available in this
installation (file "/home/luyz/Code_Saturne/My_Cases/MISTRA_HM1-1_refinedmesh1-new/MESH/MISTRA3DQinjhoriz75vent_refined_1-new-2.med").


Call stack
1: 0x40b8a1 <ecs_pre__type_format+0x2f1> (cs_preprocess)
2: 0x407293 <ecs_cmd__lit_arg+0x3a3> (cs_preprocess)
3: 0x404bdf <main+0x8f> (cs_preprocess)
4: 0x7f53a4ed7830 <__libc_start_main+0xf0> (libc.so.6)
5: 0x4054c9 <_start+0x29> (cs_preprocess)
End of stack
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Installation problem with importing MED file

Post by Yvan Fournier »

Hello,

When using the automatic installer, before launching the installation, you can edit the "setup" file generated on the first pass so as to also install the MED library (see the comments inside).

You should edit that file and re-run the installation.

Regards,

Yvan
luyz07
Posts: 11
Joined: Mon Mar 18, 2019 4:22 pm

Re: Installation problem with importing MED file

Post by luyz07 »

Thank you for your reply.
Since I have installed the code, do I need to uninstall it and go through the installation process again? Or do I just have to install the MED package?
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Installation problem with importing MED file

Post by Yvan Fournier »

Hello,

You can simply overwrite the previous installation, but need to re-run the installation script.

Regards,

Yvan
luyz07
Posts: 11
Joined: Mon Mar 18, 2019 4:22 pm

Re: Installation problem with importing MED file

Post by luyz07 »

I edited the "setup" file again and re-run the "install_saturne.py", but I can not install these optional libraries.
The part of the "setup" file where I edited is as follows:

#--------------------------------------------------------
# Optional packages:
# ------------------
#
# MED / HDF5 For MED file format support
# (used by SALOME and by Gmsh)
#
# CGNS / HDF5 For CGNS file support
# (used by many meshing tools)
#
# Scotch (includes PT-Scotch) and/or ParMetis
# for parallel partitioning
#
# For Linux workstations, HDF5, CGNS, and even MED
# packages may be available through the package manager.
# HDF5 is also often available on large systems.
# When building with SALOME, the platform distribution's
# packages may be used, by setting in the matching entry
# 'yes' under the "Use" column and simply 'salome' under
# the path column.
#
# Scotch and Pt-Scotch are available in some Linux
# distributions, but may be built with options
# incompatible with non-threaded Code_Saturne runs.
#
# To install CGNS or ParMetis, the CMake
# configuration/installation tool is required
# (it is available in most Linux distributions).
#--------------------------------------------------------
#
# Name Use Install Path
#
hdf5 yes yes None
cgns yes yes None
med yes yes None
scotch no no None
parmetis no no None
#
#========================================================


And the information shown in the terminal is included in the attachments.
Attachments
setup.txt
(4 KiB) Downloaded 192 times
Screenshot from 2019-09-04 15-47-41.png
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Installation problem with importing MED file

Post by Yvan Fournier »

Hello,

I do not reproduce this issue but it may be due to running as root/sudo.

I recommend not installing using sudo, or doing it only for the last stages of installation (the automatic installer is designed for regular users, who may not have/need root access; for more complex or global installs, the low-level install (as described in the installation guide) should be used.

If you need to install the code in a public directory, you can successively run the script without sudo (to download, configure, and compile) then "cd" to the the build directory of each tool (hdf5, med, Code_Saturne) and run "sudo make install" when the script fails installing due to permission issues.

For a "private" installation, not root/sudo is needed, everything can work from a user account.

Best regards,

Yvan
luyz07
Posts: 11
Joined: Mon Mar 18, 2019 4:22 pm

Re: Installation problem with importing MED file

Post by luyz07 »

Hello,

There is a new error occurring when installing HDF5 and I can not figure out why it happen. Could you check the installation log and other files attached in the post?
Thank you!
Attachments
Screenshot from 2019-09-05 14-17-52.png
setup.txt
(4.02 KiB) Downloaded 196 times
install_saturne.log
(684.18 KiB) Downloaded 215 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Installation problem with importing MED file

Post by Yvan Fournier »

Hello,

When not installing as sudo, you need to install in a user account you have writer permission to.

The other solution is to do as I mentioned in my previous post, i.e. "cd" to the hdf5 build directory, run "sudo make install", then re-run the automatic installer using the new hdf5 install (use=yes, install=no, path=<hdf5 install path>) in the setup.
You will have the same issue and solution for each step (med, cgns, and Code_Saturne).

Best regards,

Yvan
luyz07
Posts: 11
Joined: Mon Mar 18, 2019 4:22 pm

Re: Installation problem with importing MED file

Post by luyz07 »

Hello,

I installed the packages one by one and when it turns to CGNS, there is nothing in the cgns build directory. So I went to the ./CGNS-3.3.1 directory, and I tried "./configure", "make" and "sudo make install", but I could not install this package.
Attachments
install_saturne.log
(29 Bytes) Downloaded 203 times
Screenshot from 2019-09-11 16-43-56.png
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Installation problem with importing MED file

Post by Yvan Fournier »

Hello,

For CGNS you need CMake (and it seem a relatively up to date version may be needed). So you first need to check if CMake is installed (or install).

Once Cmake is installed, you can try again, or go directly to the build directory for CGNS and run
cmake <config_opts>
using the config_opts option which appears in you screenshot.

Regards,

Yvan
Post Reply