To be more strictly equivalent, you will want to add -D_REENTRANT to add to the substitution, but this may not affect hcoll.
https://stackoverflow.com/questions/2127797/significance-of-pthread-flag-when-compiling/2127819#2127819 The proper fix here is a change in OMPI build system, of course, to not set -pthread when PGI is used. Jeff On Fri, Jan 24, 2020 at 11:31 AM Åke Sandgren via users < users@lists.open-mpi.org> wrote: > PGI needs this in its, for instance, siterc or localrc: > # replace unknown switch -pthread with -lpthread > switch -pthread is replace(-lpthread) positional(linker); > > > On 1/24/20 8:12 PM, Raymond Muno via users wrote: > > I am having issues building OpenMPI 4.0.2 using the PGI 19.10 > > compilers. OS is CentOS 7.7, MLNX_OFED 4.7.3 > > > > It dies at: > > > > PGC/x86-64 Linux 19.10-0: compilation completed with warnings > > CCLD mca_coll_hcoll.la > > pgcc-Error-Unknown switch: -pthread > > make[2]: *** [mca_coll_hcoll.la] Error 1 > > make[2]: Leaving directory > > `/project/muno/OpenMPI/PGI/openmpi-4.0.2/ompi/mca/coll/hcoll' > > make[1]: *** [all-recursive] Error 1 > > make[1]: Leaving directory `/project/muno/OpenMPI/PGI/openmpi-4.0.2/ompi' > > make: *** [all-recursive] Error 1 > > > > I tried with PGI 19.9 and had the same issue. > > > > If I do not include hcoll, it builds. I have successfully built OpenMPI > > 4.0.2 with GCC, Intel and AOCC compilers, all using the same options. > > > > hcoll is provided by MLNX_OFED 4.7.3 and configure is run with > > > > --with-hcoll=/opt/mellanox/hcoll > > > > > > -- > Ake Sandgren, HPC2N, Umea University, S-90187 Umea, Sweden > Internet: a...@hpc2n.umu.se Phone: +46 90 7866134 Fax: +46 90-580 14 > Mobile: +46 70 7716134 WWW: http://www.hpc2n.umu.se > -- Jeff Hammond jeff.scie...@gmail.com http://jeffhammond.github.io/