# Installation problem with importing MED file

**URL:** <https://code-saturne.org/forum/t/installation-problem-with-importing-med-file/1770>\
**Category:** Installation issues\
**Created:** [September 3, 2019, 1:13pm UTC](https://code-saturne.org/forum/t/installation-problem-with-importing-med-file/1770 "2019-09-03T13:13:42Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![luyz07](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/l/b9e5f3/32.png) [@luyz07](https://code-saturne.org/forum/u/luyz07)\
**Post date:** [September 3, 2019, 1:13pm UTC](https://code-saturne.org/forum/t/installation-problem-with-importing-med-file/1770/1 "2019-09-03T13:13:42Z")

</div>

Hello,

I download the packages of Code\_Saturne(version 5.3) from the official website([https://www.code-saturne.org/cms/Intermediate-version-53](https://www.code-saturne.org/cms/Intermediate-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

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [September 3, 2019, 4:58pm UTC](https://code-saturne.org/forum/t/installation-problem-with-importing-med-file/1770/2 "2019-09-03T16:58:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![luyz07](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/l/b9e5f3/32.png) [@luyz07](https://code-saturne.org/forum/u/luyz07)\
**Post date:** [September 4, 2019, 2:15am UTC](https://code-saturne.org/forum/t/installation-problem-with-importing-med-file/1770/3 "2019-09-04T02:15:34Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [September 4, 2019, 6:43am UTC](https://code-saturne.org/forum/t/installation-problem-with-importing-med-file/1770/4 "2019-09-04T06:43:44Z")

</div>

Hello,

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

Regards,

Yvan

---

<div class="post-metadata">

**Author:** ![luyz07](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/l/b9e5f3/32.png) [@luyz07](https://code-saturne.org/forum/u/luyz07)\
**Post date:** [September 4, 2019, 1:58pm UTC](https://code-saturne.org/forum/t/installation-problem-with-importing-med-file/1770/5 "2019-09-04T13:58:33Z")

</div>

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.  
[setup.txt](https://code-saturne.org/forum/uploads/short-url/eqgJbjnOGMypFNU3wFpSYCinRE5.txt) (4 KB)

 ![Screenshot from 2019-09-04 15-47-41.png](https://code-saturne.org/forum/uploads/default/original/2X/6/67cdaa1846f09944ac86c4a5e0ff87ddff7067f2.png)

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [September 4, 2019, 10:24pm UTC](https://code-saturne.org/forum/t/installation-problem-with-importing-med-file/1770/6 "2019-09-04T22:24:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![luyz07](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/l/b9e5f3/32.png) [@luyz07](https://code-saturne.org/forum/u/luyz07)\
**Post date:** [September 5, 2019, 12:31pm UTC](https://code-saturne.org/forum/t/installation-problem-with-importing-med-file/1770/7 "2019-09-05T12:31:05Z")

</div>

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!

 ![Screenshot from 2019-09-05 14-17-52.png](https://code-saturne.org/forum/uploads/default/original/2X/8/890b5fa98b72275e96ae93b0b0e38fadd7a0da58.png)  
[setup.txt](https://code-saturne.org/forum/uploads/short-url/ree23xbiycW9znJsFAbtwjk1wob.txt) (4.02 KB)  
[install\_saturne.log](https://code-saturne.org/forum/uploads/short-url/sARxPSiZmJbNGou7NJydtsO6BLe.log) (684 KB)

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [September 5, 2019, 1:18pm UTC](https://code-saturne.org/forum/t/installation-problem-with-importing-med-file/1770/8 "2019-09-05T13:18:58Z")

</div>

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=) in the setup.  
You will have the same issue and solution for each step (med, cgns, and _Code\_Saturne_).

Best regards,

Yvan

---

<div class="post-metadata">

**Author:** ![luyz07](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/l/b9e5f3/32.png) [@luyz07](https://code-saturne.org/forum/u/luyz07)\
**Post date:** [September 11, 2019, 2:45pm UTC](https://code-saturne.org/forum/t/installation-problem-with-importing-med-file/1770/9 "2019-09-11T14:45:34Z")

</div>

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.  
[install\_saturne.log](https://code-saturne.org/forum/uploads/short-url/ujptZOGfWriZZ0Crwlc1q6T7FCT.log) (29 Bytes)

 ![Screenshot from 2019-09-11 16-43-56.png](https://code-saturne.org/forum/uploads/default/original/2X/3/31aed5cf0415b94a6b5a15d22186ad0838454a67.png)

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [September 11, 2019, 3:25pm UTC](https://code-saturne.org/forum/t/installation-problem-with-importing-med-file/1770/10 "2019-09-11T15:25:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![luyz07](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/l/b9e5f3/32.png) [@luyz07](https://code-saturne.org/forum/u/luyz07)\
**Post date:** [September 12, 2019, 4:38pm UTC](https://code-saturne.org/forum/t/installation-problem-with-importing-med-file/1770/11 "2019-09-12T16:38:09Z")

</div>

Hello,

I have installed the packages (hdf, cgns, med), but encounter the problem of “permission denied” again when I re-run the “install-saturne.py”.

 ![Screenshot from 2019-09-12 18-29-12.png](https://code-saturne.org/forum/uploads/default/original/2X/a/ab4e58aa47c3ef8b360d4cc28cedaea55708cdc0.png)

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [September 13, 2019, 2:17pm UTC](https://code-saturne.org/forum/t/installation-problem-with-importing-med-file/1770/12 "2019-09-13T14:17:55Z")

</div>

Hello,

Yes, as I said in the previous posts, the sufo parts have to be run at each stage also.  
This script is really not designed for sudo use.

Best regards,

Yvan
