RE: Help to run gadget2 in macbook

From: Prem Dhungel <premrd_at_hotmail.com>
Date: Sat, 15 Jan 2011 18:36:57 +0530

Thank you Florian !
Your recommendation worked.
XCode already had mpi.
So I uninstalled the lam/mpi and installed the mpi it already had.
Then installing fftw2 also worked.

Now Gadget2 has been installed.
Thanks to all for your help.

I may need to get back to you for help again for Gadget2 running issues.

Cheers!
Prem



> From: florian.buerzle_at_uni-konstanz.de
> Date: Wed, 12 Jan 2011 20:13:59 +0100
> To: gadget-list_at_MPA-Garching.MPG.DE
> CC: florian.buerzle_at_uni-konstanz.de
> Subject: Re: [gadget-list] Help to run gadget2 in macbook
>
>
>
> Am 12.01.2011 um 16:01 schrieb Prem Dhungel:
>
> > Hi,
> >
> > I am still stuck up ..... !
> >
> > I went gadget2 user's guide thoroughly.
> > Installed mpi and gsl successfully.
> > Configured fftw with necessary flags.
> > But while I do "make", finally I got the following error :
> >
> > Undefined symbols:
> > "_lam_mpi_float", referenced from:
> > _lam_mpi_float$non_lazy_ptr in libsfftw_mpi.a(transpose_mpi.o)
> > "_lam_mpi_int", referenced from:
> > _lam_mpi_int$non_lazy_ptr in test_transpose_mpi.o
> > "_lam_mpi_comm_world", referenced from:
> > _lam_mpi_comm_world$non_lazy_ptr in test_transpose_mpi.o
> > _lam_mpi_comm_world$non_lazy_ptr in libsfftw_mpi.a(fftwnd_mpi.o)
> > ld: symbol(s) not found
> > collect2: ld returned 1 exit status
> > make[1]: *** [test_transpose_mpi] Error 1
> > make: *** [all-recursive] Error 1
> >
> > Sorry to trouble again and again.
>
> Don't worry.
>
> I would recommend doing one thing first (if you haven't done this already): In Gadget's Makefile switch all the TreePM options off, then go to the line that reads
>
> LIBS = $(HDF5LIB) -g $(MPICHLIB) $(GSL_LIBS) -lgsl -lgslcblas -lm $(FFTW_LIB)
>
> and replace it by
>
> ifeq (PMGRID,$(findstring PMGRID,$(OPT)))
> LIBS = $(HDF5LIB) -g $(MPICHLIB) $(GSL_LIBS) -lgsl -lgslcblas -lm $(FFTW_LIB)
> else
> LIBS = $(HDF5LIB) -g $(MPICHLIB) $(GSL_LIBS) -lgsl -lgslcblas -lm
> endif
>
> Now the linking does not rely on fftw libs any more, and Gadget should compile without problems. If it does not, there are additional issues unrelated to fftw.
>
> Now to your fftw-2 installation problem: probably this one is due to the LAM/MPI installation - but you need to know that the OpenMPI library comes with Apple's XCode, so it should be present already on your MacBook (if you have at least OS X 10.5 and XCode 3.0). It should reside in the /Developer/SDKs directory structure. That means that you don't need to install another MPI library (as long as you don't want Fortran 90/95/... support). Actually, two different MPI libraries might result in conflicts, so I would recommend to uninstall LAM. Additionally, LAM is legacy software - so going for OpenMPI is, in my opinion, the best choice anyway.
>
> But maybe a brief description of my own fftw-2 installation helps. To install fftw-2.1.5, I did the following:
>
> ./configure --enable-mpi --enable-float --enable-type-prefix --prefix=/opt/fftw2
> make
> make install
>
> Then, In Gadget's makefile I included:
>
> FFTW_INCL = -I/opt/fftw2/include
> FFTW_LIBS = -L/opt/fftw2/lib
>
> A final remark: Installing fftw-2 using a package management system like MacPorts or Fink (or probably HomeBrew) would be favorable. It would be a lot easier than doing the installation by hand, since the package manager keeps track of the dependences. Unfortunately, MacPorts (as far as I know) does not support the installation of fftw-2 with MPI support, so I had to install this one manually (don't know if Fink or HomeBrew are able to handle this better, since I don't use them) - maybe some other gadget-list reader has a hack or solution for this.
>
> Cheers
> Florian
>
>
>
>
> -----------------------------------------------------------
>
> If you wish to unsubscribe from this mailing, send mail to
> minimalist_at_MPA-Garching.MPG.de with a subject of: unsubscribe gadget-list
> A web-archive of this mailing list is available here:
> http://www.mpa-garching.mpg.de/gadget/gadget-list
                                               
Received on 2011-01-15 14:06:59

This archive was generated by hypermail 2.3.0 : 2023-01-10 10:01:31 CET