Help: About Intel Fortran Compiler calling mpich

Dan Kidger daniel.kidger at quadrics.com
Mon Oct 6 03:23:32 EDT 2003


Tom,
   this is the standard old chestnut about Fortran and trailing underscores on 
function names.

if you do say ' nm -a /opt/mpich-1.2.5/lib/libmpi.a |grep -i mpi_comm_rank' 
 I expect you will see  2 trailing underscores.  

Different Fortran vendors add a different number of underscores - some add 2 
by default (eg g77), some one (eg ifc), and some none. Sometimes there is a a 
compiler option to change this. 

There are three solutions to this issue:

1/ (Lazy option) recompile mpich several times; once with each Fortran 
compiler you have.
2/ Compile your application with the option that matches your prebuilt mpich 
(presumably 2 underscores - but note that ifc doesn't have an option for 
this)
3/ rebuild mpich with '-fno-second-underscore' (using say g77) . This is the 
common ground. You can link code to this with all current Fortran compilers.

You may also meet the 'mpi_getarg, x_argc' issue - this too is easy to fix.

-- 
Yours,
Daniel.

--------------------------------------------------------------
Dr. Dan Kidger, Quadrics Ltd.      daniel.kidger at quadrics.com
One Bridewell St., Bristol, BS1 2AA, UK         0117 915 5505
----------------------- www.quadrics.com --------------------

On Saturday 04 October 2003 5:00 pm, Ao Jiang wrote:
>   Hi, All:
>   I tried to compile a Fortran 90 MPI program by
> the Intel Frotran Compiler in the OSCAR cluster.
>   I run the command:
> "
> ifc -I /opt/mpich-1.2.5/include -Lmpi -w -Lm -o p_wg3 p_fdtd3dwg3_pml.f90
> "
>  The system failed to compile it and gave me the following information:
> "
>    module EHFIELD
>    program FDTD3DPML
>    external function RISEF
>    external function WINDOWFUNCTION
>    external function SIGMA
>    external function GETISTART
>    external function GETIEND
>    external subroutine COM_EYZ
>    external subroutine COM_EYX
>    external subroutine COM_EZX
>    external subroutine COM_EZY
>    external subroutine COM_HYZ
>    external subroutine COM_HYX
>    external subroutine COM_HZX
>    external subroutine COM_HZY
>
> 3228 Lines Compiled
>
> /tmp/ifcVao851.o(.text+0x5a): In function `main':
> : undefined reference to `mpi_init_'
>
> /tmp/ifcVao851.o(.text+0x6e): In function `main':
> : undefined reference to `mpi_comm_rank_'
>
> /tmp/ifcVao851.o(.text+0x82): In function `main':
> : undefined reference to `mpi_comm_size_'
>
> /tmp/ifcVao851.o(.text+0xab): In function `main':
> : undefined reference to `mpi_wtime_'
>
> /tmp/ifcVao851.o(.text+0x422): In function `main':
> : undefined reference to `mpi_bcast_'
>
> /tmp/ifcVao851.o(.text+0x448): In function `main':
> : undefined reference to `mpi_bcast_'
>
> /tmp/ifcVao851.o(.text+0x47b): In function `main':
> : undefined reference to `mpi_bcast_'
>
> /tmp/ifcVao851.o(.text+0x49e): In function `main':
> : undefined reference to `mpi_bcast_'
>
> /tmp/ifcVao851.o(.text+0x4c1): In function `main':
> : undefined reference to `mpi_bcast_'
>
> /tmp/ifcVao851.o(.text+0x4e7): more undefined references to `mpi_bcast_'
> follow
>
> /tmp/ifcVao851.o(.text+0x24511): In function `com_hzy_':
> : undefined reference to `mpi_recv_'
>
> /tmp/ifcVao851.o(.text+0x24b76): In function `com_hzy_':
> : undefined reference to `mpi_send_'
>
> "
>
> At the same time, I tried the same program in the other scyld cluster,
> using NAG compiler.
>
> I use command:
> "
> f95 -I/usr/include -lmpi -lm -o p_wg3 p_fdtd3dwg3.f90
> "
>
> It works fine. So that means my fortran program in fine.
>
> Both of the cluster use the MPICH implementation.
>
> But because I have to work on that OSCAR cluster with Intel compiler,
> I wonder
> 1. why the errors happen?
> 2. Is the problem of cluster or the Intel compiler?
> 3. How I can solve it.
>
> I know there are a lot of guy with experience and experts of cluster and
> MPI in this mailing list. I appreciate your suggestion and advice from
> you.
>
> Thanks.
>
> Tom
>
>
>
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org
> To change your subscription (digest mode or unsubscribe) visit
> http://www.beowulf.org/mailman/listinfo/beowulf





_______________________________________________
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf



More information about the Beowulf mailing list