Skip to Content.
Sympa Menu

charm - [charm] zhenggb@gmail.com

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

[charm] zhenggb AT gmail.com


Chronological Thread 
  • From: 倪安宁 <nianning1981 AT 163.com>
  • To: <charm AT cs.uiuc.edu>
  • Subject: [charm] zhenggb AT gmail.com
  • Date: Wed, 3 Mar 2010 17:50:19 +0800
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

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




Archive powered by MHonArc 2.6.16.

Top of Page