Skip to Content.
Sympa Menu

charm - Re: [charm] Compile Charm++ on Mac OS

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] Compile Charm++ on Mac OS


Chronological Thread 
  • From: Aaron Becker <abecker3 AT illinois.edu>
  • To: Bruno Rodrigues <bbrodrigues AT gmail.com>
  • Cc: charm AT cs.uiuc.edu, Isaac Dooley <idooley2 AT uiuc.edu>
  • Subject: Re: [charm] Compile Charm++ on Mac OS
  • Date: Fri, 30 Jul 2010 20:11:12 -0500
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

If you run make in the tests directory, it will compile a lot of tests
that require optional libraries that aren't built when you run
"./build charm++". This is why libraries are missing when it tries to
link some of the tests. To do core charm tests only, run make inside
tests/charm++. To build the optional libraries required by the other
tests, you can do "./build LIBS" instead of "./build charm++".

Regards,
Aaron Becker

On Fri, Jul 30, 2010 at 6:43 PM, Bruno Rodrigues
<bbrodrigues AT gmail.com>
wrote:
> Hi Isaac,
>
> Thank you for the quick reply. I have a core2duo intel based mac.
> For the first build, everything worked fine, with no errors. Then I cd to
> the tests directory and run the make command, and the following errors were
> reported:
>
> make
> for d in util charm++ converse ampi fem; do \
>         (cd $d && make all OPTS='' || exit 1) || exit 1; \
>     done
> ../../bin/charmc  -c check.C
> ../../bin/charmc  -o check check.o -language converse++
> for d in megatest pingpong simplearrayhello loadbalancing chkpt delegation
> queue sdag; do \
>         (cd $d; make all OPTS='' TESTOPTS='' || exit 1) || exit 1; \
>     done
> ../../../bin/charmc  -c megatest.ci
> ../../../bin/charmc  -o megatest.o megatest.C
> ../../../bin/charmc  -c groupring.ci
> ../../../bin/charmc  -o groupring.o groupring.C
> ../../../bin/charmc  -c nodering.ci
> ../../../bin/charmc  -o nodering.o nodering.C
> ../../../bin/charmc  -c varsizetest.ci
> ../../../bin/charmc  -o varsizetest.o varsizetest.C
> ../../../bin/charmc  -c varraystest.ci
> ../../../bin/charmc  -o varraystest.o varraystest.C
> ../../../bin/charmc  -c groupcast.ci
> ../../../bin/charmc  -o groupcast.o groupcast.C
> ../../../bin/charmc  -c groupmulti.ci
> ../../../bin/charmc  -o groupmulti.o groupmulti.C
> ../../../bin/charmc  -c groupsectiontest.ci
> ../../../bin/charmc  -o groupsectiontest.o groupsectiontest.C
> ../../../bin/charmc  -c multisectiontest.ci
> ../../../bin/charmc  -o multisectiontest.o multisectiontest.C
> ../../../bin/charmc  -c nodecast.ci
> ../../../bin/charmc  -o nodecast.o nodecast.C
> ../../../bin/charmc  -c synctest.ci
> ../../../bin/charmc  -o synctest.o synctest.C
> ../../../bin/charmc  -c fib.ci
> ../../../bin/charmc  -o fib.o fib.C
> ../../../bin/charmc  -c arrayring.ci
> ../../../bin/charmc  -o arrayring.o arrayring.C
> ../../../bin/charmc  -c tempotest.ci
> ../../../bin/charmc  -o tempotest.o tempotest.C
> ../../../bin/charmc  -c packtest.ci
> ../../../bin/charmc  -o packtest.o packtest.C
> ../../../bin/charmc  -c queens.ci
> ../../../bin/charmc  -o queens.o queens.C
> ../../../bin/charmc  -c migration.ci
> ../../../bin/charmc  -o migration.o migration.C
> ../../../bin/charmc  -c marshall.ci
> ../../../bin/charmc  -o marshall.o marshall.C
> ../../../bin/charmc  -c priomsg.ci
> ../../../bin/charmc  -o priomsg.o priomsg.C
> ../../../bin/charmc  -c priotest.ci
> ../../../bin/charmc  -o priotest.o priotest.C
> ../../../bin/charmc  -c rotest.ci
> ../../../bin/charmc  -o rotest.o rotest.C
> ../../../bin/charmc  -o statistics.o statistics.C
> ../../../bin/charmc  -c templates.ci
> ../../../bin/charmc  -o templates.o templates.C
> ../../../bin/charmc  -c inherit.ci
> ../../../bin/charmc  -o inherit.o inherit.C
> ../../../bin/charmc  -c reduction.ci
> ../../../bin/charmc  -o reduction.o reduction.C
> ../../../bin/charmc  -c bitvector.ci
> ../../../bin/charmc  -o bitvector.o bitvector.C
> ../../../bin/charmc  -c immediatering.ci
> ../../../bin/charmc  -o immediatering.o immediatering.C
> ../../../bin/charmc  -c callback.ci
> ../../../bin/charmc  -o callback.o callback.C
> ../../../bin/charmc  -c inlineem.ci
> ../../../bin/charmc  -o inlineem.o inlineem.C
> ../../../bin/charmc  -o pgm  megatest.o groupring.o nodering.o varsizetest.o
> varraystest.o groupcast.o groupmulti.o groupsectiontest.o multisectiontest.o
> nodecast.o synctest.o fib.o arrayring.o tempotest.o packtest.o queens.o
> migration.o marshall.o priomsg.o priotest.o rotest.o statistics.o
> templates.o inherit.o reduction.o bitvector.o immediatering.o callback.o
> inlineem.o  -language charm++
> ../../../bin/charmc   pingpong.ci
> touch cifiles
> ../../../bin/charmc  -I../../../src/conv-core pingpong.C
> pingpong.C: In constructor ‘main::main(CkArgMsg*)’:
> pingpong.C:109: warning: deprecated conversion from string constant to
> ‘char*’
> pingpong.C:110: warning: deprecated conversion from string constant to
> ‘char*’
> pingpong.C: In member function ‘void main::maindone()’:
> pingpong.C:129: warning: deprecated conversion from string constant to
> ‘char*’
> pingpong.C: In constructor ‘PingF::PingF()’:
> pingpong.C:451: warning: deprecated conversion from string constant to
> ‘char*’
> pingpong.C: In member function ‘void PingF::start()’:
> pingpong.C:456: warning: deprecated conversion from string constant to
> ‘char*’
> ../../../bin/charmc  -language charm++ -o pgm pingpong.o
> ../../../bin/charmc   hello.ci
> ../../../bin/charmc  -c hello.C
> ../../../bin/charmc  -language charm++ -o hello hello.o
> for d in lb_test jacobi2D; do \
>         (cd $d; make all OPTS='' || exit 1) || exit 1; \
>     done
> ../../../../bin/charmc  lb_test.ci
> ../../../../bin/charmc  Topo.ci
> ../../../../bin/charmc  -c lb_test.C
> ../../../../bin/charmc  -c Topo.C
> ../../../../bin/charmc  -language charm++ -o lb_test lb_test.o Topo.o
> -module EveryLB
> ld: library not found for -lmetis
> collect2: ld returned 1 exit status
> Fatal Error by charmc in directory
> /Users/bbrodrigues/Documents/doc_ufmg/programs/source_codes/NAMD_2.7b3_Source/charm-6.2.1/net-darwin-x86/tests/charm++/loadbalancing/lb_test
>    Command g++ -m32 -fPIC -dynamic -fno-common -multiply_defined suppress
> -rdynamic -o lb_test -L../../../../bin/../lib -I../../../../bin/../include
> ../../../../bin/../lib/libldb-rand.o lb_test.o Topo.o moduleinit38414.o
> -lmoduleEveryLB ../../../../bin/../lib/libmemory-default.o
> ../../../../bin/../lib/libthreads-default.o -lck -lconv-cplus-y -lconv-core
> -lconv-util -lckqt -ldl -lmoduleEveryLB -lmetis -lm returned error code 1
> charmc exiting...
> make[3]: *** [lb_test] Error 1
> make[2]: *** [all] Error 1
> make[1]: *** [all] Error 1
> make: *** [all] Error 1
>
> After that, I decided to try the second command (I never remember if my
> system is 64):
>
> Then it buit perfectly as well and when I tried to run the make at the tests
> directory it returned the following:
>
> Bruno-Barbosa-Rodriguess-MacBook:tests bbrodrigues$ make
> for d in util charm++ converse ampi fem; do \
>         (cd $d && make all OPTS='' || exit 1) || exit 1; \
>     done
> ../../bin/charmc  -c check.C
> ../../bin/charmc  -o check check.o -language converse++
> for d in megatest pingpong simplearrayhello loadbalancing chkpt delegation
> queue sdag; do \
>         (cd $d; make all OPTS='' TESTOPTS='' || exit 1) || exit 1; \
>     done
> ../../../bin/charmc  -c megatest.ci
> ../../../bin/charmc  -o megatest.o megatest.C
> ../../../bin/charmc  -c groupring.ci
> ../../../bin/charmc  -o groupring.o groupring.C
> ../../../bin/charmc  -c nodering.ci
> ../../../bin/charmc  -o nodering.o nodering.C
> ../../../bin/charmc  -c varsizetest.ci
> ../../../bin/charmc  -o varsizetest.o varsizetest.C
> ../../../bin/charmc  -c varraystest.ci
> ../../../bin/charmc  -o varraystest.o varraystest.C
> ../../../bin/charmc  -c groupcast.ci
> ../../../bin/charmc  -o groupcast.o groupcast.C
> ../../../bin/charmc  -c groupmulti.ci
> ../../../bin/charmc  -o groupmulti.o groupmulti.C
> ../../../bin/charmc  -c groupsectiontest.ci
> ../../../bin/charmc  -o groupsectiontest.o groupsectiontest.C
> ../../../bin/charmc  -c multisectiontest.ci
> ../../../bin/charmc  -o multisectiontest.o multisectiontest.C
> ../../../bin/charmc  -c nodecast.ci
> ../../../bin/charmc  -o nodecast.o nodecast.C
> ../../../bin/charmc  -c synctest.ci
> ../../../bin/charmc  -o synctest.o synctest.C
> ../../../bin/charmc  -c fib.ci
> ../../../bin/charmc  -o fib.o fib.C
> ../../../bin/charmc  -c arrayring.ci
> ../../../bin/charmc  -o arrayring.o arrayring.C
> ../../../bin/charmc  -c tempotest.ci
> ../../../bin/charmc  -o tempotest.o tempotest.C
> ../../../bin/charmc  -c packtest.ci
> ../../../bin/charmc  -o packtest.o packtest.C
> ../../../bin/charmc  -c queens.ci
> ../../../bin/charmc  -o queens.o queens.C
> ../../../bin/charmc  -c migration.ci
> ../../../bin/charmc  -o migration.o migration.C
> ../../../bin/charmc  -c marshall.ci
> ../../../bin/charmc  -o marshall.o marshall.C
> ../../../bin/charmc  -c priomsg.ci
> ../../../bin/charmc  -o priomsg.o priomsg.C
> ../../../bin/charmc  -c priotest.ci
> ../../../bin/charmc  -o priotest.o priotest.C
> ../../../bin/charmc  -c rotest.ci
> ../../../bin/charmc  -o rotest.o rotest.C
> ../../../bin/charmc  -o statistics.o statistics.C
> ../../../bin/charmc  -c templates.ci
> ../../../bin/charmc  -o templates.o templates.C
> ../../../bin/charmc  -c inherit.ci
> ../../../bin/charmc  -o inherit.o inherit.C
> ../../../bin/charmc  -c reduction.ci
> ../../../bin/charmc  -o reduction.o reduction.C
> ../../../bin/charmc  -c bitvector.ci
> ../../../bin/charmc  -o bitvector.o bitvector.C
> ../../../bin/charmc  -c immediatering.ci
> ../../../bin/charmc  -o immediatering.o immediatering.C
> ../../../bin/charmc  -c callback.ci
> ../../../bin/charmc  -o callback.o callback.C
> ../../../bin/charmc  -c inlineem.ci
> ../../../bin/charmc  -o inlineem.o inlineem.C
> ../../../bin/charmc  -o pgm  megatest.o groupring.o nodering.o varsizetest.o
> varraystest.o groupcast.o groupmulti.o groupsectiontest.o multisectiontest.o
> nodecast.o synctest.o fib.o arrayring.o tempotest.o packtest.o queens.o
> migration.o marshall.o priomsg.o priotest.o rotest.o statistics.o
> templates.o inherit.o reduction.o bitvector.o immediatering.o callback.o
> inlineem.o  -language charm++
> ../../../bin/charmc   pingpong.ci
> touch cifiles
> ../../../bin/charmc  -I../../../src/conv-core pingpong.C
> pingpong.C: In constructor ‘main::main(CkArgMsg*)’:
> pingpong.C:109: warning: deprecated conversion from string constant to
> ‘char*’
> pingpong.C:110: warning: deprecated conversion from string constant to
> ‘char*’
> pingpong.C: In member function ‘void main::maindone()’:
> pingpong.C:129: warning: deprecated conversion from string constant to
> ‘char*’
> pingpong.C: In constructor ‘PingF::PingF()’:
> pingpong.C:451: warning: deprecated conversion from string constant to
> ‘char*’
> pingpong.C: In member function ‘void PingF::start()’:
> pingpong.C:456: warning: deprecated conversion from string constant to
> ‘char*’
> ../../../bin/charmc  -language charm++ -o pgm pingpong.o
> ../../../bin/charmc   hello.ci
> ../../../bin/charmc  -c hello.C
> ../../../bin/charmc  -language charm++ -o hello hello.o
> for d in lb_test jacobi2D; do \
>         (cd $d; make all OPTS='' || exit 1) || exit 1; \
>     done
> ../../../../bin/charmc  lb_test.ci
> ../../../../bin/charmc  Topo.ci
> ../../../../bin/charmc  -c lb_test.C
> ../../../../bin/charmc  -c Topo.C
> ../../../../bin/charmc  -language charm++ -o lb_test lb_test.o Topo.o
> -module EveryLB
> ld: library not found for -lmetis
> collect2: ld returned 1 exit status
> Fatal Error by charmc in directory
> /Users/bbrodrigues/Documents/doc_ufmg/programs/source_codes/NAMD_2.7b3_Source/charm-6.2.1/net-darwin-x86_64/tests/charm++/loadbalancing/lb_test
>    Command g++ -m64 -fPIC -dynamic -fno-common -multiply_defined suppress
> -rdynamic -o lb_test -L../../../../bin/../lib -I../../../../bin/../include
> ../../../../bin/../lib/libldb-rand.o lb_test.o Topo.o moduleinit77912.o
> -lmoduleEveryLB ../../../../bin/../lib/libmemory-default.o
> ../../../../bin/../lib/libthreads-default.o -lck -lconv-cplus-y -lconv-core
> -lconv-util -lckqt -ldl -lmoduleEveryLB -lmetis -lm returned error code 1
> charmc exiting...
> make[3]: *** [lb_test] Error 1
> make[2]: *** [all] Error 1
> make[1]: *** [all] Error 1
> make: *** [all] Error 1
>
>
>
> Does it mean that my system is 64 bits? May I ignore these errors? And
> finally, can I use both processors with this built configuration?
>
> Thank you in advance
>
>
>
> On Fri, Jul 30, 2010 at 7:05 PM, Isaac Dooley
> <idooley2 AT uiuc.edu>
> wrote:
>>
>> Do you have a powerpc or intel based mac?
>> Can you try to see if either of these builds works:
>> ./build charm++ net-darwin-x86
>> ./build charm++ net-darwin-x86_64
>> Isaac
>>
>> On Fri, Jul 30, 2010 at 4:59 PM, Bruno Rodrigues
>> <bbrodrigues AT gmail.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> I' trying to build charm++ on a Mac OS with MPI. I tried many
>>> combinations but none of them seem to work.
>>>
>>> Bruno-Barbosa-Rodriguess-MacBook:charm-6.2.1 bbrodrigues$ sudo ./build
>>> charm++ mpi-darwin-ppc gcc
>>> Selected Compiler: gcc
>>> Selected Options:
>>> Creating dir: mpi-darwin-ppc-gcc
>>> Creating dir: mpi-darwin-ppc-gcc/tmp
>>> Copying src/scripts/Makefile to mpi-darwin-ppc-gcc/tmp
>>> Soft-linking over bin
>>> Soft-linking over lib
>>> Soft-linking over lib_so
>>> Soft-linking over include
>>> Soft-linking over tmp
>>> Generating mpi-darwin-ppc-gcc/tmp/conv-mach-pre.sh
>>> Generating mpi-darwin-ppc-gcc/tmp/conv-mach-opt.h, conv-mach-opt.sh
>>> Performing 'make basics OPTS= QUIET=' in mpi-darwin-ppc-gcc/tmp
>>> pwd
>>>
>>> /Users/bbrodrigues/Documents/doc_ufmg/programs/source_codes/NAMD_2.7b3_Source/charm-6.2.1/mpi-darwin-ppc-gcc/tmp
>>> find . -type l -exec rm {} \;
>>> rm -rf QuickThreads
>>> rm -rf libs
>>> rm -rf ../bin ; mkdir ../bin
>>> rm -rf ../lib ; mkdir ../lib
>>> rm -rf ../lib_so ; mkdir ../lib_so; touch ../lib_so/.charmso
>>> rm -rf ../examples
>>> rm -rf ../tests
>>> rm -rf ../doc ; ln -s ../doc ../doc
>>> ../../src/scripts/gatherflat ../../src/scripts .
>>> ./gatherflat ../../src/conv-core        .
>>> ./gatherflat ../../src/conv-ldb         .
>>> ./gatherflat ../../src/conv-ccs         .
>>> ./gatherflat ../../src/conv-perf    .
>>> ./gatherflat ../../src/ck-core          .
>>> ./gatherflat ../../src/util             .
>>> ./gatherflat ../../src/ck-perf          .
>>> ./gatherflat ../../src/ck-ldb           .
>>> ./gatherflat ../../src/ck-com           .
>>> ./gatherflat ../../src/ck-cp           .
>>> ./gatherflat ../../src/conv-com           .
>>> ./gatherflat ../../src/langs/simplemsg  .
>>> ./gatherflat ../../src/langs/pvmc       .
>>> ./gatherflat ../../src/langs/bluegene   .
>>> ./gatherflat ../../src/langs/f90charm   .
>>> ./gatherflat ../../src/xlat-i           .
>>> ./gatherflat ../../src/xlatcpm          .
>>> ./gathertree ../../src/QuickThreads QuickThreads
>>> ./gathertree ../../src/libs libs
>>> ./gathertree ../../src/arch/util      .
>>> ./gathertree ../../src/langs langs
>>> ./gathertree ../../src/langs/jade langs/jade
>>> ./gathertree ../../src/arch/common           .
>>> ./gathertree ../../src/arch/`cat .gdir`      .
>>> test -f ../../src/arch/`cat .gdir`/gdir_link && cat ../../src/arch/`cat
>>> .gdir`/gdir_link > .gdir.new && ./gathertree ../../src/arch/`cat
>>> .gdir.new`      . || true
>>> ./gatherflat ../../src/arch/`cat .vdir`      .
>>> ./gathertree ../../examples ../examples
>>> ./gathertree ../../tests ../tests
>>> rm -f ../bin/dep.pl ; cp dep.pl ../bin/
>>> chmod +x charmc
>>> ./system_ln  ../tmp/charmc ../bin/
>>> rm -rf ../include ; mkdir ../include
>>> ./system_ln  ../tmp/conv-*.*h ../include
>>> ./system_ln  ../tmp/cc-*.*h ../include
>>> if [ -x ./special.sh ] ; then ./special.sh ; fi
>>> if [ ! -f conv-common.h ] ; then ( touch conv-common.h ) ; fi
>>> touch dirs+sources
>>> make charmxi
>>> ./configure
>>> checking machine name... mpi-darwin-ppc-gcc
>>> checking "C++ compiler as"... "g++ -fPIC -Wno-deprecated
>>> -Wno-long-double -dynamic -fno-common   "
>>> checking "whether C++ compiler works"... "no"
>>> Cannot compile C++ programs with g++ -fPIC -Wno-deprecated
>>>  (check your charm++ version)
>>> *** Please find detailed output in charmconfig.out ***
>>> make[1]: *** [conv-autoconfig.h] Error 1
>>> make: *** [headers] Error 2
>>> -------------------------------------------------
>>> Charm++ NOT BUILT. Either cd into mpi-darwin-ppc-gcc/tmp and try
>>> to resolve the problems yourself, visit
>>> http://charm.cs.uiuc.edu/
>>> for more information. Otherwise, email the developers at
>>> charm AT cs.uiuc.edu
>>>
>>>
>>>
>>> I have Xcode for C/C++. I also checked if my c++ compiler is working:
>>>
>>> Bruno-Barbosa-Rodriguess-MacBook:charm-6.2.1 bbrodrigues$ g++ -fPIC
>>> -Wno-deprecated
>>> i686-apple-darwin10-g++-4.2.1: no input files
>>>
>>>
>>> Thank you very much.
>>>
>>> --
>>> --
>>> Msc. Bruno B. Rodrigues
>>> Prof. de Ensino Básico, Técnico e Tecnologico
>>> Escola Preparatória de Cadetes do Ar - EPCAR
>>>
>>> _______________________________________________
>>> charm mailing list
>>> charm AT cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/charm
>>>
>>
>
>
>
> --
> --
> Msc. Bruno B. Rodrigues
> Prof. de Ensino Básico, Técnico e Tecnologico
> Escola Preparatória de Cadetes do Ar - EPCAR
>
> _______________________________________________
> charm mailing list
> charm AT cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/charm
>
>





Archive powered by MHonArc 2.6.16.

Top of Page