Skip to Content.
Sympa Menu

charm - [charm] Using static data member with ParFUM

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

[charm] Using static data member with ParFUM


Chronological Thread 
  • From: Fernando Stump <fernando.stump AT gmail.com>
  • To: Charm Mailing List <charm AT cs.illinois.edu>
  • Cc: Soheil Soghrati <soheilsoghrati AT gmail.com>
  • Subject: [charm] Using static data member with ParFUM
  • Date: Fri, 9 Sep 2011 10:50:18 -0500
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

Hi, 
 
I'm using ParFUM to parallelize a C++ FEM code called yafeq. And I'm concerned about the use of static data member inside Yafeq. Since I'm not very familiar with static data member. Here it is link for what I mean by this

http://msdn.microsoft.com/en-us/library/b1b5y48f.aspx
 
So yafeq use static containers such as "set_"in this example. That belongs to a purely virtual class (Material_base)


class Material_base {
.
.
.
typedef std::set<Material_property_type> property_set;
.
.
.
    static property_set set_;                //!< Keep track of properties used.
.
.
.
}

This container (set_) is being populated in a function that runs in parallel i.e. a function that initialize set_ is called inside ParFUM driver() which of course can run in parallel in the same node.  Semantically I want that each driver have its own (set_).

Reading on Charm++ and Converse manual, I believe that this is a potential source of errors, because the static data member may be shared among processes. 

So I would like to ask if this is indeed the case. 

If so, is there a way to solve this issue without removing the static data members from the code. 

 
Thanks
Fernando




Archive powered by MHonArc 2.6.16.

Top of Page