charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Yanhua Sun <sun51 AT illinois.edu>
- To: Hrushit Parikh <parikhhrushit AT hotmail.com>
- Cc: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
- Subject: Re: [charm] [ppl] Extern in conv-ldb
- Date: Thu, 28 Aug 2014 11:08:36 -0500
- List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
- List-id: CHARM parallel programming system <charm.cs.uiuc.edu>
If you add '-balancer neighbor', that should be correctly linked. If you do not add this, it will link other modules by default.
In this case, you need to add 'int findLoad(int m, char *msg )' in other cldb.*.c files. That should fix the problem.
Yanhua
On Sat, Aug 23, 2014 at 10:28 PM, Hrushit Parikh <parikhhrushit AT hotmail.com> wrote:
Hi,
I have a function " int findLoad(int m, char *msg ) " in charm/src/conv-ldb/cldb.neighbour.c
I wish to call this function in charm/src/conv-core/convcore.c
I declared extern void findLoad(int, char *) in convcore.c and tried calling the function. The charm library builds fine but when I make any charm++ example I get an error:
convcore.c:(.text+0x1911): undefined reference to `findLoad()'
How do I call this function in convcore.c?
I am surprised this does not work because an exactly similar approach is used in convcore.c to call CldModuleInit(char **argv). This function is declared in cldb.neighbour.c. It is defined as an extern in convcore.c and then called subsquently and this works perfectly.
So why is it not work for a user-defined function call?
Thank you,
Hrushit
_______________________________________________
charm mailing list
charm AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/charm
_______________________________________________
ppl mailing list
ppl AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/ppl
Yours Sincerely,
Yanhua Sun
University of Illinois at Urbana-Champaign,
- [charm] Extern in conv-ldb, Hrushit Parikh, 08/23/2014
- Re: [charm] Extern in conv-ldb, Hrushit Parikh, 08/23/2014
- Re: [charm] [ppl] Extern in conv-ldb, Yanhua Sun, 08/28/2014
- Re: [charm] [ppl] Extern in conv-ldb, Hrushit Parikh, 08/29/2014
Archive powered by MHonArc 2.6.16.