[QE-users] R: R: QE 7.2 compilation with new Intel compilers

Pietro Davide Delugas pdelugas at sissa.it
Thu Aug 24 11:31:01 CEST 2023


Dear Sergei

The configure script determines the compiler by checking the output of the MPIF90 command, which must be set  as
MPIF90=mpiifx.
In this way, in my case, the configure script detects correctly that I want to use an intel compiler but sets it wrongly to ifort instead of ifx.
This is a minor issue that may need to be fixed, but if the future ifort and ifx are the same compiler, it may be unnecessary, and fixing it now can cause problems in the future.

In your case, instead, MPIF90 was pointing to a  wrapper for the gfortran compiler, so all the settings, including the preprocessing options passed to the compiler with the F90FLAGS variable, are those for gfortran and the bad preprocessing causes all those syntax errors in that file.
You may add  -fpp -allow nofpp_comments  to the F90FLAGS variable in make.inc

Or, much better, you can set the environment variable MPIF90=mpiifx. Then, rerun the configure script and fix the F90 variable inside the make.inc
and everything should work.
Best regards
Pietro
________________________________
Da: users <users-bounces at lists.quantum-espresso.org> per conto di Kliavinek, Sergei <skliavin at caltech.edu>
Inviato: mercoledì 23 agosto 2023 21:06
A: Quantum ESPRESSO users Forum <users at lists.quantum-espresso.org>
Oggetto: [QE-users] R: QE 7.2 compilation with new Intel compilers

Dear Pietro,
Thanks a lot for your suggestion!

Indeed, I checked make.inc, and even though I explicitly wrote the `F90=ifx` option during configuration, it was ignored, and make.inc ended up writing `F90=gfortran`.  (perhaps this configuration behavior is already worth a separate analysis in light of the fact that Intel will soon abandon old compilers).

The previous error was indeed resolved by this, but a new one has appeared:


gram.f90(60): error #5082: Syntax error, found IDENTIFIER 'CREATE' when expecting one of: ) ( , : <END-OF-STATEMENT> ; % [ . = / =>

 data copy(cp_bgrp, bec_bgrp) create(ctmp, cp_tmp,bec_tmp,csc,csc2) &

------------------------------^

gram.f90(61): error #5082: Syntax error, found IDENTIFIER 'COPYIN' when expecting one of: :: ) ( , : * <END-OF-STATEMENT> ; . % (/ + - [ ] /) . = ' ** / ...

 & copyin(betae, qq_nt, ofsbeta,ityp, ibgrp_g2l, nh, tvanp )

---^

gram.f90(61): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: :: ) , :

 & copyin(betae, qq_nt, ofsbeta,ityp, ibgrp_g2l, nh, tvanp )

-------------------------------------------------------------^

gram.f90(72): error #5082: Syntax error, found IDENTIFIER 'PRESENT' when expecting one of: ( : % [ . = =>

 kernels present(ctmp, cp_bgrp)

---------^

gram.f90(74): error #5082: Syntax error, found IDENTIFIER 'KERNELS' when expecting one of: <END-OF-STATEMENT> ; TYPE MODULE FUNCTION SUBROUTINE PROCEDURE BLOCK DO FORALL ...

 end kernels

-----^

gram.f90(76): error #5082: Syntax error, found IDENTIFIER 'PRESENT' when expecting one of: ( : % [ . = =>

 kernels present(ctmp)

---------^

gram.f90(78): error #5082: Syntax error, found IDENTIFIER 'KERNELS' when expecting one of: <END-OF-STATEMENT> ; TYPE MODULE FUNCTION SUBROUTINE PROCEDURE BLOCK DO FORALL ...

 end kernels

-----^

gram.f90(90): error #5082: Syntax error, found IDENTIFIER 'USE_DEVICE' when expecting one of: ( : % [ . = =>

 host_data  use_device(ctmp)

------------^

gram.f90(92): error #5082: Syntax error, found IDENTIFIER 'HOST_DATA' when expecting one of: <END-OF-STATEMENT> ; TYPE MODULE FUNCTION SUBROUTINE PROCEDURE BLOCK DO FORALL ...

 end host_data

-----^

gram.f90(94): error #5082: Syntax error, found IDENTIFIER 'PRESENT' when expecting one of: ( : % [ . = =>

 kernels present(cp_bgrp, ctmp)

---------^

gram.f90(96): error #5082: Syntax error, found IDENTIFIER 'KERNELS' when expecting one of: <END-OF-STATEMENT> ; TYPE MODULE FUNCTION SUBROUTINE PROCEDURE BLOCK DO FORALL ...

 end kernels

-----^

gram.f90(98): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( : % [ . = =>

 kernels

---------^

gram.f90(101): error #5082: Syntax error, found IDENTIFIER 'KERNELS' when expecting one of: <END-OF-STATEMENT> ; TYPE MODULE FUNCTION SUBROUTINE PROCEDURE BLOCK DO FORALL ...

 end kernels

-----^

gram.f90(105): error #5082: Syntax error, found 'DATA' when expecting one of: <END-OF-STATEMENT> ; TYPE MODULE FUNCTION SUBROUTINE PROCEDURE BLOCK DO FORALL ...

 end data

-----^

gram.f90(143): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( , % . /

 data present(bec, cp, tvanp,ofsbeta, nh, ityp, qq_nt)

--------------------------------------------------------^

gram.f90(151): error #5082: Syntax error, found IDENTIFIER 'PRESENT' when expecting one of: ( : % [ . = =>

 kernels present(cp)

---------^

gram.f90(153): error #5082: Syntax error, found IDENTIFIER 'KERNELS' when expecting one of: <END-OF-STATEMENT> ; TYPE MODULE FUNCTION SUBROUTINE PROCEDURE BLOCK DO FORALL ...

 end kernels

-----^

gram.f90(155): error #5082: Syntax error, found IDENTIFIER 'PRIVATE' when expecting one of: ( : % [ . = =>

 parallel private(ia, is, iv, jv, rsum_v) reduction (+:rsum) vector_length(32) &

----------^

gram.f90(155): error #5082: Syntax error, found '+' when expecting one of: <IDENTIFIER>

 parallel private(ia, is, iv, jv, rsum_v) reduction (+:rsum) vector_length(32) &

-----------------------------------------------------^

gram.f90(157): error #5082: Syntax error, found IDENTIFIER 'GANG' when expecting one of: ( : % [ . = =>

 loop gang

------^

gram.f90(164): error #5082: Syntax error, found IDENTIFIER 'VECTOR' when expecting one of: ( : % [ . = =>

 loop vector collapse(2) reduction(+:rsum_v)

------^

gram.f90(164): error #5082: Syntax error, found IDENTIFIER 'REDUCTION' when expecting one of: :: ) ( , : * <END-OF-STATEMENT> ; . % (/ + - [ ] /) . = ' ** / ...

 loop vector collapse(2) reduction(+:rsum_v)

-------------------------^

gram.f90(176): error #5082: Syntax error, found IDENTIFIER 'PARALLEL' when expecting one of: <END-OF-STATEMENT> ; TYPE MODULE FUNCTION SUBROUTINE PROCEDURE BLOCK DO FORALL ...

 end parallel

-----^

gram.f90(177): error #5082: Syntax error, found 'DATA' when expecting one of: <END-OF-STATEMENT> ; TYPE MODULE FUNCTION SUBROUTINE PROCEDURE BLOCK DO FORALL ...

 end data

-----^

gram.f90(216): error #5082: Syntax error, found IDENTIFIER 'PRESENT' when expecting one of: ) ( , : <END-OF-STATEMENT> ; % [ . = / =>

 & present(ibgrp_g2l, nh, ofsbeta, qq_nt, ityp, tvanp, betae)

---^

gram.f90(216): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: :

 & present(ibgrp_g2l, nh, ofsbeta, qq_nt, ityp, tvanp, betae)

---------------------------------------------------------------^

gram.f90(217): error #5082: Syntax error, found IDENTIFIER 'PRESENT' when expecting one of: ( : % [ . = =>

 kernels present(csc)

---------^

gram.f90(219): error #5082: Syntax error, found IDENTIFIER 'KERNELS' when expecting one of: <END-OF-STATEMENT> ; TYPE MODULE FUNCTION SUBROUTINE PROCEDURE BLOCK DO FORALL ...

 end kernels

-----^

gram.f90(221): error #5082: Syntax error, found IDENTIFIER 'PRESENT' when expecting one of: ( : % [ . = =>

 kernels present(cp_tmp)

---------^

gram.f90(227): error #5082: Syntax error, found IDENTIFIER 'KERNELS' when expecting one of: <END-OF-STATEMENT> ; TYPE MODULE FUNCTION SUBROUTINE PROCEDURE BLOCK DO FORALL ...

 end kernels

-----^

/tmp/ifx0955286960Qlmjed/ifxwhM11h.i90(236): catastrophic error: Too many errors, exiting

compilation aborted for gram.f90 (code 1)

make[2]: *** [../../make.inc:16: gram.o] Error 1

make[2]: Leaving directory '/opt/q-e-qe-7.2/CPV/src'

make[1]: *** [Makefile:7: all] Error 1

make[1]: Leaving directory '/opt/q-e-qe-7.2/CPV'

make: *** [Makefile:75: cp] Error 1



As far as I understand, the compiler is signaling that a large number of syntax errors have been caused, which is strange because in that case the code would not compile with other compilers. Could you please advise what could be the issue?


Best,

Sergei


23 авг. 2023 г., в 2:51 AM, Pietro Davide Delugas <pdelugas at sissa.it> написал(а):

Hello

tried with Intel suite version 2023.2 this morning, and it works for me.

There may be a slight problem in the configuration though. The configure script recognizes that the  compiler is intel and sets in the make.inc F90=ifort instead of F90=ifx, which may be the cause of your problems. But  I set F90=ifx manually in the make.inc.  before compiling, and I haven't checked what happens otherwise.

hope it helps
Pietro
________________________________
Da: users <users-bounces at lists.quantum-espresso.org> per conto di Kliavinek, Sergei <skliavin at caltech.edu>
Inviato: martedì 22 agosto 2023 21:34
A: users at lists.quantum-espresso.org <users at lists.quantum-espresso.org>
Oggetto: [QE-users] QE 7.2 compilation with new Intel compilers

Dear QE developers,

I am currently working on compiling QE using the new Intel compilers. My compile command is as follows:

wget https://github.com/QEF/q-e/archive/refs/tags/qe-7.2.zip && \
    unzip qe-7.2.zip && \
    cd q-e-qe-7.2 && \
    ./configure F90=ifx CC=mpiicx CFLAGS=-O3 FFLAGS=-O3 MPIF90=mpiifx  --with-hdf5="/opt/hdf5" --enable-wannier90 && \
    make all && \
    rm ../qe-7.2.zip

Unfortunately, I get an error when I run it:

1117.3 mbdlib.f90(26): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [MBD]
1117.3   USE mbd,              ONLY : mbd_input_t, mbd_calc_t
1117.3 ------^
1117.3 mbdlib.f90(40): error #6406: Conflicting attributes or multiple declaration of name.   [MBD_INPUT_T]
1117.3   TYPE(mbd_input_t):: inp
1117.3 -------^
1117.3 mbdlib.f90(41): error #6406: Conflicting attributes or multiple declaration of name.   [MBD_CALC_T]
1117.3   TYPE(mbd_calc_t):: calc
1117.3 -------^
1117.3 mbdlib.f90(26): error #6580: Name in only-list does not exist or is not accessible.   [MBD_INPUT_T]
1117.3   USE mbd,              ONLY : mbd_input_t, mbd_calc_t
1117.3 -------------------------------^
1117.3 mbdlib.f90(26): error #6580: Name in only-list does not exist or is not accessible.   [MBD_CALC_T]
1117.3   USE mbd,              ONLY : mbd_input_t, mbd_calc_t
1117.3 --------------------------------------------^
1117.3 mbdlib.f90(63): error #6404: This name does not have a type, and must have an explicit type.   [INP]
1117.3   ALLOCATE(inp%atom_types(nat))
1117.3 -----------^
1117.3 mbdlib.f90(82): error #6303: The assignment operation or the binary expression operation is invalid for the data types of the two operands.   [TRIM]
1117.3     inp%atom_types(na) = trim(atm(ityp(na)))
1117.3 -------------------------^
1117.3 mbdlib.f90(84): error #6366: The shapes of the array expressions do not conform.   [INP]
1117.3   inp%coords = tau*alat  ! HK-TODO: this one works for PW (check if it is for CP)
1117.3 --^
1117.3 mbdlib.f90(90): error #6366: The shapes of the array expressions do not conform.   [INP]
1117.3     inp%lattice_vectors = at*alat  ! Lattice vector in real space
1117.3 ----^
1117.3 mbdlib.f90(94): error #6366: The shapes of the array expressions do not conform.   [INP]
1117.3       inp%k_grid = [nk1, nk2, nk3]
1117.3 ------^
1117.3 mbdlib.f90(101): error #6366: The shapes of the array expressions do not conform.   [INP]
1117.3       inp%k_grid = [1, 1, 1] !set default k points grid
1117.3 ------^
1117.3 mbdlib.f90(122): error #6404: This name does not have a type, and must have an explicit type.   [CALC]
1117.3   CALL calc%init(inp)
1117.3 -------^
1117.3 mbdlib.f90(184): error #6830: The argument of the ALLOCATED intrinsic cannot be a constant or an expression.   [INP]
1117.3   IF(ALLOCATED(inp%atom_types)) DEALLOCATE(inp%atom_types)
1117.3 ---------------^
1117.3 compilation aborted for mbdlib.f90 (code 1)
1117.3 make[1]: *** [../make.inc:16: mbdlib.o] Error 1
1117.3 make[1]: Leaving directory '/opt/q-e-qe-7.2/Modules'
1117.3 make: *** [Makefile:194: mods] Error 1
Could you please provide your thoughts, what could be the solution here?
Also, perhaps, you have already compiled QEs with the new compilers and know which options to use - if so, I'd appreciate that information!

Best,
Sergei


_______________________________________________
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
_______________________________________________
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users at lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20230824/ec42c6f2/attachment.html>


More information about the users mailing list