Hi mwolfe,
thanks for looking into the problem. Your test with a simple symbolic link also worked for me. Our situation is a little more complex. We install the PGI compilers to:
/usr/local/stow/PGI/share/pgi
and use ‘stow’ to manage the mapping into /usr/local, i.e. everything under
/usr/local/stow/PGI is mapped to the corresponding location under /usr/local
and we set PGI=/usr/local/share/pgi . Our full setup is therefore:
ls -l /usr/local/stow/PGI
lrwxrwxrwx 1 root root 25 Nov 24 15:05 bin → share/pgi/linux86/6.0/bin
drwxr-xr-x 2 root root 4096 Nov 24 15:06 doc
drwxr-xr-x 2 root root 4096 Nov 24 15:06 include
lrwxrwxrwx 1 root root 25 Nov 24 15:05 lib → share/pgi/linux86/6.0/lib
lrwxrwxrwx 1 root root 25 Nov 24 15:05 man → share/pgi/linux86/6.0/man
drwxr-xr-x 5 root root 4096 Nov 24 15:08 share
ls -l /usr/local/stow/PGI/include
lrwxrwxrwx 1 root root 32 Nov 24 15:06 pgi → …/share/pgi/linux86/6.0/include
That way the most recent binaries, libraries, etc. are mapped into the standard locations underneath /usr/local , e.g.
ls -l /usr/local/bin/pgf90
lrwxrwxrwx 1 root root 21 Nov 24 15:09 /usr/local/bin/pgf90 → …/stow/PGI/bin/pgf90
Here is the additional information you requested:
ls -l /usr/local/bin/pg*
lrwxrwxrwx 1 root root 20 Nov 24 15:09 /usr/local/bin/pgCC → …/stow/PGI/bin/pgCC
lrwxrwxrwx 1 root root 24 Nov 24 15:09 /usr/local/bin/pgappend → …/stow/PGI/bin/pgappend
lrwxrwxrwx 1 root root 19 Nov 24 15:09 /usr/local/bin/pgc → …/stow/PGI/bin/pgc
lrwxrwxrwx 1 root root 22 Nov 24 15:09 /usr/local/bin/pgc_ex → …/stow/PGI/bin/pgc_ex
lrwxrwxrwx 1 root root 20 Nov 24 15:09 /usr/local/bin/pgcc → …/stow/PGI/bin/pgcc
lrwxrwxrwx 1 root root 22 Nov 24 15:09 /usr/local/bin/pgcpp1 → …/stow/PGI/bin/pgcpp1
lrwxrwxrwx 1 root root 22 Nov 24 15:09 /usr/local/bin/pgcpp2 → …/stow/PGI/bin/pgcpp2
lrwxrwxrwx 1 root root 24 Nov 24 15:09 /usr/local/bin/pgcpp2ex → …/stow/PGI/bin/pgcpp2ex
lrwxrwxrwx 1 root root 21 Nov 24 15:09 /usr/local/bin/pgdbg → …/stow/PGI/bin/pgdbg
lrwxrwxrwx 1 root root 22 Nov 24 15:09 /usr/local/bin/pgdbg1 → …/stow/PGI/bin/pgdbg1
lrwxrwxrwx 1 root root 23 Nov 24 15:09 /usr/local/bin/pgdebug → …/stow/PGI/bin/pgdebug
lrwxrwxrwx 1 root root 24 Nov 24 15:09 /usr/local/bin/pgdecode → …/stow/PGI/bin/pgdecode
lrwxrwxrwx 1 root root 25 Nov 24 15:09 /usr/local/bin/pgextract → …/stow/PGI/bin/pgextract
lrwxrwxrwx 1 root root 21 Nov 24 15:09 /usr/local/bin/pgf77 → …/stow/PGI/bin/pgf77
lrwxrwxrwx 1 root root 23 Nov 24 15:09 /usr/local/bin/pgf77rc → …/stow/PGI/bin/pgf77rc
lrwxrwxrwx 1 root root 21 Nov 24 15:09 /usr/local/bin/pgf90 → …/stow/PGI/bin/pgf90
lrwxrwxrwx 1 root root 22 Nov 24 15:09 /usr/local/bin/pgf901 → …/stow/PGI/bin/pgf901
lrwxrwxrwx 1 root root 22 Nov 24 15:09 /usr/local/bin/pgf902 → …/stow/PGI/bin/pgf902
lrwxrwxrwx 1 root root 24 Nov 24 15:09 /usr/local/bin/pgf90_ex → …/stow/PGI/bin/pgf90_ex
lrwxrwxrwx 1 root root 23 Nov 24 15:09 /usr/local/bin/pgf90rc → …/stow/PGI/bin/pgf90rc
lrwxrwxrwx 1 root root 21 Nov 24 15:09 /usr/local/bin/pgf95 → …/stow/PGI/bin/pgf95
lrwxrwxrwx 1 root root 21 Nov 24 15:09 /usr/local/bin/pgftn → …/stow/PGI/bin/pgftn
lrwxrwxrwx 1 root root 24 Nov 24 15:09 /usr/local/bin/pgftn_ex → …/stow/PGI/bin/pgftn_ex
lrwxrwxrwx 1 root root 23 Nov 24 15:09 /usr/local/bin/pgftnrc → …/stow/PGI/bin/pgftnrc
lrwxrwxrwx 1 root root 24 Nov 24 15:09 /usr/local/bin/pghostid → …/stow/PGI/bin/pghostid
lrwxrwxrwx 1 root root 21 Nov 24 15:09 /usr/local/bin/pghpf → …/stow/PGI/bin/pghpf
lrwxrwxrwx 1 root root 22 Nov 24 15:09 /usr/local/bin/pghpf1 → …/stow/PGI/bin/pghpf1
lrwxrwxrwx 1 root root 25 Nov 24 15:09 /usr/local/bin/pghpf1_ex → …/stow/PGI/bin/pghpf1_ex
lrwxrwxrwx 1 root root 22 Nov 24 15:09 /usr/local/bin/pghpf2 → …/stow/PGI/bin/pghpf2
lrwxrwxrwx 1 root root 23 Nov 24 15:09 /usr/local/bin/pghpfrc → …/stow/PGI/bin/pghpfrc
lrwxrwxrwx 1 root root 21 Nov 24 15:09 /usr/local/bin/pgipa → …/stow/PGI/bin/pgipa
lrwxrwxrwx 1 root root 25 Nov 24 15:09 /usr/local/bin/pglicinfo → …/stow/PGI/bin/pglicinfo
lrwxrwxrwx 1 root root 24 Nov 24 15:09 /usr/local/bin/pgprepro → …/stow/PGI/bin/pgprepro
lrwxrwxrwx 1 root root 22 Nov 24 15:09 /usr/local/bin/pgprof → …/stow/PGI/bin/pgprof
lrwxrwxrwx 1 root root 23 Nov 24 15:09 /usr/local/bin/pgroupd → …/stow/PGI/bin/pgroupd
lrwxrwxrwx 1 root root 22 Nov 24 15:09 /usr/local/bin/pgserv → …/stow/PGI/bin/pgserv
lrwxrwxrwx 1 root root 22 Nov 24 15:09 /usr/local/bin/pgsize → …/stow/PGI/bin/pgsize
lrwxrwxrwx 1 root root 23 Nov 24 15:09 /usr/local/bin/pgsmart → …/stow/PGI/bin/pgsmart
pgf90 -dryrun a.f
Reading rcfile /usr/local/bin/.pgf90rc
Reading rcfile /usr/local/bin/nativerc
Reading rcfile /usr/local/bin/fnativerc
Reading rcfile /usr/local/bin/x86rc
Reading rcfile /usr/local/bin/x8664rc
Reading rcfile /usr/local/bin/lin86rc
Reading rcfile /usr/local/bin/lin8664rc
Reading rcfile /usr/local/bin/iparc
Reading rcfile /usr/local/bin/pgf90rc
Reading rcfile /usr/local/bin/pgftnrc
Reading rcfile /usr/local/bin/localrc
Skipping siterc (not found)
Skipping .mypgf90rc (not found)
/usr/local/bin/pgf901 a.f -opt 1 -terse 1 -inform warn -nohpf -nostatic -x 19 0400000 -quad -x 59 4 -x 15 2 -x 49 0x400004 -x 51 0x20 -x 57 0x4c -x 58 0x10000-x 124 0x1000 -x 57 0xfb0000 -x 58 0x78031040 -x 48 4608 -x 49 0x100 -x 120 0x20 -stdinc /usr/local/include:/usr/local/include:/usr/lib/gcc-lib/x86_64-linux/33.5/include:/usr/lib/gcc-lib/x86_64-linux/3.3.5/include:/usr/include -def unix def __unix -def unix -def linux -def __linux -def linux -def inline -def NO_INLINE -def __NO_MATH_INLINES -def x86_64 -def LONG_MAX=923372036854775807L -def ‘SIZE_TYPE=unsigned long int’ -def ‘__PTRDIFF_TYPE__long int’ -def __THROW= -def amd64 -nofreeform -vect 48 -output /scratch/sceurer/pgf90aaaaaFoiaj.ilm
/usr/local/bin/pgf902 /scratch/scheurer/pgf90aaaaaFoiaj.ilm -fn a.f -opt 1 -tere 1 -inform warn -x 51 0x20 -x 119 0xa10000 -x 122 0x40 -x 123 0x1000 -x 127 4 x 19 0x400000 -quad -x 120 0x80000000 -x 59 4 -y 80 0x1000 -x 80 0x10800000 -x 24 0x1400 -y 15 2 -y 80 0x1000 -x 80 0x10800000 -x 57 0x3b0000 -x 58 0x48000000-x 49 0x100 -x 120 0x200 -astype 0 -x 124 1 -asm /scratch/scheurer/pgf90baaaaFoaj.s
/usr/bin/as /scratch/scheurer/pgf90baaaaFoiaj.s -o /scratch/scheurer/pgf90caaaaoiaj.o
/usr/bin/ld /usr/lib64/crt1.o /usr/lib64/crti.o /usr/lib/gcc-lib/x86_64-linux/33.5/crtbegin.o /usr/local/lib/f90main.o -m elf_x86_64 -dynamic-linker /lib64/ldlinux-x86-64.so.2 /scratch/scheurer/pgf90caaaaFoiaj.o -L/usr/local/lib -L/usr/lb64 -L/usr/lib/gcc-lib/x86_64-linux/3.3.5 -rpath /usr/local/lib -lpgf90 -lpgf90rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lc -lnspgc -lpgc -lm -lgcc -lc -lgcc /usr/ib/gcc-lib/x86_64-linux/3.3.5/crtend.o /usr/lib64/crtn.o
Unlinking /scratch/scheurer/pgf90aaaaaFoiaj.ilm
Unlinking /scratch/scheurer/pgf90aaaaaFoiaj.dbg
Unlinking /scratch/scheurer/pgf90baaaaFoiaj.s
Unlinking /scratch/scheurer/pgf90caaaaFoiaj.o
pgf90 -dryrun -tp k8-32 a.f
Reading rcfile /usr/local/bin/.pgf90rc
Reading rcfile /usr/local/bin/nativerc
Reading rcfile /usr/local/bin/fnativerc
Reading rcfile /usr/local/bin/x86rc
Reading rcfile /usr/local/bin/x8664rc
Reading rcfile /usr/local/bin/lin86rc
Reading rcfile /usr/local/bin/lin8664rc
Reading rcfile /usr/local/bin/iparc
Reading rcfile /usr/local/bin/pgf90rc
Reading rcfile /usr/local/bin/pgftnrc
Reading rcfile /usr/local/bin/localrc
Skipping siterc (not found)
Skipping .mypgf90rc (not found)
pgf90-Error–tp k8-32 not supported in this installation
cat $PGI/linux86-64/6.0/bin/localrc
set LFC=-lg2c;
set LDSO=/lib64/ld-linux-x86-64.so.2;
set GCCDIR=/usr/lib/gcc-lib/x86_64-linux/3.3.5;
set GCCINC=/usr/lib/gcc-lib/x86_64-linux/3.3.5/include;
set G77DIR=/usr/lib/gcc-lib/x86_64-linux/3.3.5;
set THROW=__THROW=;
makelocalrc executed by root Fri Oct 14 19:55:11
cat $PGI/linux86/6.0/bin/localrc
set LFC=-lg2c;
set LDSO=/lib/ld-linux.so.2;
set GCCDIR=/usr/lib/gcc-lib/x86_64-linux/3.3.5/32;
set GCCINC=/usr/lib/gcc-lib/x86_64-linux/3.3.5/include;
set G77DIR=/usr/lib/gcc-lib/x86_64-linux/3.3.5/32;
set THROW=__THROW=;
set DEFLIBDIR=/usr/lib;
set DEFSTDOBJDIR=/usr/lib;
set EXTRAASARGS=–32;
makelocalrc executed by root Fri Oct 14 19:55:11
For comparison, this is the output if I specify the path explicitly:
$PGI/linux86-64/6.0/bin/pgf90 -dryrun -tp k8-32 a.f
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86-64/6.0/bin/.pgf90rc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86-64/6.0/bin/nativerc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86-64/6.0/bin/fnativerc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86-64/6.0/bin/x86rc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86-64/6.0/bin/x8664rc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86-64/6.0/bin/lin86rc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86-64/6.0/bin/lin8664rc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86-64/6.0/bin/iparc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86-64/6.0/bin/pgf90rc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86-64/6.0/bin/pgftnrc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86-64/6.0/bin/localrc
Skipping siterc (not found)
Skipping .mypgf90rc (not found)
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86/6.0/bin/.pgf90rc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86/6.0/bin/nativerc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86/6.0/bin/fnativerc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86/6.0/bin/x86rc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86/6.0/bin/x8632rc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86/6.0/bin/lin86rc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86/6.0/bin/lin8632rc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86/6.0/bin/iparc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86/6.0/bin/pgf90rc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86/6.0/bin/pgftnrc
Reading rcfile /usr/local/stow/PGI/share/pgi/linux86/6.0/bin/localrc
Skipping siterc (not found)
Skipping .mypgf90rc (not found)
/usr/local/stow/PGI/share/pgi/linux86/6.0/bin/pgf901 a.f -opt 1 -terse 1 -inform warn -nohpf -nostatic -x 119 0x100000 -x 19 0x400000 -x 59 4 -x 15 2 -x 49 0x400004 -x 51 0x20 -x 57 0x4c -x 58 0x10000 -x 124 0x1000 -x 57 0xfb0000 -x 58 0x78031040 -x 48 3328 -stdinc /usr/local/stow/PGI/share/pgi/linux86/6.0/include:/usr/local/include:/usr/lib/gcc-lib/x86_64-linux/3.3.5/include:/usr/lib/gcc-lib/x86_64-linux/3.3.5/32/include:/usr/include -def unix -def __unix -def unix -def linux -def __linux -def linux -def inline= -def i386 -def __i386 -def i386 -def __NO_MATH_INLINES -def linux86 -def __THROW= -nofreeform -vect 48 -output /scratch/scheurer/pgf90aaaaanpiaA.ilm
/usr/local/stow/PGI/share/pgi/linux86/6.0/bin/pgf902 /scratch/scheurer/pgf90aaaaanpiaA.ilm -fn a.f -opt 1 -terse 1 -inform warn -x 51 0x20 -x 119 0xa10000 -x 119 0x100000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 119 0x40000000 -x 19 0x400000 -x 59 4 -x 124 0x1400 -y 15 2 -x 57 0x3b0000 -x 58 0x48000000 -astype 0 -x 124 1 -x 80 0x08000000 -y 80 0x1000 -asm /scratch/scheurer/pgf90baaaanpiaA.s
/usr/bin/as /scratch/scheurer/pgf90baaaanpiaA.s --32 -o /scratch/scheurer/pgf90caaaanpiaA.o
/usr/bin/ld /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-lib/x86_64-linux/3.3.5/32/crtbegin.o /usr/local/stow/PGI/share/pgi/linux86/6.0/lib/f90main.o -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /scratch/scheurer/pgf90caaaanpiaA.o -L/usr/local/stow/PGI/share/pgi/linux86/6.0/lib -L/usr/lib -L/usr/lib/gcc-lib/x86_64-linux/3.3.5/32 -rpath /usr/local/stow/PGI/share/pgi/linux86/6.0/lib -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lpgsse1 -lpgsse2 -lc -lnspgc -lpgc -lm -lgcc -lc -lgcc /usr/lib/gcc-lib/x86_64-linux/3.3.5/32/crtend.o /usr/lib/crtn.o
Unlinking /scratch/scheurer/pgf90aaaaanpiaA.ilm
Unlinking /scratch/scheurer/pgf90aaaaanpiaA.dbg
Unlinking /scratch/scheurer/pgf90baaaanpiaA.s
Unlinking /scratch/scheurer/pgf90caaaanpiaA.o
To be honest, I think it is flawed logic not to look into the installation directory pointed to by the environment variable $PGI to find the installation directory but instead to rely on completely and recursively walking along all possible sym-links to find it. If I set the environment variable, then that is for a good reason and should be more reliable. At least as a last resort the frontend should search there instead of just giving up.
As a workaround (since I can’t look at the inner logic of the compiler), would it be sufficient to remove all but the pgf90, pgf77, pgCC, and pgcc frontends from /usr/local/bin to have the frontend “realize” that /usr/local/bin is NOT the installation directory. Since to me it seems that this is what causes the problem.
Regards,
Christoph