[QE-users] Chosing OFLAG for intel parallel studio when compiling q-e.

Hongyi Zhao hongyi.zhao at gmail.com
Sun Jul 19 02:02:08 CEST 2020


On Sun, Jul 19, 2020 at 7:34 AM Hongyi Zhao <hongyi.zhao at gmail.com> wrote:
>
> On Sat, Jul 18, 2020 at 10:50 AM Hongyi Zhao <hongyi.zhao at gmail.com> wrote:
> >
> > Hi,
> >
> > When compiling the q-e git master version with intel
> > parallel_studio_xe/2020.1.102, I want to set the OFLAG to xHOST for
> > obtaining the optimized perfromance according to my CPU architecture.
> >
> > For achieving this aim, I tried the following but failed. See the
> > output for more information:
> >
> > $ ./configure --with-scalapack=intel MPIF90=mpiifort OFLAG+=xHOST
> > configure: error: invalid variable name: `OFLAG+'
>
> Based on the user_guide here:
> https://github.com/QEF/q-e/blob/master/Doc/user_guide.tex. I finally
> figure out the following method via revising the compilation flags in
> the make.inc file as following after running the configure command:
>
> CFLAGS         = -O3 -xHost ...
> [...]
> FFLAGS         = -O3 -xHost ...

Or do the trick with GNU sed like the following:

$ sed -Ei 's|^(CFLAGS[ ]*=.*)-O[0-9]+(.*)$|\1-O3
-xHost\2|p;s|^(FFLAGS[ ]*=.*)-O[0-9]+(.*)$|\1-O3 -xHost\2|g' make.inc

>
> --
> Hongyi Zhao <hongyi.zhao at gmail.com>



-- 
Hongyi Zhao <hongyi.zhao at gmail.com>


More information about the users mailing list