Skip to Content.
Sympa Menu

charm - Re: [charm] multiphase shared array questions

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] multiphase shared array questions


Chronological Thread 
  • From: Phil Miller <mille121 AT illinois.edu>
  • To: Jae-Seung Yeom <jyeom AT vbi.vt.edu>
  • Cc: Eric Bohm <ebohm AT illinois.edu>, Charm Mailing List <charm AT cs.illinois.edu>, Robert Brunner <rbrunner AT illinois.edu>
  • Subject: Re: [charm] multiphase shared array questions
  • Date: Sat, 25 Jun 2011 20:50:29 -0700
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

You've hit one of the warts in Charm++, that users must define a
constructor that takes CkMigrateMessage* for all chare types, but
doesn't want it declared in the .ci file. In your test code, removing
line 26 of t3.ci eliminates the error.

I think I'll fix this by making charmxi ignore that superfluous
declaration, since it takes it for granted anyway.

On Thu, Jun 23, 2011 at 10:20, Jae-Seung Yeom
<jyeom AT vbi.vt.edu>
wrote:
> Phil,
>
> I have another question. I am trying to use another 1D array which is not
> MSA together with MSA 1D array in the same code.
> So, what I tried is to add the following lines to codes to t3.C and t3.ci
> in the attached example.
>
> -------------------------------------
> class Pman : public CBase_Pman
> {
>  public:
>    Pman() { }
>    Pman(CkMigrateMessage*) { }
>    void init() { }
>    void doWork() {}
> };
> --------------------------------------
> and
> ----------------------------------------
>    array [1D] Pman
>    {
>        entry Pman();
>        entry Pman(CkMigrateMessage*);
>        entry void init();
>        entry void doWork();
>    };
> -----------------------------------------
>
>
> Then, I am getting compiler error as follows
> ----------------------------------------------------------
> make OPTS="-O3 -O0" t3
> make[1]: Entering directory `/home/jyeom/multiphaseSharedArrays/simpletest'
> /vbi/projects/charm-6.3-mpi-linux-x86_64/bin/charmc -language charm++ -O3
> -O0 -c t3.ci
> touch headers
> /vbi/projects/charm-6.3-mpi-linux-x86_64/bin/charmc -language charm++ -O3
> -O0 -c t3.C
> t3.decl.h:422: error: declaration of ‘int
> CkIndex_Pman::__idx_Pman_CkMigrateMessage’
> t3.decl.h:410: error: conflicts with previous declaration ‘int
> CkIndex_Pman::__idx_Pman_CkMigrateMessage’
> t3.decl.h:423: error: ‘static int CkIndex_Pman::ckNew(CkMigrateMessage*)’
> cannot be overloaded
> t3.decl.h:411: error: with ‘static int
> CkIndex_Pman::ckNew(CkMigrateMessage*)’
> t3.decl.h:424: error: ‘static void
> CkIndex_Pman::_call_Pman_CkMigrateMessage(void*, Pman*)’ cannot be
> overloaded
> t3.decl.h:412: error: with ‘static void
> CkIndex_Pman::_call_Pman_CkMigrateMessage(void*, Pman*)’
> t3.def.h:417: error: redefinition of ‘int
> CkIndex_Pman::__idx_Pman_CkMigrateMessage’
> t3.def.h:382: error: ‘int CkIndex_Pman::__idx_Pman_CkMigrateMessage’
> previously defined here
> t3.def.h:418: error: redefinition of ‘static void
> CkIndex_Pman::_call_Pman_CkMigrateMessage(void*, Pman*)’
> t3.def.h:383: error: ‘static void
> CkIndex_Pman::_call_Pman_CkMigrateMessage(void*, Pman*)’ previously defined
> here
> t3.def.h: In static member function ‘static void
> CkIndex_Pman::__register(const char*, size_t)’:
> t3.def.h:505: error: ‘CMessage_CkMigrateMessage’ has not been declared
> Fatal Error by charmc in directory
> /home/jyeom/multiphaseSharedArrays/simpletest
>   Command g++ -fPIC -Wno-deprecated
> -I/vbi/projects/charm-6.3-mpi-linux-x86_64/bin/../include -D__CHARMC__=1
> -O3 -O0 -fno-stack-protector -c t3.C -o t3.o returned error code 1
> charmc exiting...
> make[1]: *** [t3.o] Error 1
> make[1]: Leaving directory `/home/jyeom/multiphaseSharedArrays/simpletest'
> make: *** [opt] Error 2
> --------------------------------------------------------------
>
> Can you tell me what I am doing wrong?
>
>
> Jae-Seung





Archive powered by MHonArc 2.6.16.

Top of Page