[Users] CPP flags
Erik Schnetter
schnetter at cct.lsu.edu
Tue Dec 10 13:39:55 CST 2013
The CPPFLAGS flags are added to the CFLAGS or CXXFLAGS for compiling. Since the latter probably include -fopenmp or the equivalent, not setting them will still lead to correct code.
However, CPPFLAGS are also used to determine dependencies. Not adding -fopenmp here means that the dependencies will incorrectly exclude anything OpenMP related. In most cases, this will make no difference, but if you have code such as
#ifdef _OPENMP
# include "another_header_file.h"
#endif
then the dependency on "another_header_file.h" will be missed, potentially leading to wrong code. (I think this would be very unlikely, though.)
-erik
On Dec 10, 2013, at 13:55 , Zach Etienne <zachetie at gmail.com> wrote:
> That's a very good point. I'm curious, does CPP_OPENMP_FLAGS need to be set for any compiler? I've never set it, and have run successfully with OpenMP using pretty much every major compiler out there (albeit with older versions of ET).
>
>
> On Tue, Dec 10, 2013 at 1:40 PM, Yosef Zlochower <yosef at astro.rit.edu> wrote:
> Aren't these options for icc. Does cpp even need
> -openmp under intel?
>
>
> On 12/10/2013 01:26 PM, Zach Etienne wrote:
> At least for my (newish) version of the Intel compilers, the flag
> "-fopenmp" is equivalent to "-openmp". Might want to try that instead.
>
> -Zach
>
>
> On Tue, Dec 10, 2013 at 12:57 PM, Steven R. Brandt <sbrandt at cct.lsu.edu
> <mailto:sbrandt at cct.lsu.edu>> wrote:
>
> Yes. I hate intel for making their flag "-openmp".
>
> Cheers,
> Steve
>
> On 12/10/2013 10:33 AM, Yosef Zlochower wrote:
> > Hi,
> >
> > Every now and then I rediscover a bug that I make when I use
> > one of the simfactory option files as a starting point for
> > our local cluster. Since our local cluster is similar to
> > Lonestar, I start from one of the Lonestar configuration
> >
> > Howerver, the option
> > " CPP_OPENMP_FLAGS = -openmp"
> > Leads to failed compiles because
> > cpp -openmp BLAH causes the output of cpp to go to a file
> > called penmp rather than stdout.
> > I just wonder if other people were bitten by this.
> >
> > On Noether, this caused the compile of GSL to fail
> > (btw, only GSL, the rest of ET compiled fine).
> >
> >
>
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org <mailto:Users at einsteintoolkit.org>
> http://lists.einsteintoolkit.org/mailman/listinfo/users
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users
>
>
>
> --
> Dr. Yosef Zlochower
> Center for Computational Relativity and Gravitation
> Associate Professor
> School of Mathematical Sciences
> Rochester Institute of Technology
> 85 Lomb Memorial Drive
> Rochester, NY 14623
>
> Office:74-2067
> Phone: +1 585-475-6103
>
> yosef at astro.rit.edu
>
> CONFIDENTIALITY NOTE: The information transmitted, including
> attachments, is intended only for the person(s) or entity to which it
> is addressed and may contain confidential and/or privileged material.
> Any review, retransmission, dissemination or other use of, or taking
> of any action in reliance upon this information by persons or entities
> other than the intended recipient is prohibited. If you received this
> in error, please contact the sender and destroy any copies of this
> information.
>
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users
--
Erik Schnetter <schnetter at cct.lsu.edu>
http://www.perimeterinstitute.ca/personal/eschnetter/
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from http://pgp.mit.edu/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20131210/68b8a5aa/attachment.bin
More information about the Users
mailing list