Can you please verify which OS and PGI compier your using and what type of architecture your using?
I’m guessing your compiling a 64-bit binary but linking with a mpichf90 library built for a 32-bit Pentium 4 system. In this case, you’ll either need to recompile your MPICH library or compile your source in 32-bits (i.e. “-tp piv”).
OS: x86_64 Linux
PGI: Workstation 6.1
Architecture: AMD Opteron
I can’t say what the libmpichf90.a was originally built for as it came preinstalled.
It’s possible the p4 refers to a Pentium IV, but I think it’s because the mpich was built with the with-device=ch_p4 option. I would have to double check with the supplier who provided the machine to be sure.
Your right. The “p4” most likely refers to ch_p4 not Pentium 4. However, this type of error typically occurs when your trying to link a 32-bit library with a 64-bit application. Use the following command to determine what type of objects are in the library.
Looks like I’m wrong since the library is definately 64-bit. Maybe your compiling in 32-bits? What compile and link options are you using? What’s the output of “pgf90 -V” and “which pgf90”?
pgf90 6.1-5 64-bit target on x86-64 Linux
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2006, STMicroelectronics, Inc. All Rights Reserved.
[jgardner@master ~]$ which pgf90
/opt/pgi/linux86-64/6.1/bin/pgf90
What compile and link options are you using? In particular, I’m looking for the “-tp” option which indicates the target architecture. I’m wondering if you have inadvertently compiled in 32-bits using “-tp p6”, “-tp k8-32”, or other 32-bit architecture flag. You can also use “objdump -a” on your application’s objects to see if they are 32 or 64-bits.
If this isn’t it, then I’ll need to do some research since the only time I’ve ever seen this error is when I’ve tried to link 32 and 64-bit objects together.
I suffer the similar problem when I tried to use the mpif90 which is compiled by pgf95 to compile some f90 program.
Ths system feedback as following:
/home/hychuang/opt/mpich/pgi_sevrve/lib/libmpichf90.a(mpi2__ch_s.o)(.text+0x3f): In function mpi2__character_s_mpi_file_iread_t_': : undefined reference to mpi_file_iread_’
I checked my pgf95 version with pgf95 -V
The system feedback as : pgf95 6.2-5 64-bit target on x86-64 Linux
I checked pgf95 with command which pgf95
I got : ~/opt/pgi_sevrve/linux86-64/6.2/bin/pgf95
I used the command coredump -a on file libmpichf90.a and I got the message like Jgardner refered
But I don’t understand how to do the action that Jgardner mentioned.
Could anyone help me to solve it ?
I’ll very appreciate any suggestion.
jgardner’s issue was that he had compiled his MPICH library in 64-bits but was trying to link it with a 32-bit object. In your case, the linker can not find the symbol “mpi_file_iread_”. This symbol should be in the “libmpich.a” library so try the following:
Check that “/home/hychuang/opt/mpich/pgi_sevrve/lib/libmpich.a” exists and that it’s being added to the link line after libmpichf90.a. You can add “-v” (verbose) to the link line to see the exact options given to the linker.
If “libmpich.a” exists, determine if the symbol is in the library using the command: “nm libmpich.a | grep mpi_file_iread”. If nothing is printed, then you need to build ROMIO. Otherwise, note the number of underscores after the symbol name.
If the number of underscores is zero or two, then you need to reconfigure and rebuild your MPICH library using the configure option “-fortnames=FORTRANUNDRESCORE”.
It’s a great help of your reply, and I reconfigurated my MPICH with command as follow:
./configure --prefix=/home/hychuang/opt/mpich/pgi -cc=“gcc” -cflags=“-O”
-fc=“pgf77 -Mx,119,0x200000” -fflags=“-O” -f90=“pgf90 -Mx,119,0x200000” -f90flags=“-O” --with-romio -fortnames=FORTRANUNDRESCORE
Than I tried the command “nm libmpich.a | grep mpi_file_iread”, and I got the feedback as follow:
0000000000000000 W mpi_file_iread_
0000000000000000 T pmpi_file_iread_
0000000000000000 W mpi_file_iread_at_
0000000000000000 T pmpi_file_iread_at_
0000000000000000 W mpi_file_iread_shared_
0000000000000000 T pmpi_file_iread_shared_
And I can’t compile mpi program with mpif90 which is compiled by pgf90.
Should I try another MPI version? or I did something wrong?
Looks like I made a typo. It should be “-fortnames=FORTRANUNDERSCORE” not “-fortnames=FORTRANUNDRESCORE”.
However, the library is being compiled correctly. The problem is that your using the xbit “-Mx,129,0x2000000” which is documented as “-Msecond_underscore”. This flag appends a second underscore to fortran symbol names in order to match g77’s behavior. Try removing this flag, reconfigure and recompile.
Sorry, it seems have some problem.
I tried to executed the binary files compiled with PGI and MPICH.1.2.7,
some of them worked, but some of them give me the error message as following:
[0] MPI Abort by user Aborting program !
Initpm: Error in MPI_comm_rank -4294967296
[0] Aborting program!
p0_6250: p4_error: : 1
Could you give me any suggestion again?
I really appreciate your great help.