PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

mpich compiling error
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
hlzya



Joined: 28 Apr 2006
Posts: 17

PostPosted: Wed Aug 15, 2007 8:32 pm    Post subject: mpich compiling error Reply with quote

Hi,

I have followed the guide in the PGI official site (http://www.pgroup.com/resources/mpich/mpich126_pgi60.htm) to compile mpich-1.2.7p1 with pgi-6.1.6. And the mentioned "MPICH 64-bit Patch" is also added to the source code. My configure is

env CFLAGS="-fast -DFIX_PTR_153_1_3800" CXXFLAGS="-fast" FFLAGS="-fast" F90FLAGS="-fast" LDFLAGS="-fast" OPTFLAGS="-fast" CC="pgcc" CXX="pgCC" F90="pgf90" FC="pgf77" CPP="pgCC -E" ./configure --prefix=/home/vasp/opt/mpich-1.2.7p1

However, when I type "make", the below error occurs:

Making Fortran interface
pgcc -I. -I/home/vasp/soft/mpich-1.2.7p1/src/fortran/src -I../include -I/home/vasp/soft/mpich-1.2.7p1/src/fortran/include -I.. -I/home/vasp/soft/mpich-1.2.7p1/include -I/home/vasp/soft/mpich-1.2.7p1/include -I/home/vasp/soft/mpich-1.2.7p1/mpid/ch_p4 -I/home/vasp/soft/mpich-1.2.7p1/mpid/util -fast -DFIX_PTR_153_1_3800 -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR -DHAVE_MPICHCONF_H -c abortf.c
pgcc -I. -I/home/vasp/soft/mpich-1.2.7p1/src/fortran/src -I../include -I/home/vasp/soft/mpich-1.2.7p1/src/fortran/include -I.. -I/home/vasp/soft/mpich-1.2.7p1/include -I/home/vasp/soft/mpich-1.2.7p1/include -I/home/vasp/soft/mpich-1.2.7p1/mpid/ch_p4 -I/home/vasp/soft/mpich-1.2.7p1/mpid/util -fast -DFIX_PTR_153_1_3800 -DUSE_SOCKLEN_T -DUSE_U_INT_FOR_XDR -DHAVE_MPICHCONF_H -c addressf.c
PGC-S-0035-Syntax error: Recovery attempted by replacing '/' by double 0.00000000000000000E+0 (addressf.c: 230)
PGC-W-0155-Long value is passed to a nonprototyped function - argument #2 (addressf.c: 230)
PGC-W-0155-Long value is passed to a nonprototyped function - argument #4 (addressf.c: 230)
PGC-S-0035-Syntax error: Recovery attempted by replacing '/' by double 0.00000000000000000E+0 (addressf.c: 254)
PGC-W-0155-Long value is passed to a nonprototyped function - argument #2 (addressf.c: 254)
PGC/x86-64 Linux/x86-64 6.1-6: compilation completed with severe errors
make[3]: *** [addressf.o] Error 2
make[2]: *** [flibs] Error 2
make[1]: *** [mpi-modules] Error 1
make: *** [mpi] Error 2

Can anybody help me?

Thanks in advance.

Yi-An
Back to top
View user's profile
hongyon



Joined: 19 Jul 2004
Posts: 551

PostPosted: Thu Aug 16, 2007 11:22 am    Post subject: Reply with quote

Hi Yi-An,

The patch is for mpich1.2.6 only. Note that the content of those 3 files have been changed quite a bit in 1.2.7p1. Should you remove the patch, it would compile just fine. We will update the web page for 1.2.7patch as soon as it is available.

In case, you would like to compile with MPICH1.2.6, the error is caused by the patch file having /*, */ as comment in C file. Adding -B to your CFLAGS should eliminate the error.

Hongyon
Back to top
View user's profile
hlzya



Joined: 28 Apr 2006
Posts: 17

PostPosted: Fri Aug 17, 2007 3:15 am    Post subject: Reply with quote

Hi, Hongyon

Thank you very much for your reply.

I followed your advice and it works. I can compile mpich-1.2.6 with no errors (use patchs your site provides). The configure is

env CFLAGS="-fast -DFIX_PTR_153_1_3800 -B" CXXFLAGS="-fast" FFLAGS="-fast" F90FLAGS="-fast" LDFLAGS="-fast" OPTFLAGS="-fast" CC="pgcc" CXX="pgCC" F90="pgf90" FC="pgf77" CPP="pgCC -E" LIB="-L/home/vasp/opt/pgi/linux86-64/6.1/lib -lpgf90 -lpgf90rtl -lpgftnrtl -lpgc" ./configure --prefix=/home/vasp/opt/mpich-1.2.6

However, when I compile BLACS (use pgf77 and pgcc) and then Scalapack (mpif90 and mpicc), the below errors occur:

mpicc -o /home/vasp/lib/scalapack-1.7.5-pgi/TESTING/xigemr pigemrdrv.o /home/vasp/lib/scalapack-1.7.5-pgi/libscalapack.a /home/vasp/lib/BLACS-pgi/LIB/blacsCinit_MPI-LINUX-0.a /home/vasp/lib/BLACS-pgi/LIB/blacs_MPI-LINUX-0.a /home/vasp/lib/BLACS-pgi/LIB/blacsCinit_MPI-LINUX-0.a /home/vasp/opt/mpich-1.2.6/lib/libmpich.a
/home/vasp/lib/BLACS-pgi/LIB/blacs_MPI-LINUX-0.a(igamn2d_.C)(.text+0x267): In function `Cigamn2d':
: undefined reference to `__c_mset2'
/home/vasp/lib/BLACS-pgi/LIB/blacs_MPI-LINUX-0.a(BI_imvcopy.o)(.text+0x4f): In function `BI_imvcopy':
: undefined reference to `__c_mcopy4'
/home/vasp/lib/BLACS-pgi/LIB/blacs_MPI-LINUX-0.a(BI_imvcopy.o)(.text+0xf0): In function `BI_imvcopy':
: undefined reference to `__c_mcopy4'
/home/vasp/lib/BLACS-pgi/LIB/blacs_MPI-LINUX-0.a(BI_ivmcopy.o)(.text+0x4f): In function `BI_ivmcopy':
: undefined reference to `__c_mcopy4'
/home/vasp/lib/BLACS-pgi/LIB/blacs_MPI-LINUX-0.a(BI_ivmcopy.o)(.text+0xf0): In function `BI_ivmcopy':
: undefined reference to `__c_mcopy4'
/home/vasp/opt/mpich-1.2.6/lib/libmpich.a(mperror.o)(.text+0xbe): In function `MPIR_Errors_are_fatal':
: undefined reference to `__builtin_va_gparg1'
/home/vasp/opt/mpich-1.2.6/lib/libmpich.a(mperror.o)(.text+0xce): In function `MPIR_Errors_are_fatal':
: undefined reference to `__builtin_va_gparg1'
/home/vasp/opt/mpich-1.2.6/lib/libmpich.a(mperror.o)(.text+0xde): In function `MPIR_Errors_are_fatal':
: undefined reference to `__builtin_va_gparg1'
/home/vasp/opt/mpich-1.2.6/lib/libmpich.a(mperror.o)(.text+0x25b): In function `MPIR_Errors_warn':
: undefined reference to `__builtin_va_gparg1'
/home/vasp/opt/mpich-1.2.6/lib/libmpich.a(mperror.o)(.text+0x26b): In function `MPIR_Errors_warn':
: undefined reference to `__builtin_va_gparg1'
/home/vasp/opt/mpich-1.2.6/lib/libmpich.a(mperror.o)(.text+0x27b): more undefined references to `__builtin_va_gparg1' follow
/home/vasp/opt/mpich-1.2.6/lib/libmpich.a(ptrcvt.o)(.text+0xfe): In function `MPIR_InitPointer':
: undefined reference to `__c_mzero8'
/home/vasp/opt/mpich-1.2.6/lib/libmpich.a(p4_utils.o)(.text+0x1906): In function `p4_usclock':
: undefined reference to `__mth_i_dfloatuk'
/home/vasp/opt/mpich-1.2.6/lib/libmpich.a(p4_utils.o)(.text+0x1914): In function `p4_usclock':
: undefined reference to `__mth_i_dfloatuk'
/home/vasp/opt/mpich-1.2.6/lib/libmpich.a(p4_utils.o)(.text+0x1926): In function `p4_usclock':
: undefined reference to `__mth_i_dfloatuk'
/home/vasp/opt/mpich-1.2.6/lib/libmpich.a(debugutil.o)(.data+0x58): undefined reference to `__pgdbg_stub'
/home/vasp/opt/mpich-1.2.6/lib/libmpich.a(p4_alloc.o)(.text+0x797): In function `alloc_global':
: undefined reference to `__c_mset4'
collect2: ld returned 1 exit status
mpicc: No such file or directory
make[1]: *** [/home/vasp/lib/scalapack-1.7.5-pgi/TESTING/xigemr] Error 1
make[1]: Leaving directory `/home/vasp/lib/scalapack-1.7.5-pgi/REDIST/TESTING'
make: *** [redistexe] Error 2

I have also tried compiling scalapack with mpif77, but more errors occur. Can you help me?

Thanks a lot.

Yi-An
Back to top
View user's profile
hongyon



Joined: 19 Jul 2004
Posts: 551

PostPosted: Fri Aug 17, 2007 11:57 am    Post subject: Reply with quote

Yi-An,

Can you add -v to your mpicc command and send us the output? __c_mcopy's are in libpgc.a and it should find them if your mpicc use pgcc.

For example,
mpicc -v -o /home/vasp/lib/scalapack-1.7.5-pgi/TESTING/xigemr pigemrdrv.o /home/vasp/lib/scalapack-1.7.5-pgi/libscalapack.a /home/vasp/lib/BLACS-pgi/LIB/blacsCinit_MPI-LINUX-0.a /home/vasp/lib/BLACS-pgi/LIB/blacs_MPI-LINUX-0.a /home/vasp/lib/BLACS-pgi/LIB/blacsCinit_MPI-LINUX-0.a /home/vasp/opt/mpich-1.2.6/lib/libmpich.a

Hongyon
Back to top
View user's profile
hlzya



Joined: 28 Apr 2006
Posts: 17

PostPosted: Fri Aug 17, 2007 8:25 pm    Post subject: Reply with quote

Hi, hongyon,

Thank you.

I followed your suggestion and found I had been using the wrong "mpicc" command which is compiled by gcc in my system by default. I am sorry for that.

After I used the right "mpicc" and "mpif77", the scalapack can be compiled with no errors. However, when I type "make exe" to create the test executable, the below errors occur:

/home/vasp/opt/mpich-1.2.6/bin/mpif77 -o /home/vasp/lib/scalapack-1.7.5-pgi/TESTING/xssep psseptst.o pssepsubtst.o pssepchk.o pssepqtq.o pslagsy.o pslatms.o pslasizesep.o pslasizesyevx.o pssepdriver.o pssepreq.o pssepinfo.o pslasizesyev.o pssqpsubtst.o pslasizesqp.o pssdpsubtst.o psmatgen.o pmatgeninc.o /home/vasp/lib/scalapack-1.7.5-pgi/libscalapack.a /home/vasp/lib/BLACS-pgi/LIB/blacsF77init_MPI-LINUX-0.a /home/vasp/lib/BLACS-pgi/LIB/blacs_MPI-LINUX-0.a /home/vasp/lib/BLACS-pgi/LIB/blacsF77init_MPI-LINUX-0.a /home/vasp/lib/BLACS-pgi/LIB/blacsCinit_MPI-LINUX-0.a /home/vasp/lib/BLACS-pgi/LIB/blacs_MPI-LINUX-0.a /home/vasp/lib/BLACS-pgi/LIB/blacsCinit_MPI-LINUX-0.a /home/vasp/lib/libblas.a /home/vasp/opt/mpich-1.2.6/lib/libmpich.a
/home/vasp/lib/scalapack-1.7.5-pgi/libscalapack.a(pssyev.o)(.text+0xd5f): In function `pssyev_':
: undefined reference to `psgemr2d_'
/home/vasp/lib/scalapack-1.7.5-pgi/libscalapack.a(pssyntrd.o)(.text+0x6ad): In function `pssyntrd_':
: undefined reference to `pstrmr2d_'
/home/vasp/lib/scalapack-1.7.5-pgi/libscalapack.a(pssyntrd.o)(.text+0x8e5): In function `pssyntrd_':
: undefined reference to `pstrmr2d_'
/home/vasp/lib/scalapack-1.7.5-pgi/libscalapack.a(pslamr1d.o)(.text+0xe0): In function `pslamr1d_':
: undefined reference to `psgemr2d_'
make[1]: *** [/home/vasp/lib/scalapack-1.7.5-pgi/TESTING/xssep] Error 2
make[1]: Leaving directory `/home/vasp/lib/scalapack-1.7.5-pgi/TESTING/EIG'
make: *** [scalapackexe] Error 2

Any suggestions?

Thank you very much for your kind attention.

Yi-An
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group