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: Gengbin Zheng <gzheng AT illinois.edu>
  • To: 倪安宁 <nianning1981 AT 163.com>
  • Cc: charm AT cs.uiuc.edu
  • Subject: Re: [charm] zhenggb AT gmail.com
  • Date: Wed, 03 Mar 2010 13:31:24 -0600
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>


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