[mpich-discuss] pgf90-Error-Unknown switch: -pthread

Kenneth Raffenetti raffenet at mcs.anl.gov
Wed Jul 9 18:37:06 CDT 2014


Libtool is adding the -pthread flag because it exists in the 
"inherited_linker_flags" in libpmi.la. However, PGI clearly doesn't 
understand it. The libtool devs called this issue a bug when it was 
reported here:

http://lists.gnu.org/archive/html/libtool/2010-11/msg00034.html

You could either remove the flag from the /usr/lib/libpmi.la file, or 
use the workaround suggested by Gus Correa to finish your build.

Ken

On 07/09/2014 05:56 PM, Gus Correa wrote:
> Hi James
>
> Adding '-noswitcherror' to the CFLAGS, FFLAGS, FCFLAGS,
> may be a workaround to this problem.
>
> My two cents,
> Gus Correa
>
> On 07/09/2014 05:55 PM, James Long wrote:
>> I need to use srun to launch mpi jobs under slurm, so configured
>> mpich-3.1.1 with
>>
>> $ env CC=pgcc FC=pgf90 CXX=pgCC CPPFLAGS="-DNDEBUG -DpgiFortran"
>> CFLAGS="-O2" FFLAGS="-O2 -w" ./configure --prefix=/opt/mpich-slurm
>> --with-pmi=slurm --with-pm=no --with-slurm-include=/usr/include/slurm
>> --with-slurm-lib=/usr/lib/slurm --enable-fortran=yes
>>
>> The following error occurs when compiling:
>>
>>    CC       src/mpid/common/datatype/lib_libmpi_la-mpir_type_flatten.lo
>>    CC       src/mpid/common/sched/lib_libmpi_la-mpid_sched.lo
>>    CC       src/mpid/common/thread/lib_libmpi_la-mpid_thread.lo
>>    CC       src/mpi_t/lib_libmpi_la-mpit.lo
>>    CC       src/nameserv/pmi/lib_libmpi_la-pmi_nameserv.lo
>>    GEN      lib/libmpi.la
>> pgf90-Error-Unknown switch: -pthread
>> make[2]: *** [lib/libmpi.la] Error 1
>> make[2]: Leaving directory `/home/boss/mpich-3.1.1'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/home/boss/mpich-3.1.1'
>> make: *** [all] Error 2
>>
>> config.log is at http://pastebin.com/aB8CZsr0
>>
>> Jim
>> --
>>
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>> James Long
>> International Arctic Research Center
>> University of Alaska Fairbanks
>> jlong|at|alaska.edu
>> (907) 474-2440
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>>
>>
>>
>>
>> _______________________________________________
>> discuss mailing list     discuss at mpich.org
>> To manage subscription options or unsubscribe:
>> https://lists.mpich.org/mailman/listinfo/discuss
>>
>
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss



More information about the discuss mailing list