[Q-e-developers] Compilation of QE with PGI 15

Martin Schlipf martin.schlipf at gmail.com
Tue May 17 10:35:59 CEST 2016


Hello Filippo,

perhaps we should be a bit more precise. The issue is not directly the 
PGI compiler, it is with the gcc C preprocessor. Only because the PGI 
compiler cannot do the preprocessing itself, the additional cpp step is 
added. However, when called with the "-C" the gcc C preprocessor adds a 
comment in C format, which then cannot be compiled by the PGI compiler.

The attached two files should clarify the issue. The file foo_tmp.f90 is 
the output of preprocessing
the file foo.f90 with the gcc preprocessor and the options "-C -P". Note 
that the option "-C" should retain the
comments, but (at least with gcc) the comments are retained even without 
the "-C" option.

Cheers,
Martin & Samuel

On 16/05/16 18:56, Filippo SPIGA wrote:
> Hello Samuel,
>
> which PGI 15 exactly? I have 7 minor versions of PGI 15 installed in 
> the HPC cluster here in Cambridge. I've just run latest SVN (12411) 
> using PGI 16.4 and it works without any change in the make.sys. Let me 
> know the exact PGI version, I want to try replicate the issue.
>
> $ pgfortran --version
>
> pgfortran 16.4-0 64-bit target on x86-64 Linux -tp sandybridge
> The Portland Group - PGI Compilers and Tools
> Copyright (c) 2016, NVIDIA CORPORATION.  All rights reserved.
>
> $ ldd bin/pw.x
>         linux-vdso.so.1 =>  (0x00007fff5e4c5000)
>         libmkl_intel_lp64.so => 
> /usr/local/Cluster-Apps/intel/mkl/11.3.3.210/compilers_and_libraries_2016.3.210/linux/mkl/lib/intel64/libmkl_intel_lp64.so (0x00007f0be29df000)
>         libmkl_core.so => 
> /usr/local/Cluster-Apps/intel/mkl/11.3.3.210/compilers_and_libraries_2016.3.210/linux/mkl/lib/intel64/libmkl_core.so 
> (0x00007f0be0fce000)
>         libmkl_pgi_thread.so => 
> /usr/local/Cluster-Apps/intel/mkl/11.3.3.210/compilers_and_libraries_2016.3.210/linux/mkl/lib/intel64/libmkl_pgi_thread.so (0x00007f0bdfc10000)
>         libmpi_usempif08.so.0 => 
> /usr/local/Cluster-Apps/openmpi/pgi/1.8.8/lib/libmpi_usempif08.so.0 
> (0x00007f0bdf9b1000)
>         libmpi_usempi_ignore_tkr.so.0 => 
> /usr/local/Cluster-Apps/openmpi/pgi/1.8.8/lib/libmpi_usempi_ignore_tkr.so.0 
> (0x00007f0bdf7aa000)
>         libmpi_mpifh.so.2 => 
> /usr/local/Cluster-Apps/openmpi/pgi/1.8.8/lib/libmpi_mpifh.so.2 
> (0x00007f0bdf549000)
>         libmpi.so.1 => 
> /usr/local/Cluster-Apps/openmpi/pgi/1.8.8/lib/libmpi.so.1 
> (0x00007f0bdf212000)
>         libpgf90rtl.so => 
> /usr/local/Cluster-Apps/pgi/linux86-64/16.4/lib/libpgf90rtl.so 
> (0x00007f0bdefec000)
>         libpgf90.so => 
> /usr/local/Cluster-Apps/pgi/linux86-64/16.4/lib/libpgf90.so 
> (0x00007f0bdea3d000)
>         libpgf90_rpm1.so => 
> /usr/local/Cluster-Apps/pgi/linux86-64/16.4/lib/libpgf90_rpm1.so 
> (0x00007f0bde83a000)
>         libpgf902.so => 
> /usr/local/Cluster-Apps/pgi/linux86-64/16.4/lib/libpgf902.so 
> (0x00007f0bde627000)
>         libpgftnrtl.so => 
> /usr/local/Cluster-Apps/pgi/linux86-64/16.4/lib/libpgftnrtl.so 
> (0x00007f0bde3f2000)
>         libpgmp.so => 
> /usr/local/Cluster-Apps/pgi/linux86-64/16.4/lib/libpgmp.so 
> (0x00007f0bde171000)
>         libnuma.so.1 => /usr/lib64/libnuma.so.1 (0x00007f0bddf36000)
>         libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0bddd19000)
>         libpgc.so => 
> /usr/local/Cluster-Apps/pgi/linux86-64/16.4/lib/libpgc.so 
> (0x00007f0bdda90000)
>         librt.so.1 => /lib64/librt.so.1 (0x00007f0bdd888000)
>         libm.so.6 => /lib64/libm.so.6 (0x00007f0bdd604000)
>         libc.so.6 => /lib64/libc.so.6 (0x00007f0bdd26f000)
>         libdl.so.2 => /lib64/libdl.so.2 (0x00007f0bdd06b000)
>         libopen-rte.so.7 => 
> /usr/local/Cluster-Apps/openmpi/pgi/1.8.8/lib/libopen-rte.so.7 
> (0x00007f0bdcddb000)
>         libopen-pal.so.6 => 
> /usr/local/Cluster-Apps/openmpi/pgi/1.8.8/lib/libopen-pal.so.6 
> (0x00007f0bdcaeb000)
>         libpciaccess.so.0 => /usr/lib64/libpciaccess.so.0 
> (0x00007f0bdc8e2000)
>         libutil.so.1 => /lib64/libutil.so.1 (0x00007f0bdc6de000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007f0be34f1000)
>
> $ mpif90 -show
> pgfortran -I/usr/local/Cluster-Apps/openmpi/pgi/1.8.8/include 
> -I/usr/local/Cluster-Apps/openmpi/pgi/1.8.8/lib -Wl,-rpath 
> -Wl,/usr/local/Cluster-Apps/openmpi/pgi/1.8.8/lib 
> -Wl,--enable-new-dtags -L/usr/local/Cluster-Apps/openmpi/pgi/1.8.8/lib 
> -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi
>
> $ cat make.sys | grep "CPPFLAGS       ="
> CPPFLAGS       = -P -C -traditional $(DFLAGS) $(IFLAGS)
>
> On May 17, 2016, at 1:40 AM, Samuel Poncé <samuel.pon at gmail.com 
> <mailto:samuel.pon at gmail.com>> wrote:
>> Dear QE-developers,
>>
>> The current trunk of QE does not compile with PGI 15:
>> cpp -P -C -traditional -D__PGI -D__FFTW3 -D__MPI -D__PARA 
>> -D__SCALAPACK -I../include fft_types.f90 -o fft_types_tmp.f90 ; \
>>         mpif90 -fast -r8 -Mcache_align -D__PGI -D__FFTW3 -D__MPI 
>> -D__PARA -D__SCALAPACK -I/home/farm2/local/fftw3_pgi1507/include/ 
>> -I../include  -c fft_types_tmp.f90 -o fft_types.o
>>
>> PGF90-S-0034-Syntax error at or near / (fft_types_tmp.f90: 1)
>> PGF90-S-0034-Syntax error at or near identifier file 
>> (fft_types_tmp.f90: 2)
>> PGF90-S-0034-Syntax error at or near identifier gnu 
>> (fft_types_tmp.f90: 4)
>> PGF90-S-0034-Syntax error at or near identifier it (fft_types_tmp.f90: 5)
>>
>> To make it compile, the following line should be changed in the 
>> make.sys (therefore in the Makefile):
>>
>> The line
>> CPPFLAGS       = -P -C -traditional $(DFLAGS) $(IFLAGS)
>>
>> should be replace by
>> CPPFLAGS       = -P -traditional $(DFLAGS) $(IFLAGS) $(MANUAL_DFLAGS)
>>
>> The reason is because the -C option place C comments at the beginning 
>> of the pre-processed file and pgi cannot interpret it correctly.
>> The manual_dflag is important in my case because the fftw lib is not 
>> correctly recognize and I have to add the fftw3 /include file.
>>
>> With the modification, QE compiles perfectly with pgi 15.
>>
>> Best,
>>
>> Samuel & Martin
>
> --
> Mr. Filippo SPIGA, M.Sc.
> Quantum ESPRESSO Foundation
> http://www.quantum-espresso.org ~ skype: filippo.spiga
>
> *****
> Disclaimer: "Please note this message and any attachments are 
> CONFIDENTIAL and may be privileged or otherwise protected from 
> disclosure. The contents are not to be disclosed to anyone other than 
> the addressee. Unauthorized recipients are requested to preserve this 
> confidentiality and to advise the sender immediately of any error 
> in transmission."
>
>
> _______________________________________________
> Q-e-developers mailing list
> Q-e-developers at qe-forge.org
> http://qe-forge.org/mailman/listinfo/q-e-developers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20160517/49fafb45/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo_tmp.f90
Type: text/x-fortran
Size: 1785 bytes
Desc: not available
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20160517/49fafb45/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.f90
Type: text/x-fortran
Size: 41 bytes
Desc: not available
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20160517/49fafb45/attachment-0001.bin>


More information about the developers mailing list