Skip to Content.
Sympa Menu

charm - Re: [charm] zhenggb@gmail.com

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] zhenggb AT gmail.com


Chronological Thread 
  • From: 倪安宁 <nianning1981 AT 163.com>
  • To: "'Gengbin Zheng'" <gzheng AT illinois.edu>
  • Cc: charm AT cs.uiuc.edu
  • Subject: Re: [charm] zhenggb AT gmail.com
  • Date: Thu, 4 Mar 2010 13:19:54 +0800
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

Hi,
The mainchare "myMain" probably was not created when the GUI program
started up, while the graphical window of mytest.exe displayed. As I
inserted "CkPrintf("Mainchare start to create!\n");" into constructor -
myMain::myMain(CkArgMsg* m), but there was nothing output when mytest.exe
started up.
Besides, when I executed the command line in cygwin:
$ charmrun mytest.exe +p1
The error come:
Charmrun> error 0 attaching to node:
Timeout waiting for node-program to connect

How to create the mainchare by charm automatically when the GUI application
start up?

Thanks

Anning


-----邮件原件-----
发件人: Gengbin Zheng
[mailto:gzheng AT illinois.edu]

发送时间: 2010年3月4日 3:31
收件人: 倪安宁
抄送:
charm AT cs.uiuc.edu
主题: Re: [charm]
zhenggb AT gmail.com


Was myMain created at all (if you don't call myMain::ckNew)?
Mainchares are created by charm++ runtime. Maybe MFC created CmytestApp
at the very beginning, even before Charm++ starts.
You probably don't even want to make CmytestApp a chare if that is the case.

Gengbin

倪安宁 wrote:
>
> Hi,
>
> I have got from the charm++ programming language manual that “Every
> CHARM++ program must have at least one mainchare, Each mainchare is
> created by the system on processor 0 when the CHARM++ program starts
> up”. However, I am confused with the following question:
>
> I have developed a GUI program called “mytest” based on MFC and
> declared a charm++ class named “myMain” in my GUI program. However, I
> specified the class myMain as the mainchare in my .ci file. But when
> the GUI program starts up, the constructor and function InitInstance()
> of class CmytestApp will be executed firstly, not the constructor of
> class myMain. The I invoked myMain::ckNew( ) in the constructor of
> CmytestApp, but when run to the ckNew() the error occurred: “Unhandled
> exception at 0x004bc83e in mytest.exe: 0xC0000005: Access violation
> reading location 0x00000000.”
>
> I want to know which class should been specified as the mainchare in
> .ci file on earth, CmytestApp or myMain?
>
> If CmytestApp, how should I declare the CmytestApp class,
>
> class CmytestApp : public CWinApp, public Chare
>
> {}
>
> Or
>
> class CmytestApp : public Chare, public CWinApp
>
> {}
>
> Help me please!
>
> Thanks
>
> Anning
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> charm mailing list
> charm AT cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/charm
>







Archive powered by MHonArc 2.6.16.

Top of Page