Problem with CDK 6.0 pgcc - undefined reference to `getarg_'

Dear All,

I have installed PGI CDK 6.0 on ROCKS 3.3.0 cluster. To verify the installation, I tested the ./bench/mpihello samples in the PGI directory.

I found pgf77 works fine with the mpi samples.
pgf77 -o mpihello mpihello.f -Mmpi
mpirun -np 8 mpihello

But pgcc can’t work with the sample.
pgcc -o myname myname.c -Mmpi
it returns
/usr/pgi/linux86-64/6.0/lib/libfmpich.so: undefined reference togetarg_' /usr/pgi/linux86-64/6.0/lib/libfmpich.so: undefined reference to iargc_’

I have tested pgcc with some other mpi applications, and these c applications have the same problem.

Did anyone else experience the same issue with me? Any ideas about this problem.

Thanks in advance.

Best Regards
Bill Xie

Hi Bill,

Since the MPICH that comes with the CDK was built with pgf90, when you compile with pgcc you need to add “-pgf90libs” so that the pgf90 libraries are passed to the linker.

Thanks,
Mat