Gilles,

My initial thought is that libslurm probably does require linking
libpthread, either for for linking pthread_* symbols, or for proper
*operation* (such as thread-safe versions of functions which override weak
definitions in libc).

If so, then neither omitting "-pthread" nor telling pgcc not to complain
about "-pthread" is going to be a good solution.
Instead the "-pthread" needs to be replaced by "-lpthread", or similar.

-Paul

On Mon, Jul 25, 2016 at 6:03 PM, Gilles Gouaillardet <gil...@rist.or.jp>
wrote:

> Folks,
>
>
> This is a followup of a thread that initially started at
> http://www.open-mpi.org/community/lists/users/2016/07/29635.php
>
>
> The user is trying to build Open MPI with PGI compiler and
> libslurm.la/libpmi.la support, and slurm was built with gcc compiler.
>
>
> At first, it fails because the "-pthread" flag is pulled from
> libslurm.la/libpmi.la, but this flag is not supported by PGI compilers.
>
> A workaround is to pass the -noswitcherror flag to the PGI compiler (so
> the -pthread flag is discarded and a warning message is issued, but PGI
> compiler does not fail). Unfortunatly, that does not work because libtool
> does does not pass this flag to the PGI compiler.
>
>
> Of course, one option is to tell the user to rebuild slurm with PGI, so
> libslurm.la/libpmi.la do not have the "-pthread" flag.
>
> A nicer though arguable option is to hack libtool to silently drop the
> "-pthread" flag with PGI compiler is used (i made a proof of concept, and
> this is a two lines patch).
>
> An other cleaner option is to hack libtool so it pass -noswitcherror to
> PGI compiler, but i do not know how to achieve this.
>
>
> Any thoughts ?
>
>
> Cheers
>
> _______________________________________________
> devel mailing list
> de...@open-mpi.org
> Subscription: https://www.open-mpi.org/mailman/listinfo.cgi/devel
> Link to this post:
> http://www.open-mpi.org/community/lists/devel/2016/07/19278.php
>



-- 
Paul H. Hargrove                          phhargr...@lbl.gov
Computer Languages & Systems Software (CLaSS) Group
Computer Science Department               Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900

Reply via email to