Skip to Content.
Sympa Menu

charm - Re: [charm] Global variables in Charm++

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] Global variables in Charm++


Chronological Thread 
  • From: Phil Miller <mille121 AT illinois.edu>
  • To: "Van Der Wijngaart, Rob F" <rob.f.van.der.wijngaart AT intel.com>
  • Cc: Nikhil Jain <nikhil.life AT gmail.com>, "Kunzman, David M" <david.m.kunzman AT intel.com>, "Hammond, Jeff R" <jeff.r.hammond AT intel.com>, "Mattson, Timothy G" <timothy.g.mattson AT intel.com>, "charm AT cs.illinois.edu" <charm AT cs.illinois.edu>
  • Subject: Re: [charm] Global variables in Charm++
  • Date: Fri, 26 Sep 2014 17:36:31 -0500
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

For historical reasons [1], charmc defaults to *not* running the preprocessor on .ci files. Preprocessing .ci files can be enabled by passing charmc the -E flag when it's working on .ci files.



[1] Enabling pre-processing when it wasn't historically the default risks breaking existing application code by having macros that may have been used as identifiers in .ci files suddenly be subject to expansion/substitution.

On Fri, Sep 26, 2014 at 5:31 PM, Van Der Wijngaart, Rob F <rob.f.van.der.wijngaart AT intel.com> wrote:

Hello Nikhil,

 

I have a symbol that I define on the compile line (i.e. I stuff it in OPTS, as below):

OPTS=-DRADIUS=1

CHARMC=../../../bin/charmc $(OPTS)

When I now use RADIUS in my .C file, the C preprocessor does its work nicely and recognizes that I have defined RADIUS, and also what its value is. However, when I use RADIUS in the .ci file, charmc croaks. So is it true that no preprocessor is run on .ci files? Thanks!

 

Rob





Archive powered by MHonArc 2.6.16.

Top of Page