[FLASH-USERS] Compiling the latest FLASH on mac OSX (Lion)

Sean Couch smc at flash.uchicago.edu
Mon Feb 11 12:53:34 EST 2013


Hi Asif,

Since you're a recent convert to Mac, let me recommend you look into a Mac package manger called Homebrew: http://mxcl.github.com/homebrew/.  Homebrew has rules for building OpenMPI, MPICH2, HDF5, and many, many other useful packages.  It is really easy to use, just follow what's in the wiki and FAQ pages.  

I recommend Homebrew for anyone that uses a Mac for scientific computing! (double entendre intended)

Cheers,
Sean


--------------------------------------------------------
Sean M. Couch, Ph.D.
Hubble Fellow
Flash Center for Computational Science
Department of Astronomy & Astrophysics
The University of Chicago
5747 S Ellis Ave, Jo 315
Chicago, IL  60637
(773) 702-3899
www.flash.uchicago.edu/~smc



On Feb 10, 2013, at 7:04 PM, John ZuHone <jzuhone at milkyway.gsfc.nasa.gov> wrote:

> Hi Asif,
> 
> Make sure that you don't add the -lgfortran immediately after the -o flag; the compiler will think you intended to link into something else. -o should go last. I'd put the -lgfortran flag in the LIB_OPT variable instead to avoid this. 
> 
> I'd also recommend compiling OpenMPI... that's the best way to avoid any possible incompatibilites with the library and your system compilers. 
> 
> Let us know what you come up with.
> 
> Best,
> 
> John
> 
> On Feb 10, 2013, at 7:27 PM, Asif ud-Doula <auu4 at psu.edu> wrote:
> 
>> 
>> 
>> On 2/10/13 6:42 PM, John ZuHone wrote:
>>> Asif,
>>> 
>>> Does this error come in the linking step at the end? If you haven't already, you might need to add -lgfortran to the link step.
>> Yes, it does. I did add -lgfortran to LFLAGS_OPT, but I still got an error, although different one:
>> gfortran: error: flash4: No such file or directory
>> make: *** [flash4] Error 1
>>> 
>>> I was under the impression gfortran did not come with Xcode and needed to be installed from a separate source.
>> Now that I think about it, I might have installed separately. I think I had C compiler in mind.
>> 
>> 
>> At least that's what I've had to do.
>>> 
>>> Did you compile OpenMPI or install a binary?
>> I installed binary.
>> 
>> Asif
>> 
>>> 
>>> Best,
>>> 
>>> John Z
>>> 
>>> John ZuHone
>>> Laboratory for High-Energy Astrophysics
>>> NASA/Goddard Space Flight Center
>>> 8800 Greenbelt Rd., Code 662
>>> Greenbelt, MD 20771
>>> (w) 301-286-2531
>>> (m) 773-758-0172
>>> jzuhone at gmail.com
>>> john.zuhone at nasa.gov
>>> 
>>> On Feb 10, 2013, at 6:06 PM, Asif ud-Doula <auu4 at psu.edu> wrote:
>>> 
>>>> Hi,
>>>> I am attempting to compile the latest version on Mac OS X (Lion), but had some trouble linking when testing with './setup Sedov -auto'. Here is an excerpt from the compilation error:
>>>> 
>>>> Undefined symbols for architecture x86_64:
>>>> "__gfortran_transfer_character_write", referenced from:
>>>>     _driver_abortflash_ in Driver_abortFlash.o
>>>>     _driver_checkmpierrorcode_ in Driver_checkMPIErrorCode.o
>>>>     _driver_computedt_ in Driver_computeDt.o
>>>>     _driver_evolveflash_ in Driver_evolveFlash.o
>>>>     _driver_initflash_ in Driver_initFlash.o
>>>>     _driver_verifyinitdt_ in Driver_verifyInitDt.o
>>>>     _eos_ in Eos.o
>>>>     ...
>>>> ld: symbol(s) not found for architecture x86_64
>>>> collect2: ld returned 1 exit status
>>>> make: *** [flash4] Error 1
>>>> 
>>>> 
>>>> 'uname -a' produces: 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
>>>> 
>>>> I am new MAc user, so I could easily be making a basic mistake. However, I am using Xcode that comes with gfortran. I also installed the latest stable version of OpenMPI.
>>>> 
>>>> Any suggestion will be welcome. Thanks in advance for your time,
>>>> Asif
>>>> 
>>>> 
>>>> -
>>> 
>>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20130211/1d146a1a/attachment.htm>


More information about the flash-users mailing list