Hi,
Bruno is using 10.4 as I ready only a second ago in one of his emails. I
have no idea if the compiler resource file trick works with this old one.
By the way it has to be .mypgf90rc not .pgf90rc at least following the
current documentation.
Cheerio,
Luis
On 29/05/15 13:07, Jeff Squyres (jsquyres) wrote:
On May 29, 2015, at 6:54 AM, Bruno Queiros <bquei...@gmail.com> wrote:
I understand that using Portland compiler isn't "advised" by Open Mpi, i was
just wondering if there's a way of doing it, since i need Open Mpi compiled with PG
fortran and not gfortran for example.
A further clarification: the Portland compiler is a fine compiler; we certainly
support it. The only thing we recommend is avoiding mixing compiler suites
whenever possible (e.g., using one compiler for C and another for Fortran). It
leads to complications like this.
That being said, it looks like you have a Portland Fortran license, and no
corresponding Portland C license, and therefore you're somewhat forced into
this situation.
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.
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.
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...
Besides that i tried what you mentioned: pgf90 -pthread somefile.f90 , and that
gives the expected error:
pgf90 -pthread helloworld.f90
pgf90-Error-Unknown switch: -pthread
Sounds like this file is somehow not yet correct, or you have a version of the
Portland compiler that does not use this config file. You should check the
Portland Fortran compiler documentation.
If you can't get this Portland config file workaround to work, you can also make your own
"my_fortran_compiler" script that simply strips out the -pthread argv token and
then invokes pgf90 (or pgfortran) with the rest of the argv. Then you can:
./configure FC=my_fortran_compiler ...
I.e., you're just intercepting Open MPI's invocation of the Fortran compiler,
removing the CLI option that pgf90(pgfortran) won't understand, and then
invoking pgf90(pgfortran). Make sense?
My real question is, can i change Open Mpi configuration, to not use -pthread
flag on fortran compiler?
I'm sorry, no -- Open MPI requires threading support.