Best way to run makelocalrc for PGI CDK ?

Hi,

I’ve checked both:

http://www.pgroup.com/doc/pgicdkrn.pdf
http://www.pgroup.com/doc/pgicdkinstall.pdf

and there’s no mention in these documents of localrc or makelocalrc.

I am trying to verify that my PGI CDK localrc is correct. I asked the installer to install both mpich and mpich2. However, when I follow the instructions for the CDK Install Guide, Section 4.1.2, Step 2 I get a simple “Can’t find include file” error. The compiler complains that it cannot find mpif.h

[user@server mpitest]$ pgf90 -o mpihello_mpich -g -Mmpi=mpich1 mpihello.f
PGF90-S-0017-Unable to open include file: mpif.h (mpihello.f: 2)
0 inform, 0 warnings, 1 severes, 0 fatal for hello
[user@server mpitest]$

How can I verify that my localrc file is correct? Are there examples of CDK localrc files where the PGI version of mpich/mpich is installed? If it’s documented somewhere, please let me know.

Thanks,
Phil

Hi,

There are errors in pgicdkinstall.pdf, page 19-21, Step 5: Make the products available, setting path for mpich and its man pages are switched.

Setting the path for PGI compilers and MPICH1 64-bit should be:

For csh:

% set path = (/opt/pgi/linux86-64/7.1/bin $path)
% set path =
(/opt/pgi/linux86-64/7.1/mpi/mpich/bin $path)

We will fix it as soon as possible. Thanks for reporting the problem.

Running mpi tests is a way to check if the installation is correctly creating localrc. No we don’t have example of localrc, each OS will give different localrc.

Hongyon

Hongyon,

Thanks for the reply. I guess my question now becomes “How can I be sure I ran makelocalrc correctly?” Since localrc and makelocalrc are not found in either of the CDK documents, and the CDK is the product I purchased, how can I validate/verify the steps I took?

My install is obviously broken yet I do not know how to fix it because I can’t find any reference to makelocalrc in the CDK documentation.

I need to know:

  • how to tell PGI where its own and where PGI’s release of mpi include files are
  • how to tell PGI where its libraries are (and where PGI’s release of mpi libraries are)

Here is the contents of /pgi/linux86:

[root@server linux86]# ls -la
total 20
dr-xr-xr-x  5 root root 4096 Mar 27 17:26 .
drwxr-xr-x  3 root root 4096 Mar 27 17:23 ..
dr-xr-xr-x  6 root root 4096 Mar 27 17:20 7.1
dr-xr-xr-x 26 root root 4096 Feb 14 17:58 7.1-5
dr-xr-xr-x 13 root root 4096 Mar 27 18:51 7.1-6
lrwxrwxrwx  1 root root    7 Mar 27 17:26 latest -> ./7.1-6
[root@server linux86]# pwd
/pgi/linux86
[root@server linux86]#

My PGI bin directory is:
/pgi/linux86/latest/bin

My MPI directory is:
/pgi/linux86/latest/mpi/mpich

My localrc is shown below:

[root@server bin]# more localrc
set LFC=-lgfortran;
set LDSO=/lib/ld-linux.so.2;
set GCCDIR=/usr/lib/gcc/i386-redhat-linux/4.1.2;
set GCCINC=/usr/lib/gcc/i386-redhat-linux/4.1.2/include;
set G77DIR=/usr/lib/gcc/i386-redhat-linux/4.1.2/;
set OEM_INFO=32-bit target on x86 Linux $INFOTPVAL;
set LOCALRC=YES;
set THROW=__THROW=;
set EXTENSION=__extension__=;
set LC=$if(-Bstatic,-lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc, -lgcc -lc -lgcc);
set HAMMER=;
set X86_64=;
# GLIBC version 2.5
# GCC version 4.1.2
export PGI=/pgi;
# makelocalrc executed by root Thu Mar 27 19:12:08

Again, I do not know how to tell if the above localrc is sane.

What is broken with my install is that PGI cannot find simple items such as mpif.h and complains about mpi libraries not found. I can post specific errors if needed.

Thanks,
Phil

Hi,

From localrc you provided and information of MPICH directory:

It looks like you either compile your own MPICH and put it in latest/mpi/mpich? Normally if you install from our CDK package, it will put mpi in $PGI/linux86*/7.1/mpi*/mpich directory and installcdk script all makelocalrc and set MPI*DIR in localrc.

For example, assuming you install in /opt/pgi and choose only MPICH1 to install, localrc should have set a line below at the end of a file.

set MPIDIR=/opt/pgi/linux86-64/7.1/mpi/mpich;

Then you need to set an environment PGI=/opt/pgi and set PATH to compilers directory and MPI bin directory:

I am not sure which file you download from our website, Workstation, Server, or CDK packages? CDK will have prebuilt MPI/MPI2/MVAPICH libraries.

Please contact trs@pgroup.com for prompt response and how to fix the problem.

Hongyon

From talking with support, I reran the installation and it cleared it up. To answer my own question:

set MPIDIR=/pgi/linux86/7.1/mpi/mpich;
export PGI=/pgi

the above two lines were missing from my original localrc.

Phil