Skip to Content.
Sympa Menu

charm - Re: [charm] [ppl] Compiling with automake

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] [ppl] Compiling with automake


Chronological Thread 
  • From: Gengbin Zheng <zhenggb AT gmail.com>
  • To: Fernando Stump <fernando.stump AT gmail.com>
  • Cc: Charm Mailing List <charm AT cs.illinois.edu>
  • Subject: Re: [charm] [ppl] Compiling with automake
  • Date: Wed, 9 Mar 2011 11:29:32 -0600
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

Have you tried using ampicxx instead of charmc?
It always should work (however with many hacks around).
You are from local, right? You can always come to our lab, find me or
someone else to look into this problem for you.

Gengbin

On Wed, Mar 9, 2011 at 11:25 AM, Fernando Stump
<fernando.stump AT gmail.com>
wrote:
> Hi Gengbin,
>
> If I can ask your take on this.
>
> I'm considering gave up of use automake and charmc. Instead I can write my
> own makefile. From your experience with automake and charmc how painful it
> is to do this.
>
> When you say that you had some success doing it. It is 2 out of 10 or 8 out
> of 10?
>
> Thanks for your opinion.
>
> Fernando
>
>
>
>
> On Mar 8, 2011, at 3:25 PM, Gengbin Zheng wrote:
>
>> We did several times before with some success, but I am afraid we did
>> not document the process.
>> There are lots of details related to particular machine, os or compilers.
>>
>> Gengbin
>>
>>
>> On Tue, Mar 8, 2011 at 3:16 PM, Fernando Stump
>> <fernando.stump AT gmail.com>
>> wrote:
>>>
>>>
>>> Begin forwarded message:
>>>
>>> From: Fernando Stump
>>> <fernando.stump AT gmail.com>
>>> Date: March 8, 2011 3:14:57 PM CST
>>> To: Phil Miller
>>> <mille121 AT illinois.edu>
>>> Cc: Charm Mailing List
>>> <charm AT cs.illinois.edu>
>>> Subject: Re: [ppl] [charm] Compiling with automake
>>>
>>> If we go on step back.
>>>
>>> I want to use parfum in a a large code with few dependencies. This code is
>>> currently compiled with the help of automake to create makefile. So
>>> instead
>>> of creating my own makefile ( as on the examples for charm++/parfum)  I
>>> wan
>>> to use automake and charmc.
>>>
>>> The question then: Have anyone used and documented automake (or cmake)
>>> with
>>> charmc?
>>>
>>> Thanks
>>> Fernando
>>>
>>>
>>>
>>> On Mar 8, 2011, at 3:03 PM, Phil Miller wrote:
>>>
>>> What about just disabling (i.e. commenting out or deleting) that
>>>
>>> configuration test, since you know that a) you really do want to build
>>>
>>> the library with charmc as the compiler, and b) charmc doesn't quite
>>>
>>> behave the way its tests expect.
>>>
>>> On Tue, Mar 8, 2011 at 15:00, Gengbin Zheng
>>> <zhenggb AT gmail.com>
>>> wrote:
>>>
>>> hmm, ok. what about trying  with  another charmc option:
>>>
>>> -language c++
>>>
>>> Gengbin
>>>
>>> On Tue, Mar 8, 2011 at 2:55 PM, Fernando Stump
>>> <fernando.stump AT gmail.com>
>>> wrote:
>>>
>>> To use -seq, make it fails on linking as described  below
>>>
>>> configure:5192: charmc -verbose -g -ld++ g++ -default-to-aout -seq
>>> -I/opt/local/include -I/Users/fstump2/lib/include -I/usr/lib/inc
>>>
>>> lude -L/opt/local/lib -L/Users/fstump2/lib/lib conftest.cpp -lloki >&5
>>>
>>> Verbose mode set
>>>
>>> Adding file conftest.cpp...
>>>
>>> charmc> ----------- Module dependency search complete ------------
>>>
>>> Compiling conftest.cpp
>>>
>>> charmc: Executing rm -f conftest.o conftest.f.o
>>>
>>> charmc: Executing g++ -fPIC -Wno-deprecated -DCMK_SEQUENTIAL=1
>>> -I/Users/fstump2/myLibs/charm-6.2/bin/../include -D__CHARMC__=1 -I/o
>>>
>>> pt/local/include -I/Users/fstump2/lib/include -I/usr/lib/include -g -c
>>> conftest.cpp -o conftest.o
>>>
>>> charmc: Executing gcc -fPIC -g -L/opt/local/lib -L/Users/fstump2/lib/lib
>>> -o
>>> a.out conftest.o -L/Users/fstump2/myLibs/charm-6.2/bin/
>>>
>>> ../lib -lloki
>>>
>>> Undefined symbols:
>>>
>>> "___gxx_personality_v0", referenced from:
>>>
>>>     _main in conftest.o
>>>
>>>     CIE in conftest.o
>>>
>>> ld: symbol(s) not found
>>>
>>> collect2: ld returned 1 exit status
>>>
>>> Fatal Error by charmc in directory
>>> /Users/fstump2/Documents/workspace/LibFEM/ssmlib/yafeq_non_linear
>>>
>>>  Command gcc -fPIC -g -L/opt/local/lib -L/Users/fstump2/lib/lib -o a.out
>>> conftest.o -L/Users/fstump2/myLibs/charm-6.2/bin/../lib
>>>
>>> -lloki returned error code 1
>>>
>>> charmc exiting...
>>>
>>>
>>> The error is because it tries to link with gcc instead of g++. I tried the
>>> option  -ld++ g++, but it seams to be ignored
>>>
>>> Thanks
>>>
>>> Fernando
>>>
>>>
>>>
>>> On Mar 8, 2011, at 1:28 PM, Gengbin Zheng wrote:
>>>
>>> maybe use charmc -seq, it does not assume it is a charm program by
>>>
>>> using "-seq" charmc compiler flag.
>>>
>>> Gengbin
>>>
>>> On Tue, Mar 8, 2011 at 12:49 PM, Fernando Stump
>>>
>>> <fernando.stump AT gmail.com>
>>> wrote:
>>>
>>> Hi,
>>>
>>> I realized that this error come from the fact that I'm trying to compile a
>>> pure c++ code as if it was charm++ (i.e. without the .ci)
>>>
>>> Undefined symbols:
>>>
>>> "_CkRegisterMainModule", referenced from:
>>>
>>>     _initCharm(int, char**)in libck.a(init.o)
>>>
>>> ld: symbol(s) not found
>>>
>>> collect2: ld returned 1 exit status
>>>
>>> My final goal is to use ParUFM, so I need to create the init() and
>>> driver()
>>> function. For now I would like to compile my code such that it starts form
>>> the main on my C file
>>>
>>> The question is: Which language should i set on charmc, such that it
>>> compile
>>> and link a plain c++ code.
>>>
>>> Thanks
>>>
>>> Fernando
>>>
>>> On Mar 8, 2011, at 12:24 PM, Fernando Stump wrote:
>>>
>>> Hi,
>>>
>>> With -default-to-aout ti compiles but I get a problem to link.
>>>
>>> If I try to compile a simple c++ file conftest.cpp
>>>
>>> I get this
>>>
>>> Fernando-Stumps-MacBook-Pro:test_charmc fstump2$ charmc -default-to-aout
>>> -verbose conftest.cpp
>>>
>>> Verbose mode set
>>>
>>> Adding file conftest.cpp...
>>>
>>> charmc> ----------- Module dependency search complete ------------
>>>
>>> Compiling conftest.cpp
>>>
>>> charmc: Executing rm -f conftest.o conftest.f.o
>>>
>>> charmc: Executing g++ -fPIC -Wno-deprecated -DCMK_GFORTRAN
>>> -I/Users/fstump2/myLibs/charm-6.2/bin/../include -D__CHARMC__=1 -c
>>> conftest.cpp -o conftest.o
>>>
>>> charmc: Executing g++ -fPIC -Wno-deprecated -DCMK_GFORTRAN -D__CHARMC__=1
>>> -c
>>> moduleinit17035.C -o moduleinit17035.o
>>>
>>> charmc> All libraries are: -L/Users/fstump2/myLibs/charm-6.2/bin/../lib
>>> -I/Users/fstump2/myLibs/charm-6.2/bin/../include
>>> /Users/fstump2/myLibs/charm-6.2/bin/../lib/libldb-rand.o conftest.o
>>> moduleinit17035.o
>>> /Users/fstump2/myLibs/charm-6.2/bin/../lib/libmemory-default.o
>>> /Users/fstump2/myLibs/charm-6.2/bin/../lib/libthreads-default.o -lck
>>> -lconv-cplus-y -lconv-core -lconv-util -lckqt -ldl -lm
>>>
>>> charmc: Executing g++ -o a.out
>>> -L/Users/fstump2/myLibs/charm-6.2/bin/../lib
>>> -I/Users/fstump2/myLibs/charm-6.2/bin/../include
>>> /Users/fstump2/myLibs/charm-6.2/bin/../lib/libldb-rand.o conftest.o
>>> moduleinit17035.o
>>> /Users/fstump2/myLibs/charm-6.2/bin/../lib/libmemory-default.o
>>> /Users/fstump2/myLibs/charm-6.2/bin/../lib/libthreads-default.o -lck
>>> -lconv-cplus-y -lconv-core -lconv-util -lckqt -ldl -lm
>>>
>>> Undefined symbols:
>>>
>>> "_CkRegisterMainModule", referenced from:
>>>
>>>     _initCharm(int, char**)in libck.a(init.o)
>>>
>>> ld: symbol(s) not found
>>>
>>> collect2: ld returned 1 exit status
>>>
>>> Fatal Error by charmc in directory
>>> /Users/fstump2/myLibs/charm-6.2/tests/charm++/test_charmc
>>>
>>>  Command g++ -o a.out -L/Users/fstump2/myLibs/charm-6.2/bin/../lib
>>> -I/Users/fstump2/myLibs/charm-6.2/bin/../include
>>> /Users/fstump2/myLibs/charm-6.2/bin/../lib/libldb-rand.o conftest.o
>>> moduleinit17035.o
>>> /Users/fstump2/myLibs/charm-6.2/bin/../lib/libmemory-default.o
>>> /Users/fstump2/myLibs/charm-6.2/bin/../lib/libthreads-default.o -lck
>>> -lconv-cplus-y -lconv-core -lconv-util -lckqt -ldl -lm returned error
>>> code 1
>>>
>>> charmc exiting...
>>>
>>> rm -f moduleinit17035.C moduleinit17035.o
>>>
>>>
>>> <conftest.cpp>
>>>
>>>
>>> Thanks
>>>
>>> Fernando
>>>
>>> On Mar 7, 2011, at 11:55 AM, Gengbin Zheng wrote:
>>>
>>> try adding:  -default-to-aout to  charmc  (adding to CFLAGS, or
>>>
>>> something), so that charmc produce a binary named a.out.
>>>
>>> Gengbin
>>>
>>> On Mon, Mar 7, 2011 at 10:57 AM, Fernando Stump
>>> <fstump2 AT illinois.edu>
>>> wrote:
>>>
>>> Hi,
>>>
>>> I'm trying to parallelize a finite element (FE) code with ParFum. The FE
>>> code uses automake to create the makefiles. I'm using g++ (gcc) to compile
>>> it.
>>>
>>> If I try to substitute CXX=g++ to CXX=charmc, when I call ./configure I
>>> get
>>> ab error because charmc cannot create a executable. Below is the error
>>> log.
>>>
>>> Is thee any manual/tutorial about using automake (or cmake) with charm++
>>> or
>>> ParFum
>>>
>>> Thanks
>>>
>>> Fernando
>>>
>>>
>>> configure:5192:
>>> /Users/fstump2/myLibs/charm-6.2/net-darwin-x86-gfortran-gcc/bin/charmc
>>> -verbose -g -I/opt/local/include -I/Users/fstump2/lib/include
>>> -I/usr/lib/include -L/opt/local/lib -L/Users/fstump2/lib/lib conftest.cpp
>>> -lloki >&5
>>>
>>> Verbose mode set
>>>
>>> Adding file conftest.cpp...
>>>
>>> charmc> ----------- Module dependency search complete ------------
>>>
>>> Compiling conftest.cpp
>>>
>>> charmc: Executing rm -f conftest.o conftest.f.o
>>>
>>> charmc: Executing g++ -fPIC -Wno-deprecated -DCMK_GFORTRAN
>>> -I/Users/fstump2/myLibs/charm-6.2/net-darwin-x86-gfortran-gcc/bin/../include
>>> -D__CHARMC__=1 -I/opt/local/include -I/Users/fstump2/lib/include
>>> -I/usr/lib/include -g -c conftest.cpp -o conftest.o
>>>
>>> charmc> No target object-- finished
>>>
>>> configure:5196: $? = 0
>>>
>>> configure:5234: result: no
>>>
>>> configure: failed program was:
>>>
>>> | /* confdefs.h */
>>>
>>> | #define PACKAGE_NAME "yafeq"
>>>
>>> | #define PACKAGE_TARNAME "yafeq"
>>>
>>> | #define PACKAGE_VERSION "0.0.1"
>>>
>>> | #define PACKAGE_STRING "yafeq 0.0.1"
>>>
>>> | #define PACKAGE_BUGREPORT "Alejandro Aragon
>>> <alejandro.aragon AT gmail.com>"
>>>
>>> | #define PACKAGE_URL ""
>>>
>>> | #define PACKAGE "yafeq"
>>>
>>> | #define VERSION "0.0.1"
>>>
>>> | /* end confdefs.h.  */
>>>
>>> |
>>>
>>> | int
>>>
>>> | main ()
>>>
>>> | {
>>>
>>> |
>>>
>>> |   ;
>>>
>>> |   return 0;
>>>
>>> | }
>>>
>>> configure:5239: error: in
>>> `/Users/fstump2/Documents/workspace/LibFEM/ssmlib/yafeq_non_linear':
>>>
>>> configure:5241: error: C++ compiler cannot create executables
>>>
>>>
>>> _______________________________________________
>>>
>>> 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
>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> 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
>>>
>>>
>>>
>>>
>
>





Archive powered by MHonArc 2.6.16.

Top of Page