[Q-e-developers] Wondering if build-time optimization OK
Paolo Giannozzi
p.giannozzi at gmail.com
Thu Jun 30 22:53:04 CEST 2016
On Thu, Jun 30, 2016 at 9:34 PM, Chang, Christopher
<Christopher.Chang at nrel.gov> wrote:
> Is it a good idea to turn -O2 off generally for --enable-debug, and -CB off generally for production builds?
in my opinion you should never use --enable-debug,unless you have a
good reason to.
Paolo
>
> ——
>
>
>
> Hi,
>
>
>
> I was recently building QE 5.4.0. FWIW,
>
>
>
> [cchang at n1011 ~]$ uname -a
>
> Linux n1011 2.6.32-504.8.1.el6.x86_64 #1 SMP Wed Jan 28 21:11:36 UTC 2015
> x86_64 x86_64 x86_64 GNU/Linux
>
> [cchang at n1011 ~]$ cat /etc/redhat-release
>
> CentOS release 6.6 (Final)
>
> [cchang at n1011 ~]$ mpif90 -v
>
> mpif90 for the Intel(R) MPI Library 5.1.3 for Linux*
>
> Copyright(C) 2003-2015, Intel Corporation. All rights reserved.
>
> ifort version 16.0.2
>
> [cchang at n1011 ~]$ mpif77 -v
>
> mpif77 for the Intel(R) MPI Library 5.1.3 for Linux*
>
> Copyright(C) 2003-2015, Intel Corporation. All rights reserved.
>
> Using built-in specs.
>
> COLLECT_GCC=gfortran
>
> COLLECT_LTO_WRAPPER=/nopt/nrel/apps/gcc/5.2.0/libexec/gcc/x86_64-unknown-linux-gnu/5.2.0/lto-wrapper
>
> Target: x86_64-unknown-linux-gnu
>
> Configured with: ./configure --prefix=/nopt/nrel/apps/gcc/5.2.0
> --enable-bootstrap --disable-multilib
>
> Thread model: posix
>
> gcc version 5.2.0 (GCC)
>
>
>
> Configuration was with
>
>
>
> configure --prefix=/scratch/cchang/qespresso --enable-openmp
> --enable-parallel --enable-debug --enable-signals --with-scalapack=intel
> LDFLAGS="-mkl"
>
>
>
> Anyway, I noticed that the space_group.f90 build step seemed to hang,
> although CPU usage was pegged at 100%.
>
> After some diagnostic work, I nailed the long build time down to the
> array bounds checking. If -CB is left off, the file builds in about 2
> minutes. I didn’t wait long enough to see how long the standard build would
> take, but it was more than 11 minutes, possibly much more.
>
> The reason I write, is that the Intel ifort man page points out that
> array bounds checking won’t work as expected anyway, if optimizations are
> turned on. Specifically,
>
>
>
> “
>
> It is recommended that you do bounds checking on unoptimized code. If you
> use option check bounds on optimized code, it may produce misleading mes-
>
> sages because registers (not memory locations) are used for
> bounds values.
>
> “
>
>
>
> · Is this a reasonable thing to do for this file?
>
> · Is it a good idea to turn it off generally for --enable-debug?
>
>
>
> Thanks for any pointers you can provide,
>
>
>
> Chris
>
>
>
> --
>
> Christopher H. Chang, Ph.D.
>
> Computational Chemist | NREL Computational Science Center
>
> Research Associate | University of Colorado/RASEI
>
> 15013 Denver West Parkway, MS ESIF301 | Golden, CO 80401
>
>
>
>
>
>
> _______________________________________________
> Q-e-developers mailing list
> Q-e-developers at qe-forge.org
> http://qe-forge.org/mailman/listinfo/q-e-developers
>
--
Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,
Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222
More information about the developers
mailing list