pgi 6.3-2 - using under multiple versions of linux

We are using Suse 9.3 pro on our workstations and have a number of other linux devices running SLES 9. We used to be able to modify our localrc with the following code to support multiple operating systems :

set GCCDIR = $if($equal($VENDOR, suse), /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3)
$if($equal($VENDOR, suse91), /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3)
$if($equal($VENDOR, suse93), /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5);
set GCCINC = $if($equal($VENDOR, suse), /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/include)
$if($equal($VENDOR, suse91), /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/include)
$if($equal($VENDOR, suse93), /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/include);
set G77DIR = $if($equal($VENDOR, suse), /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3)
$if($equal($VENDOR, suse91), /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3)
$if($equal($VENDOR, suse93), /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5);

I believe we found this solution on the forum in the past.
We set the environment variable PGI_VENDOR and it would set the G77DIR, GCCDIR and GCCINC correctly. Unfortunately this does not seem to work for 6.2-3. Is there a way to setup 6.2-3 to support multiple versions of linux??

I think there may be another line missing, to set the value of VENDOR; something like

variable VENDOR is environment(PGI_VENDOR);

to make the connection between $VENDOR and the environment variable PGI_VENDOR. If this doesn’t work, please send the output of
% printenv
and
% pgcc -show
thanks

Also, as of 6.1 or later, you can put all of these lines into a file ‘siterc’ in the same directory, which doesn’t get clobbered by any updates, and could then be copied between installations (without having to edit the changes into the localrc file).

-Michael Wolfe

Another solution, which may not be workable for your installation, is to have host-specific siterc files. If you look at the output of ‘pgcc -dryrun a.c’, you’ll see a line like:
Skipping siterc.wolfe (not found)
where ‘wolfe’ is the hostname of the machine I’m running on. You can create a ‘siterc’ file for each of your hosts,
siterc.foo
siterc.bar
siterc.sys
and include the appropriate settings for that host in that file:
set GCCDIR=/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3;
set GCCINC=…;
set G77DIR=…;
This might be a little unwieldy if there are many hosts, however.

It sounds like you might be doing what we are calling a ‘network install’, that is, one installation, one copy of the /opt/pgi installation, shared by many hosts with slightly different OS versions on each. We have been working on an install procedure to standardize this, hopefully it will be ready for our next major release; it may make this problem much simpler.

  • Michael Wolfe

Michael,

Thanx, everything is now resolved. Another question though. I have been using the following method to update pgi versions. I will install the latest version (lets say pgi-6.2-3) into a temporary directory, install the mpich_kit and then move the current pgi directory (eg. /usr/pgi/linux86-64/6.2 into /usr/pgi/linux86-64/6.2.bak, then copying the temporary 6.2 there and adjusting the paths in the mpi stuff. Should the installer be able to do an inplace update of an pgi version (eg. 6.2-3 to 6.2-4) in the 6.2 directory.

Thanx,

Bernie Borenstein
The Boeing Company