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

John ZuHone jzuhone at milkyway.gsfc.nasa.gov
Sun Feb 10 20:04:31 EST 2013


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
>>> 
>>> 
>>> -
>> 
>> 




More information about the flash-users mailing list