Well at the risk of repeating Derek's earlier instructions for
building libmesh on a powerbook, I thought I would also post what I
ended up doing here.  I ran into some weird problems when PETSc was
actually compiled with a fortran compiler, so I thought it might save
someone else some time if they were about to go through the same
exercise...

-J



A list of steps required to build libmesh on a mac powerbook.

.) Download, configure and install mpich (if you have g95, it will
find it even if you don't specify)

   $ FC=g95 RSHCOMMAND=ssh ./configure --prefix=/usr/local/mpich-1.2.7
   $ make
   $ sudo make install


.) Download, configure, and install petsc.  IMPORTANT: Note the C-BLAS and
   the explicit turning off of the Fortran interfaces on the configure
line*.  Also, you will
   get the debug version by default so I turned that off.

   $ ./config/configure.py --with-cc=mpicc --with-debugging=0
--with-mpi-dir=/usr/local/mpi --download-c-blas-lapack=1
--with-fortran=0
   $ make all test


.) Download, configure, and install libmesh.  I couldn't get the
shared libraries to
   build, this may be a subject of future work.

   $ CXX=mpicxx CC=mpicc ./configure --enable-second --enable-perflog
--disable-shared
   $ make -j 2







* Note: when I attempted to compile PETSc with Fortran compilers,
  none of the resulting executables would actually run.  The runtime
  error message was

  |  0 - <NO ERROR MESSAGE> : Could not convert index 12079072 into a pointer
  |  The index may be an incorrect argument.
  |  Possible sources of this problem are a missing "include 'mpif.h'",
  |  a misspelled MPI object (e.g., MPI_COM_WORLD instead of MPI_COMM_WORLD)
  |  or a misspelled user variable for an MPI object (e.g.,
  |  com instead of comm).
  |  [0]  Aborting program !
  |  [0] Aborting program!
  |  p0_84805:  p4_error: : 9039

And apparently has something to do with the MPI Fortran interface
storing pointers as type INTEGER, which works on 32-bit machines but
not 64.  This website appears to have more info:
http://www.pgroup.com/userforum/viewtopic.php?start=0&t=560





On Thu, Jun 12, 2008 at 3:22 PM, John Peterson <[EMAIL PROTECTED]> wrote:
> Interesting,  I guess because of the fact that I had a fortran
> compiler in my path, it didn't like the --download-c-blas-lapack=1
> unless I explicitly said
>
> --with-fortran=0
>
> as well.
>
> Just FYI for anyone trying to build on a Mac, you can get a Fortran95
> compiler in OSX binary form from g95.org
>
> -J
>
>
>
> On Thu, Jun 12, 2008 at 3:09 PM, Derek Gaston <[EMAIL PROTECTED]> wrote:
>> Not if you don't specify --with-fc and you make sure to use
>> --download-c-blas-lapack=1  (note the _c_ in the middle of that).
>>
>> Derek
>>
>> On Thu, Jun 12, 2008 at 2:05 PM, John Peterson <[EMAIL PROTECTED]> wrote:
>>> Hey Derek,
>>>
>>> I'm curious, without a fortran compiler of any kind, didn't petsc's
>>> configure script complain with
>>>
>>> =================================================================================
>>>                                              TESTING: FortranMPICheck
>>> from config.packages.MPI(python/BuildSystem/config/packages/MPI.py:523)
>>>
>>> *********************************************************************************
>>>         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log
>>> for details):
>>> ---------------------------------------------------------------------------------------
>>> Fortran error! mpif.h could not be located at: ['/usr/local/mpi/include']
>>>
>>> Thanks,
>>> J
>>>
>>> On Thu, Jun 12, 2008 at 9:42 AM, Derek Gaston <[EMAIL PROTECTED]> wrote:
>>>> For OSX 10.5.3 here's what I do.
>>>>
>>>> 1.  Get MPICH1... compile and install into a place in my home directory.
>>>> 2.  Make sure my PATH is set so that the mpicxx/mpicc is the one that
>>>> I just compiled and installed from MPICH1.
>>>> 3.  Compile PetsC using "./config/configure.py --with-cc=mpicc --
>>>> download-c-blas-lapack=1".  Note the _c_ blas-lapack as I haven't
>>>> taken the time to get a fortran compiler working in OSX.
>>>> 4.  Build PetsC
>>>> 5.  Set PETSC_HOME and PETS_ARCH.
>>>> 6.  Download libMesh and configure with "./configure --disable-
>>>> shared".  If you do it all right there is no reason to use --enable-
>>>> mpi or --with-mpi.
>>>> 7.  Make libMesh.
>>>> 8.  Enjoy!
>>>>
>>>> I'm sure this same sequence will work with MPICH2.  The biggest thing
>>>> is to make sure that mpicc is in your path and to pass that as --with-
>>>> cc to PetsC. If you do that (and you set PETSC_HOME and PETSC_ARCH
>>>> correctly) libMesh will automatically pick up on PetsC and compile
>>>> with mpi.
>>>>
>>>> Derek
>>>>
>>>> On Jun 12, 2008, at 1:51 AM, Coulaud Olivier wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>>             I try to install the last version on Mac OS X (10.5.3 and
>>>>> gcc 4.0) with the following options
>>>>>
>>>>> ./configure --disable-triangle --enable-mpi --with-mpi=/opt/mpi/mpich2
>>>>> --disable-tecplot
>>>>>
>>>>> But it seems to have some problems when I want shared libraries.
>>>>>
>>>>> ...
>>>>>
>>>>> Compiling C (in optimized mode) timing.c...
>>>>>
>>>>> Compiling C (in optimized mode) util.c...
>>>>>
>>>>> Linking /Users/coulaudolivier/MesData/Recherche/DM-EF/libmultiscale/
>>>>> libmultiscale-externals/external/libmesh-0.6.2/contrib/lib/i686-apple-
>>>>> darwin9.3.0_opt/libmetis.dylib
>>>>>
>>>>> Undefined symbols:
>>>>>
>>>>>   "_main", referenced from:
>>>>>
>>>>>       start in crt1.10.5.o
>>>>>
>>>>> ld: symbol(s) not found
>>>>>
>>>>> collect2: ld returned 1 exit status
>>>>>
>>>>> make[2]: *** [/Users/coulaudolivier/MesData/Recherche/DM-EF/
>>>>> libmultiscale/libmultiscale-externals/external/libmesh-0.6.2/contrib/
>>>>> lib/i686-apple-darwin9.3.0_opt/libmetis.dylib] Error 1
>>>>>
>>>>> make[1]: *** [all] Error 2
>>>>>
>>>>> make: *** [/Users/coulaudolivier/MesData/Recherche/DM-EF/
>>>>> libmultiscale/
>>>>> libmultiscale-externals/external/libmesh-0.6.2/lib/i686-apple-
>>>>> darwin9.3.0_opt/libmesh.dylib] Error 2
>>>>>
>>>>>
>>>>>
>>>>> I set in Make.common -dynamic rather -shared (non supported for mac os
>>>>> x) but I have the same error.
>>>>>
>>>>>
>>>>>
>>>>> Any Idea?
>>>>>
>>>>>
>>>>>
>>>>> Moreover; is it possible to set a verbose mode to the compilation?
>>>>>
>>>>>
>>>>>
>>>>> Thanks in advance
>>>>>
>>>>> --
>>>>>
>>>>>
>>>>>
>>>>> Olivier  Coulaud
>>>>>
>>>>>
>>>>> -----------------------------------------------------------------
>>>>> Scalaplix project - INRIA Bordeaux - Sud-Ouest
>>>>> 351 cours de la libération - F-33400 Talence - France
>>>>>
>>>>> Tel: [33] (0) 5 24 57 40 80
>>>>> WEB: http://www.labri.fr/perso/coulaud/
>>>>> Mail: [EMAIL PROTECTED]
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -------------------------------------------------------------------------
>>>>> Check out the new SourceForge.net Marketplace.
>>>>> It's the best place to buy or sell services for
>>>>> just about anything Open Source.
>>>>> http://sourceforge.net/services/buy/index.php
>>>>> _______________________________________________
>>>>> Libmesh-users mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/libmesh-users
>>>>
>>>>
>>>> -------------------------------------------------------------------------
>>>> Check out the new SourceForge.net Marketplace.
>>>> It's the best place to buy or sell services for
>>>> just about anything Open Source.
>>>> http://sourceforge.net/services/buy/index.php
>>>> _______________________________________________
>>>> Libmesh-users mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/libmesh-users
>>>>
>>>
>>
>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to