
00001 /* 00002 Threaded Charm++ "Framework Framework" Startup: 00003 This file controls the startup process when writing 00004 to a tcharm-based language, like AMPI or the FEM framework. 00005 00006 Note that you could also start a bunch of AMPI threads 00007 from a regular Charm program, which would use its own 00008 main instead of this one. 00009 00010 Orion Sky Lawlor, olawlor@acm.org, 2003/6/20 00011 */ 00012 #include "tcharm_impl.h" 00013 #include "tcharm.h" 00014 #include "tcharmmain.decl.h" 00015 00016 //Tiny simple main chare 00017 class TCharmMain : public Chare { 00018 public: 00019 static void nodeInit(void) { 00020 TCHARM_User_node_setup(); 00021 FTN_NAME(TCHARM_USER_NODE_SETUP,tcharm_user_node_setup)(); 00022 } 00023 00024 TCharmMain(CkArgMsg *msg) { 00025 delete msg; 00026 00027 TCHARM_Set_exit(); // Exit when done running these threads. 00028 00029 /*Call user-overridable Fortran setup. 00030 If not overridden, this will call the overridable C setup, 00031 which unless overridden will call the library "fallback" setup, 00032 which usually starts a bunch of TCharm threads running 00033 something like "MPI_Main" (AMPI) or "driver" (FEM). 00034 */ 00035 FTN_NAME(TCHARM_USER_SETUP,tcharm_user_setup)(); 00036 } 00037 }; 00038 00039 #include "tcharmmain.def.h"
1.5.5