charm AT lists.siebelschool.illinois.edu
Subject: Charm++ parallel programming system
List archive
- From: Hrushit Parikh <parikhhrushit AT hotmail.com>
- To: Yanhua Sun <sun51 AT illinois.edu>
- Cc: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
- Subject: Re: [charm] [ppl] Extern in conv-ldb
- Date: Fri, 29 Aug 2014 04:11:51 -0400
- List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
- List-id: CHARM parallel programming system <charm.cs.uiuc.edu>
Hi,
Yes, you are right.
The Makefile I was using was building 2 executables: -balance neighbour
-balance workstealing
So I was getting the error because in linking the workstealing balancer it could not find a reference to findLoad() as it is only defined in cldb.neighbour.c
Building only the -balance neighbour executable worked.
Thank you for your help!
Hrushit
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.YanhuaOn 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 SunUniversity 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.