charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Jonah Miller <jonah.maxwell.miller AT gmail.com>
- To: Jozsef Bakosi <jbakosi AT gmail.com>
- Cc: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
- Subject: Re: [charm] messages, pup, and C++ templates
- Date: Thu, 25 Jun 2015 14:07:14 -0400
- List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
- List-id: CHARM parallel programming system <charm.cs.uiuc.edu>
Hi Jozsef, Ah, I see. Yes, I somehow missed this. Now it works. Thanks for your help! Best, Jonah On 15-06-25 01:20 PM, Jozsef Bakosi
wrote:
Hi Jonah,
Did you make sure all template specializations used in your
code are listed in the .ci file, such as
message ValueMsg< int >;
and that the header file has the CK_TEMPLATES_ONLY define,
such as
#define CK_TEMPLATES_ONLY
#include "msg.def.h"
#undef CK_TEMPLATES_ONLY
in the bottom?
See also: http://charm.cs.illinois.edu/manuals/html/charm++/15.html
Jozsef
On Thu, Jun 25, 2015 at 8:07 AM, Jonah
Miller <jonah.maxwell.miller AT gmail.com>
wrote:
Hello everyone, I would like to template a new message type by a variable type so that I can treat it as a generic variable container. However, I'm having a bit of trouble. The following code is in my module file: template<typename value_t> message ValueMsg; and the commensurate implementation is: template<typename value_t> class ValueMsg : public CMessage_ValueMsg<value_t> { public: value_t value; ValueMsg() { } ValueMsg(value_t v) { value = v; } }; In the linking stage of compilation, I get a bunch of errors of the following type: In function `CMessage_ValueMsg<int>::operator delete(void*)': /home/jmiller/programming/charmploration/fibonacci-futures/fib.decl.h:105: undefined reference to `CMessage_ValueMsg<int>::dealloc(void*)' /home/jmiller/programming/charmploration/fibonacci-futures/fib.cpp:53: undefined reference to `CMessage_ValueMsg<int>::operator new(unsigned long, int)' Is there something I'm doing wrong? Or is templating messages simply not possible? Alternatively, is it possible to use the PUP framework to define the serialization for a message, if I want to, for example use futures? Thanks in advance for your help! Best, Jonah Miller _______________________________________________ charm mailing list charm AT cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/charm |
- [charm] messages, pup, and C++ templates, Jonah Miller, 06/25/2015
- Re: [charm] messages, pup, and C++ templates, Jozsef Bakosi, 06/25/2015
- Re: [charm] messages, pup, and C++ templates, Jonah Miller, 06/25/2015
- Re: [charm] messages, pup, and C++ templates, Jozsef Bakosi, 06/25/2015
Archive powered by MHonArc 2.6.16.