mpi.h Install Problem On Ubuntu

Install support for openEMS

Moderators: thorsten, sebastian

Post Reply
MPCEngineer
Posts: 26
Joined: Thu 02 Sep 2021, 18:29

mpi.h Install Problem On Ubuntu

Post by MPCEngineer » Mon 06 Sep 2021, 11:59

Hi.

Tried all the instructions from https://github.com/thliebig/openEMS-Project

When running the inverted_f.m example I get the following:

setting up openEMS matlab/octave interfacecompiling oct files
HDF5 library path found at: /usr/lib/x86_64-linux-gnu/hdf5/openmpi/libhdf5.so/usr/lib/x86_64-linux-gnu/hdf5/serial
HDF5 include path found at: /usr/include/hdf5/openmpi
In file included from /usr/include/hdf5/openmpi/hdf5.h:22,
from h5readatt_octave.cc:3:
/usr/include/hdf5/openmpi/H5public.h:60:13: fatal error: mpi.h: No such file or directory
60 | # include <mpi.h>
| ^~~~~~~
compilation terminated.
warning: mkoctfile: building exited with failure status


I have installed MPI using the sudo apt-get install libopenmpi-dev

Running mpicc -show gives me
gcc -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include -pthread -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi

Description: Ubuntu 20.04.3 LTS
Release: 20.04

Thanks,

MPC.

MPCEngineer
Posts: 26
Joined: Thu 02 Sep 2021, 18:29

Re: mpi.h Install Problem On Ubuntu

Post by MPCEngineer » Mon 06 Sep 2021, 12:16

On my system mpi.h is:

/usr/lib/x86_64-linux-gnu/openmpi/include/mpi.h
/usr/src/linux-headers-5.4.0-56/include/linux/mpi.h
/usr/src/linux-hwe-5.11-headers-5.11.0-27/include/linux/mpi.h
/usr/src/linux-hwe-5.11-headers-5.11.0-25/include/linux/mpi.h
/usr/src/linux-hwe-5.8-headers-5.8.0-63/include/linux/mpi.h


MPC.

MPCEngineer
Posts: 26
Joined: Thu 02 Sep 2021, 18:29

Re: mpi.h Install Problem On Ubuntu

Post by MPCEngineer » Mon 06 Sep 2021, 12:54

Hi.

I have managed to manually compile h5readatt_octave.cc using

mkoctfile -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi/libhdf5.so -I/usr/include/hdf5/openmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include -Lhdf5 h5readatt_octave.cc


I now get the error.

nf2ff: Analysing far-field for 1 frequencies.
error: ReadHDF5Attribute: /home/melvin/opt/openEMS/share/openEMS/matlab/h5readatt_octave.oct: failed to load: /home/user/opt/openEMS/share/openEMS/matlab/h5readatt_octave.oct: undefined symbol: _ZN3MPI8Datatype4FreeEv
error: called from
ReadHDF5Attribute at line 22 column 10
ReadNF2FF at line 22 column 12
CalcNF2FF at line 140 column 7
inverted_f at line 195 column 7
>>

Any ideas?

Thanks.

MPCEngineer
Posts: 26
Joined: Thu 02 Sep 2021, 18:29

Re: mpi.h Install Problem On Ubuntu

Post by MPCEngineer » Mon 06 Sep 2021, 13:24

Fixed....

This link gives some information
https://alioth-lists-archive.debian.net ... 09664.html

Had to remove the library libhdf5-openmpi-dev and recompile h5readatt_octave.cc

MPC.

thorsten
Posts: 1464
Joined: Mon 27 Jun 2011, 12:26

Re: mpi.h Install Problem On Ubuntu

Post by thorsten » Mon 06 Sep 2021, 19:14

Yeah MPI (and MPC) is always hard and in my experience hardly ever worth it (for FDTD)...

I'm glad you figured it out..

regards
Thorsten

Post Reply