Skip to Content.
Sympa Menu

charm - [charm] Small fix on barnes-charm

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

[charm] Small fix on barnes-charm


Chronological Thread 
  • From: Laércio Lima Pilla <llpilla AT inf.ufrgs.br>
  • To: Charm Mailing List <charm AT cs.illinois.edu>
  • Subject: [charm] Small fix on barnes-charm
  • Date: Thu, 30 Aug 2012 15:42:07 +0200
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

Hi,

I was checking your Charm++ implementation of the Barnes-Hut method on examples/charm++/barnes-charm.

I was having the following error when trying to compile with the command "make"

make
../../../multicore-linux64/bin/charmc -g -O3  -c TreePiece.cpp
In file included from TreePiece.cpp:1:0:
barnes.h:260:72: error: conflicting declaration ‘CkArrayIndex1D parent’
barnes.h:260:22: error: ‘parent’ has a previous declaration as ‘CmiUInt8 parent’
TreePiece.cpp:57:1: error: prototype for ‘TreePiece::TreePiece(CmiUInt8, int, int, CkArrayIndex1D)’ does not match any in class ‘TreePiece’
barnes.h:211:7: error: candidates are: TreePiece::TreePiece(const TreePiece&)
barnes.h:262:3: error:                 TreePiece::TreePiece(CkMigrateMessage*)
TreePiece.cpp:3:1: error:                 TreePiece::TreePiece(CmiUInt8, int, int, real, real, real, real, CkArrayIndex1D)
barnes.h:260:3: error:                 TreePiece::TreePiece(CmiUInt8, int, int)
Fatal Error by charmc in directory /home/pilla/numalb/src/charm/examples/charm++/barnes-charm
   Command g++ -D_REENTRANT -m64 -I../../../multicore-linux64/bin/../include -D__CHARMC__=1 -g -O3 -fno-stack-protector -I/home/pilla/scotch_5.1.12/include -I/home/pilla/hwloc/include -c TreePiece.cpp -o TreePiece.o returned error code 1
charmc exiting...

I came with the following fix:

--- a/examples/charm++/barnes-charm/barnes.h
+++ b/examples/charm++/barnes-charm/barnes.h
@@ -257,8 +257,8 @@ class TreePiece : public CBase_TreePiece {
   vector rmin;

   public:
-  TreePiece(CmiUInt8 parent, int whichChild, int level, CkArrayIndex1D parent);
-  TreePiece(CmiUInt8 p, int which, int level, real rx, real ry, real rz, real rs, CkArrayIndex1D parent);
+  TreePiece(CmiUInt8 p, int whichChild, int level, CkArrayIndex1D parent);
+  TreePiece(CmiUInt8 p_, int which, int level_, real rx, real ry, real rz, real rs, CkArrayIndex1D parent);

I hope you can use it in the next commit :)

Best regards,

--
Laércio LIMA PILLA

PhD Student at 
- Federal University of Rio Grande do Sul (UFRGS) - Brazil
- Grenoble University - France
Email: laercio.pilla AT inf.ufrgs.br or laercio.lima.pilla AT gmail.com 
Tel: +33 (0)6 49 87 68 29
Website: www.inf.ufrgs.br/~llpilla



  • [charm] Small fix on barnes-charm, Laércio Lima Pilla, 08/30/2012

Archive powered by MHonArc 2.6.16.

Top of Page