> On May 29, 2015, at 5:07 AM, Jeff Squyres (jsquyres) <jsquy...@cisco.com> 
> wrote:
> 
> On May 29, 2015, at 6:54 AM, Bruno Queiros <bquei...@gmail.com> wrote:
> 
>> The name of the binary is correct: pgf90 the name of the file is also 
>> correct .pgf90.rc i do have some doubts about the content of the file. Is 
>> this enough?
>> 
>> switch -pthread is replace(-lpthread) positional(linker)
> 
> I'm not a Portland customer -- I don't know.  You'll need to check their 
> documentation.
> 

Here I have a siterc file within the PGI bin directory, for example:

/some/long/path/pgi/15.3/bin/siterc

I have exactly the same line as you have specified. 

If you are unable to put it in the PGI installation bin directory you can put 
it in a file ${HOME}/.mypgf90rc, as is described in section 1.8.2 (page 14) of 
the PGI Compilers Users Guide ( http://www.pgroup.com/doc/pgiug.pdf ).
 

>> If i do a source .pgf90.rc i do get errors:
>> 
>> -bash: ./.pgf90.rc: line 1: syntax error near unexpected token `('
>> -bash: ./.pgf90.rc: line 1: `switch -pthread is replace(-lpthread) 
>> positional(linker)'
> 
> I'm guessing that this file is not intended to be sourced by the shell, but 
> rather noticed and read/used by the pgf90 compiler when it is invoked.
> 

Jeff, your right. It's not for your shell to source it'd for the compiler to 
read.


> Sidenote: isn't there a pgfortran compiler executable that is supposed to be 
> preferred over "pgf90" these days?  (remember my disclaimer: I'm not a 
> Portland customer, so I could be totally off base here...)  Have you tried 
> pgfortran to see if it accepts the -pthread option?  Sometimes the different 
> compiler executable entry points behave slightly differently...
> 

I've built Openmpi 1.8.5 with the following configure line:

./configure  \
  --prefix=/curc/tools/x86_64/rh6/software/openmpi/1.8.5/pgi/15.3 \
  --with-threads=posix \
  --enable-mpi-thread-multiple \
  --with-slurm \
  --with-pmi=/curc/slurm/slurm/current/

Please note, I am using the following environment variables:
CC=pgcc
FC=pgfortran
F90=pgf90
F77=pgf77
CXX=pgc++

I do not use pgprepro for CPP as I found it to be flaky.

Hope this helps.
Timothy

Reply via email to