Installation error: cannot find mpi.h during compilation
Added by Win Trivitayanurak over 5 years ago
Hi,
I'm installing CDO from cdo-1.9.7.1.tar.gz on my Ubuntu Budgie with the netCDF4 and HDF5 configuration. The compilation stopped and it says the file mpi.h cannot be found (the message is attached herewith). Somehow I can find the mpi.h file in the directory /usr/include/mpi/ but I don't know how to fix this issue. I tried editing the code where the compilation crashed and edit the include line from <mpi.h> to be </usr/include/mpi/mpi.h> but it still stopped at the same step but with slight difference in the message to the screen. Please help. Thanks in advance.
CDO_compile_log.log (147 KB) CDO_compile_log.log | compilation log tunneled to a file | ||
compile-message (3.38 KB) compile-message | message show up on screen during compilation |
Replies (6)
RE: Installation error: cannot find mpi.h during compilation - Added by Ralf Mueller over 5 years ago
Hi Win!
you seem to use spack for installing the dependencies of CDO. There is a spack for CDO itself, so manual installation from the source is not really needed.
I use the 'develop' branch of spack, last commit from 2019-08-25. try
spack info cdo
hth
ralf
btw: Ubuntu comes with a cdo package. It's an older revision, but might still fit your needs.
RE: Installation error: cannot find mpi.h during compilation - Added by Win Trivitayanurak over 5 years ago
Hi Ralf,
Thanks a lot for your reply. So I tried this:
win@win-desktop:~$ spack compiler find
> Found no new compilers
> Compilers are defined in the following files:
/home/win/.spack/linux/compilers.yaml
win@win-desktop:~$ spack install cdo
==> Error: An unsatisfiable variant constraint has been detected for spec:
hdf5@1.10.5%gcc@7.4.0~cxx~debug~fortran~hl+mpi+pic+shared~szip+threadsafe arch=linux-ubuntu18.04-x86_64
^mpi
^zlib@1.2.11%gcc@7.4.0+optimize+pic+shared arch=linux-ubuntu18.04-x86_64
while trying to concretize the partial spec:
netcdf@4.7.0%gcc@7.4.0~dap~hdf4 maxdims=1024 maxvars=8192 +mpi~parallel-netcdf+pic+shared arch=linux-ubuntu18.04-x86_64
^autoconf
^m4@1.4.18%gcc@7.4.0+sigsegv arch=linux-ubuntu18.04-x86_64
^libsigsegv
^perl@5.14.0:
^gdbm
^readline
^ncurses
^pkgconf@1.6.0%gcc@7.4.0 arch=linux-ubuntu18.04-x86_64
^automake
^libtool
^mpi
^zlib@1.2.11%gcc@7.4.0+optimize+pic+shared arch=linux-ubuntu18.04-x86_64
netcdf requires hdf5 variant +hl, but spec asked for ~hl
How the error message looks on screen is in the attached file.
Can you suggest how to fix this issue?
regards,
win
RE: Installation error: cannot find mpi.h during compilation - Added by Win Trivitayanurak over 5 years ago
I just installed CDO from linux package by doing sudo apt install cdo
I got version 1.9.3 and I guess it should work for my purpose. So I'm good for now.
RE: Installation error: cannot find mpi.h during compilation - Added by Ralf Mueller over 5 years ago
alright - good to know, Win.
I will start chasing this spack-issue then
cheers
ralf
RE: Installation error: cannot find mpi.h during compilation - Added by Ralf Mueller over 5 years ago
should be
spack install cdo '^hdf5+hl'Found some issues related to this behavior of the concretizer on github
RE: Installation error: cannot find mpi.h during compilation - Added by Ralf Mueller over 5 years ago
OK, full speck without lengthy openmpi installation (which is not needed at all)
spack spec -I cdo '^hdf5+hl~mpi' '^netcdf~mpi' '^fftw~mpi'