Charm++ compiler will compile the .ci file into two files, .decl.h and .def.h.
But there is a little bug in this scenario, the compiler put the "extern rov" in the .def.h file.
What is wrong with that? Because when we write a module for other application, other users will only include the .decl.h file but not the .def.h file. So the extern statement should be in the .decl.h file. However, you can extern the rov in your .h file, then other users who want to use your module have to include that file too.
Showing posts with label parallel programming. Show all posts
Showing posts with label parallel programming. Show all posts
27 September, 2007
19 April, 2007
Charm++: Design Your Parallel Program
You can to divide your program into many stage, and you have to make sure your will run stage by stage. Otherwise, you will encounter very weird problem.
It is possible to your program that it jump stage to stage, so be careful of the ordering.
It is possible to your program that it jump stage to stage, so be careful of the ordering.
18 April, 2007
Charm++: User-Defined type
How to use user-defined type in charm++?
In ooxx.C, put the class/struct declaration before "#include "ooxx.decl.h"", and insert "#include "charm++.h" " at the first line.
For example:
#include "charm++"
class myclass
{
public:
void sayhi(){}
void pup(PUP::er &p){}
};
#include "haha.decl.h"
your code...
Remember to implement the PUP method for your classes.
In ooxx.C, put the class/struct declaration before "#include "ooxx.decl.h"", and insert "#include "charm++.h" " at the first line.
For example:
#include "charm++"
class myclass
{
public:
void sayhi(){}
void pup(PUP::er &p){}
};
#include "haha.decl.h"
your code...
Remember to implement the PUP method for your classes.
Subscribe to:
Posts (Atom)