Skip to Content.
Sympa Menu

charm - [charm] Charm++ Template Compilation issue

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

[charm] Charm++ Template Compilation issue


Chronological Thread 
  • From: Jonathan Hoelzel <hoelzel2 AT illinois.edu>
  • To: charm AT cs.illinois.edu
  • Subject: [charm] Charm++ Template Compilation issue
  • Date: Wed, 16 Jan 2019 11:52:25 -0600
  • Authentication-results: illinois.edu; spf=pass smtp.mailfrom=hoelzel2 AT illinois.edu; dkim=pass header.d=illinois-edu.20150623.gappssmtp.com header.s=20150623; dmarc=pass header.from=illinois.edu

Hello,

I am working on a project using Charm++, and I have run into a compilation issue when trying to implement a templated chare.  I have attached a zip file with some example code that causes this problem.

Specifically, I get the following error when linking:

main.o: In function `_registermain()':
main.C:(.text+0x562): undefined reference to `_registerchild()'
collect2: error: ld returned 1 exit status

Looking in the child.def.h file, the '_registerchild()' method is only defined if CK_TEMPLATES_ONLY is not set when including child.def.h file.   However, if I include child.def.h again without setting CK_TEMPLATES_ONLY, then I get a similar error saying "multiple definition of 'registerchild()'".  I have been unable to work this out myself, so some help would be great.

Thanks,
Jonathan Hoelzel

Computer Science | College of Engineering
University of Illinois at Urbana-Champaign

Attachment: problem_example.zip
Description: Zip compressed data




Archive powered by MHonArc 2.6.19.

Top of Page