Just to clarify: the underlying issue here is that Open MPI's configure script is assuming that whatever linker flags it discovers for the C compiler are also valid for the Fortran compiler. This is apparently not true when you mix the GCC and Portland compilers -- bummer (i.e., Open MPI's configure script is determining that -pthread works with gcc and assumes that it works with pgf90... but it apparently doesn't, which is why Luis's solution is particularly clever).
If the portland-config-script-in-your-$HOME solution isn't work, I'd double check that you have the file named correctly (e.g., I thought the Portland Fortran compiler's name was pgf90, not pfg90 -- I would assume that the config filename is representative of the compiler's executable name...?), that it is actually being seen by the Portland compiler, etc. You can easily test whether this Portland config trick is working: just invoke "pgf90 -pthread somefile.f90" and see if it compiles that somefile.f90 file or if it complains about the -pthread option. If the Portland config trick is working, (assuming somefile.f90 is a valid Fortran file), it'll compile without complaining about -pthread. The Open MPI will likely be able to build, too. > On May 29, 2015, at 6:14 AM, Bruno Queiros <bquei...@gmail.com> wrote: > > Thank you for the help Luis > > I did as you told me, i created a .pfg90.rc on the home directory of my user > with: > > switch -pthread is replace(-lpthread) positional(linker) > > i tried to compile openmpi with make, but i still got the same error. > > Am i doing something wrong? How can i overcome this -pthread error? > > > Em qui, 28 de mai de 2015 às 18:36, Luis Kornblueh > <luis.kornbl...@mpimet.mpg.de> escreveu: > Hi Bruno, > > once more: it might be the case that the file needs to be named .pgf90rc > > Sorry, > Luis > > On 28/05/15 19:08, Bruno Queiros wrote: > > Thomas > > > > I did get a configure successfull, but make fails with > > > > pgf90-Error-Unknown switch: -pthread > > make[2]: *** [libmpi_usempi.la <http://libmpi_usempi.la>] Error 1 > > > > I have tried and did a fake pgf90 has mentioned on the mailing list > > > > #! /bin/bash > > newargs='echo $@ | sed s/-pthread//g -' > > #echo "/opt/pgi/linux86-64/10.4/bin/pgf90 $newargs" > > /opt/pgi/linux86-64/10.4/bin/pgf90 $newargs > > exit > > > > But for some reason this doesn't work, the make just stops. > > > > Can you point me in the right direction? > > > > Em qui, 28 de mai de 2015 às 14:10, Bruno Queiros <bquei...@gmail.com > > <mailto:bquei...@gmail.com>> escreveu: > > > > Thank you very much Thomas > > > > I will try this > > > > Em qui, 28 de mai de 2015 às 12:25, Thomas Jahns <ja...@dkrz.de > > <mailto:ja...@dkrz.de>> escreveu: > > > > On 05/28/15 12:20, Jeff Squyres (jsquyres) wrote: > > > Sounds like your pgcc compiler installation is busted. > > You'll need to get that fixed to compile/install Open MPI. > > > > An alternative might be to use a system compiler (which is > > probably gcc or > > clang) for C and C++ and only use pgfortran for the Fortran > > parts of OpenMPI, > > i.e. try something like > > > > ./configure CC=gcc CXX=g++ FC=pgf90 F77=pgf77 F90=pgf90 > > --prefix=/opt/openmpi-1.8.5_pgf90 > > > > Regards, Thomas Jahns > > > > > > _______________________________________________ > > users mailing list > > us...@open-mpi.org <mailto: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/26963.php > > > > > > > > _______________________________________________ > > 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/26967.php > > > _______________________________________________ > 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/26969.php > _______________________________________________ > 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/26971.php -- Jeff Squyres jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/