Thank you Jeff for the clarification and help.

Em sex, 29 de mai de 2015 às 12:08, Jeff Squyres (jsquyres) <
jsquy...@cisco.com> escreveu:

> 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.
>
> --
> Jeff Squyres
> jsquy...@cisco.com
> For corporate legal information go to:
> http://www.cisco.com/web/about/doing_business/legal/cri/
>
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users
> Link to this post:
> http://www.open-mpi.org/community/lists/users/2015/05/26974.php
>

Reply via email to