Moving the incs will solve that error:
You need to replace:
incs_special: -I ~/.openmpi/include/
incs_parallel: -I ~/.openmpi/include/
incs_bief: -I ~/.openmpi/include/
by
incs_all: -I ~/.openmpi/include/
Another solution to simplify is to use mpif90 instead of gfortran in the parallel configuration then you do not need to add the inlude and the lib for mpi.
Your configuration would look like that:
[ubugfompi]
#
brief: parallel mode, using mpiexec directly (of the 2 package).
The only difference with the scalar versions (optimised) is the presence
of the key mpi_cmdexec and the -DHAVE_MPI compilation directive.
Of course, you also need the key par_cmdexec.
Finally, note that this configuration also works whether
processor is 0 or 1.
#
mpi_cmdexec: ~/.openmpi/bin/mpiexec -wdir <wdir> -n <ncsize> <exename>
#
cmd_obj: ~/.openmpi/bin/mpif90 -c -cpp -O3 -DHAVE_MPI -fconvert=big-endian -frecord-marker=4 <mods> <incs> <f95name>
incs_all:
#
libs_all: ~/telemac/v8p0r1/optionals/metis-5.1.0/build/Linux-x86_64/libmetis/libmetis.a
By the way you should be using the mpiexec from the mpi you compiled with. I changed that in the configuration.