charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Jozsef Bakosi <jbakosi AT lanl.gov>
- To: charm AT lists.cs.illinois.edu
- Subject: [charm] Migration of bound arrays
- Date: Tue, 8 Jan 2019 16:20:56 -0700
- Authentication-results: illinois.edu; spf=pass smtp.mailfrom=jbakosi AT lanl.gov; dkim=pass header.d=lanl.gov header.s=lanl; dmarc=pass header.from=lanl.gov
Hi folks,
Consider the following:
=========================================
class A : public CProxy_A {
public:
A() { usesAtSync = true; }
};
class B : public CProxy_B {
public:
B( CProxy_A& a ) : m_a( a ) {}
void pup( PUP::er& p ) { p | m_a; }
A* aptr() { return m_a[ thisIndex ].ckLocal(); }
void step() { if (time to migrate) aptr()->AtSync(); }
private:
CProxy_A m_a;
};
CProxy_A a = CProxy_A::ckNew();
CkArrayOptions bound;
bound.bindTo( a );
CProxy_B b = CProxy_B::ckNew( bound );
a[0].insert();
b[0].insert( a );
a.doneInserting();
b.doneInserting();
=========================================
In words: I have two bound chare arrays, A and B. In B I hold a proxy to
A and dereference it via aptr() to get a raw pointer to the bound object.
B::step() is called in some iteration and which when it is time to
migrate, calls A::AtSync(). Calling aptr() has worked so far fine
without migration. When I migrate, however, I randomly get segfaults
from aptr().
Questions:
1. Is this a correct way of migrating A and B together?
2. Is this a correct way of using usesAtSync and AtSync?
3. Is it mandatory to pup m_a as written above?
4. How do I know that calling aptr() is safe after migration? In other
words, how do I know that when I call B::aptr() A has already arrived?
Thanks,
Jozsef
- [charm] Migration of bound arrays, Jozsef Bakosi, 01/08/2019
- <Possible follow-up(s)>
- Re: [charm] Migration of bound arrays, Ronak Buch, 01/10/2019
- Re: [charm] Migration of bound arrays, Jozsef Bakosi, 01/24/2019
- Re: [charm] Migration of bound arrays, Jozsef Bakosi, 01/24/2019
- Re: [charm] Migration of bound arrays, Jozsef Bakosi, 01/24/2019
Archive powered by MHonArc 2.6.19.