Skip to Content.
Sympa Menu

charm - RE: [charm] Problems with the initnode in a distributed loadbalancer (Charm++)

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

RE: [charm] Problems with the initnode in a distributed loadbalancer (Charm++)


Chronological Thread 
  • From: "Chandrasekar, Kavitha" <kchndrs2 AT illinois.edu>
  • To: Jozsef Bakosi <jbakosi AT lanl.gov>, Vinicius Freitas <vinicius.mct.freitas AT gmail.com>
  • Cc: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
  • Subject: RE: [charm] Problems with the initnode in a distributed loadbalancer (Charm++)
  • Date: Mon, 13 Mar 2017 21:06:00 +0000
  • Accept-language: en-US

Hi Vinicius,

Could you please try the steps in the manual in Section 24.6
http://charm.cs.illinois.edu/manuals/html/charm++/24.html#SECTION03160000000000000000
and see if they work for adding the new distributed LB? Adding and building
a new distributed LB by following the listed steps seems to work okay for me.

Thanks,
Kavitha
________________________________________
From: Jozsef Bakosi
[jbakosi AT lanl.gov]
Sent: Monday, March 13, 2017 2:51 PM
To: Vinicius Freitas
Cc:
charm AT cs.uiuc.edu
Subject: Re: [charm] Problems with the initnode in a distributed loadbalancer
(Charm++)

Hi Vinicius,

Without MyLB.[Ch], I can only guess, that lbinit() seems like a free function
for Charm++ (as you put it outside of the group declaration, while the C++
definition/declaration of lbinit() is done as a member of MyLB?

How about putting the initnode routine inside the group, such as

group [migratable] MyLB : DistBaseLB {
initnode void lbinit(void);
entry void MyLB(const CkLBOptions &);
...
};

and declaring it a static member function inside MyLB or leaving the ci as it
is, but moving lbinit outside of MyLB?

Jozsef

On 03.13.2017 15:31, Vinicius Freitas wrote:
> Hello,
> I've been developing my own distributed loadbalancing strategy from
> scratch, and found a problem I couldn't solve and couldn't find
> solutions online.
> It looks like the initnode declared in my .ci file (lbinit) is not
> being identified properly in the .def.h file, the error says it hasn't
> being previously declared.
> I followed the pattern of the InitLB, initnode and Strategy methods
> found in DistributedLB, from my point of view I could not find any
> obvious problems, maybe you could help me? The .ci file and the
> messages during compilation are the following:
> CI file:
> module MyLB {
> extern module DistBaseLB;
> initnode void lbinit(void);
> group [migratable] MyLB : DistBaseLB {
> entry void MyLB(const CkLBOptions &);
> entry [expedited] void PackAck(int pack_id, int from);
> entry [expedited] void RecvAck(int pack_id, int to, bool success);
> entry void SendInfo(int count, int recs[count]);
> entry void EndStep();
> entry [reductiontarget] void Load_Setup(double total_load);
> entry [reductiontarget] void Chare_Setup(int count);
> entry [reductiontarget] void Final_Barrier();
> };
> };
> Error Message:
> ../bin/charmc -optimize -production -I. -std=c++11 -c -o MyLB.o
> MyLB.C
> In file included from MyLB.C:193:0:
> MyLB.def.h: In function ‘void _registerMyLB()’:
> MyLB.def.h:1570:21: error: ‘lbinit’ was not declared in this scope
> _registerInitCall(lbinit,1);
> ^
> Fatal Error by charmc in directory /home/vinicius/charm/tmp
> Command g++ -m64 -I../bin/../include -D__CHARMC__=1 -I. -std=c++11
> -O3 -U_FORTIFY_SOURCE -fno-stack-protector -std=c++0x -c MyLB.C -o
> MyLB.o returned error code 1
> charmc exiting...
> make: *** [MyLB.o] Error 1
> --
> Vinicius Marino Calvo Torres de Freitas
> Computer Science Undergratuate Student (Aluno de graduação em Ciência da
> Computa
> ção)
> Research Assistant at the Embedded Computing Laboratory at UFSC
> UFSC - CTC - INE - ECL, Brazil
> Email:
> [1]vinicius.mctf AT grad.ufsc.br
> or
> [2]vinicius.mct.freitas AT gmail.com
> Tel: [3]+55 (48) 96163803
>
> References
>
> 1.
> mailto:vinicius.mctf AT grad.ufsc.br
> 2.
> mailto:vinicius.mct.freitas AT gmail.com
> 3. tel:+55 48 9616-3803



Archive powered by MHonArc 2.6.19.

Top of Page