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: Phil Miller <mille121 AT illinois.edu>
  • 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: Tue, 8 Mar 2011 15:03:54 -0600
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

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