cs_defs.h:81:19: fatal error: mpi.h: No such file or directo

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
ffan
Posts: 66
Joined: Thu Jul 24, 2014 3:23 pm

cs_defs.h:81:19: fatal error: mpi.h: No such file or directo

Post by ffan »

Hi Code_Saturne users/developers,

I would like to install code_saturne-4.0.0-rc2 on Ubuntu12.04LTS (Xubuntu12.04LTS). While compiling, it encountered the following error. Where is mpi.h supposed to be? How do I fix it? Thank you.

-ffan


libtool: compile: /usr/bin/c++ -DHAVE_CONFIG_H -I. -I/home/ffan/packages/code_saturne-4.0.0-rc2/src/fvm -I../.. -I/home/ffan/packages/code_saturne-4.0.0-rc2/src/base -I/home/ffan/packages/code_saturne-4.0.0-rc2/src/bft -funroll-loops -O2 -Wuninitialized -I/home/ffan/salome-meca/V2014_2/modules/MED_V7_4_0/include/salome -DOMPI_SKIP_MPICXX -D_POSIX_SOURCE -DNDEBUG -ansi -funsigned-char -W -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wunused -Wno-long-long -Wfloat-equal -pthread -MT fvm_medcoupling_la-fvm_to_medcoupling.lo -MD -MP -MF .deps/fvm_medcoupling_la-fvm_to_medcoupling.Tpo -c /home/ffan/packages/code_saturne-4.0.0-rc2/src/fvm/fvm_to_medcoupling.cxx -fPIC -DPIC -o .libs/fvm_medcoupling_la-fvm_to_medcoupling.o
In file included from /home/ffan/packages/code_saturne-4.0.0-rc2/src/fvm/fvm_to_medcoupling.cxx:28:0:
/home/ffan/packages/code_saturne-4.0.0-rc2/src/base/cs_defs.h:81:19: fatal error: mpi.h: No such file or directory
compilation terminated.
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: cs_defs.h:81:19: fatal error: mpi.h: No such file or dir

Post by Yvan Fournier »

Hello,

Could you post the additional logs as per this forum's usage recommendations ?

Regards,

Yvan
ffan
Posts: 66
Joined: Thu Jul 24, 2014 3:23 pm

Re: cs_defs.h:81:19: fatal error: mpi.h: No such file or dir

Post by ffan »

Thank you Yvan. Attached is my install log. The problem happened when I set:
salome /home/ffan/salome-meca/V2014_2

If salome is left "no", it compiles and installs without problem.

- ffan
Attachments
install_saturne.log
(203.23 KiB) Downloaded 404 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: cs_defs.h:81:19: fatal error: mpi.h: No such file or dir

Post by Yvan Fournier »

Hello,

I am not sure about your syntax. Do you mean --with-salome=/home/ffan/salome-meca/V2014_2 in the configure step ?

This is strange, we often build with SALOME with no issues. I have tried building with SALOME-MECA also in the past, with no issues.

Is our build of SALOME-MECA 32-bit or 64-bit ? If you mix a 32-bit version of SALOME-MECA with a 64-bit build of Code_Saturne, you could have this sort of issue.

If this is not the case, you may add "--with-salome-med" to the configure command (MEDCoupling and ParaMEDMEM are not currently used by Code_Saturne except in experimental configurations).

Regards,

Yvan
ffan
Posts: 66
Joined: Thu Jul 24, 2014 3:23 pm

Re: cs_defs.h:81:19: fatal error: mpi.h: No such file or dir

Post by ffan »

Thanks Yvan. Attached is my setup file. I put
salome /home/ffan/salome-meca/V2014_2
inside the setup file.

My Saome-Meca is a 64-bit one.

- ffan
Attachments
setup.zip
(1.29 KiB) Downloaded 381 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: cs_defs.h:81:19: fatal error: mpi.h: No such file or dir

Post by Yvan Fournier »

Hello,

Could you try setting the same values for CompC as mpiCompC (mpicc) and compCxx as mpiCompCxx (mpicxx) ?

Actually, first trying only setting compCxx = mpicxx would be interesting.

I do not use the automatic installer often, so I would not be surprised that issues are du to using compCXx where mpiCompCxx would be necessary.

Regards,

Yvan
ffan
Posts: 66
Joined: Thu Jul 24, 2014 3:23 pm

Re: cs_defs.h:81:19: fatal error: mpi.h: No such file or dir

Post by ffan »

Yes. After setting compCxx = mpicxx, it works. Thanks Yvan.

- ffan
frpageot
Posts: 85
Joined: Wed Mar 21, 2012 1:10 pm

Re: cs_defs.h:81:19: fatal error: mpi.h: No such file or dir

Post by frpageot »

Hello,

I am trying to use the automatic installer for Stable release of CS4.0.0 and I have the exact same problem with mpi.h. I tried to set compCxx = mpicxx, but still got the problem. I tried to put the exact same value for CompC as mpiCompC (mpicc) and compCxx as mpiCompCxx (mpicxx) and still the issue.
install_saturne.log
(205.5 KiB) Downloaded 384 times
setup.zip
(1.37 KiB) Downloaded 375 times
Fred
Xubuntu 16.04 / CS5.0
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: cs_defs.h:81:19: fatal error: mpi.h: No such file or dir

Post by Yvan Fournier »

Hello,

Could you remind me your os version ?

The compilation error occurs in the Scotch prerequisite.

I do not understand why your setup mentions scotch 6.0.4 (the latest version, which Code_Saturne 4.0.0 tries to download and install), but your install_saturne.log mentions scotch 6.0.3 (as if using an earlier version).

Are you doing the install in a "fresh" directory ? If not, could you try it ? In any case, using the MPI compiler wrappers (mpicc, mpicxx) for all C and C++ compilers should work, or at east, the log should be slightly different.

If all else fails, could you try either (or both, in any order) : installing without Salome support, and installing without Scotch support (Metis should provide similar quality partitions).

Regards,

Yvan
frpageot
Posts: 85
Joined: Wed Mar 21, 2012 1:10 pm

Re: cs_defs.h:81:19: fatal error: mpi.h: No such file or dir

Post by frpageot »

Hello Yvan,

My OS is in my signature : Xubuntu 14.04, and I am reinstalling every from scratch, then everything is clean. I noticed as well that there is a mess with scotch version between the terminal during installation and in my install_saturne.log, but I was not able to explain. I will try tomorrow to install without salome support, and then without scotch if it still fails. I will let you know. Thanks.
Fred
Xubuntu 16.04 / CS5.0
Post Reply