problem while compiling inlet_test case

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
abhisek.sac
Posts: 6
Joined: Fri Dec 31, 2010 4:25 pm
Location: ISRO

problem while compiling inlet_test case

#1 Unread post by abhisek.sac »

I am trying to compile the INLET_TEST case with following configurations:

(1) Operating System: Ubuntu Linux (v 11.10)
(2) Fortran Compiler: IFORT (v 12.1.2)
(3) MPI: MPICH2 with mpif90 (1.2.1p1)
(4) Netcdf: version 3.6.3 (Disabled Netcdf4)
(5) MCT: version 2.6.0 (compiled with basic configuration script)

While compiling other test cases (e.g. Upwelling,Seamount etc.), I didn't find any error and the model ran successfully.

However when I compile INLET_TEST case, I'm getting the following error:

cd /home/abhisek/Desktop/ROMS/projects/inlet_test/Build; /home/abhisek/LIB/mpich2-install/bin/mpif90 -c -heap-arrays -fp-model precise -ip -O3 -I/home/abhisek/LIB/MCT/include -free mp_exchange.f90
mp_exchange.f90(106): error #6404: This name does not have a type, and must have an explicit type. [MPI_PROC_NULL]
Null_Value=MPI_PROC_NULL
-----------------^
compilation aborted for mp_exchange.f90 (code 1)
make: *** [/home/abhisek/Desktop/ROMS/projects/inlet_test/Build/mp_exchange.o] Error 1

Most probably the error is with MPICH2, but I have successfully run several other cases with this library.Can anyone help me in this regard?
Thanking in advance.

Abhisek

User avatar
shchepet
Posts: 188
Joined: Fri Nov 14, 2003 4:57 pm

Re: problem while compiling inlet_test case

#2 Unread post by shchepet »

First, go to include subdirectory of your MPI directory three and inspect content of file "mpif.h"
to make sure that parameter MPI_PROC_NULL is present there [for MPICH versions 1.0.5p4 through 1.4.1p1
(current) it is just an integer parameter with value -1].

Secondly, this directory should also contains module file called "mpi.mod" -- if it does not, it means
that your MPICH installation was miss-configured by disabling F90 support.

Third, instead of compiling using mpif90 script,
/home/abhisek/LIB/mpich2-install/bin/mpif90 -c -heap-arrays -fp-model precise -ip -O3 -I/home/abhisek/LIB/MCT/include -free mp_exchange.f90
try to compile using ifort directly, but make sure that that directory where "mpif.h" and also module file "mpi.mod" are located is included into -I compiler option:

Code: Select all

ifort -I/directory/mpich2/include -c -heap-arrays -fp-model precise -ip -O3 -I/home/abhisek/LIB/MCT/include -free mp_exchange.f90
and see whether it compiles. If it does work, but mpif90 does not, it means that it was MPICH installation is miss-configured.
Simply recompile and reconfigure it with proper options.

Note that mpif90 is basically a script shell around ifort. The use of mpif90 can be entirely by-passed: all you have provide is
(1) the correct path to include directory where mpif.h and mpi.mod are located, and
(2) correct library path and names of relevant libmpi* libraries.
where (1) is the only what is needed during compiling with -c phase;

P.S. Upgrade MPICH to version 1.4.1p1 -- it will give you much smoother ride, and you will not have
to bother with things like mpd.

abhisek.sac
Posts: 6
Joined: Fri Dec 31, 2010 4:25 pm
Location: ISRO

Re: problem while compiling inlet_test case

#3 Unread post by abhisek.sac »

Thanks for your prompt reply.
Actually I found there was a problem in linking the MCT with mpi libraries in the Compiler/Linux-ifort.mk. When I made a little modification regarding linking the "mct" and "mpue" libraries, I found the compilation was done successfully.

Now I am running the INLET_TEST case.

Hope to get future help from all of you.

Abhisek

robjenkinsiii
Posts: 34
Joined: Tue Jan 22, 2013 5:28 pm
Location: University of Delaware

Re: problem while compiling inlet_test case

#4 Unread post by robjenkinsiii »

Is there a possible work around for this? I attempting the same thing using openmpi and having the same error.

Code: Select all

ROMS/Bin/cpp_clean /lustre/work/kukulka_lab/rjenkins/projects/inlet_test/Build/mp_exchange.f90
cd /lustre/work/kukulka_lab/rjenkins/projects/inlet_test/Build; /opt/shared/openmpi/1.4.4-pgi/bin/mpif90 -c  -O3 -I/lustre/work/kukulka_lab/rjenkins/usr2/local2/include -I/opt/shared/openmpi/1.4.4-pgi/include -Mfree mp_exchange.f90
PGF90-S-0038-Symbol, mpi_proc_null, has not been explicitly declared (mp_exchange.f90)
  0 inform,   0 warnings,   1 severes, 0 fatal for tile_neighbors
make: *** [/lustre/work/kukulka_lab/rjenkins/projects/inlet_test/Build/mp_exchange.o] Error 2
I notice that the local installation of openmpi has mpif.h but MPI_PROC_NULL is not defined in this location as it is in the local MVAPICH2 installation.
Can I simply add this variable and define it in mpif.h?

Further, there is no mpi.mod file along with the local installation of openmpi, while there is for mvapich2. Is that to be expected or does that indicate the installation of openmpi was carried out incorrectly?

EDIT:

I should add a few notes.
1) I have successfully compiled and run ROMS multiple times using pgi & openmpi
2) I was able to configure/install the MCT using pgi & openmpi.
3) I have found that MPI_PROC_NULL is defined in mpif-common.h (=-2)

It seems to me the issue now is that I haven't properly linked to the openmpi/include directory yet I see no place in build.bash or linux-pgi.mk to do so.

Post Reply