WRF3.1 installation on MacOS 10.5.8 (Darwin 9.8.0)

All things involving the setup (compiling, NetCDF, etc.) of the WRF Model itself.

WRF3.1 installation on MacOS 10.5.8 (Darwin 9.8.0)

Postby cedrick on Tue Sep 08, 2009 6:52 am

Hello all,

I am desperately trying to get WRF3.1.1 running... I can't even compile the wrf model itself...

My system and compilers:
Mac OS X 10.5.8
Darwin Kernel 9.8.0
WRF 3.1.1
NETCDF 4.0.1
>gcc --version
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5488)
>g95 --version
G95 (GCC 4.0.3 (g95 0.92!) Jun 25 2009)

(Do the g95 and gcc have to be the same version? I did not find anything which says so, and also do not think so????)

I am using the GNU gcc and g95 compiler, which I also used t compile netcdf4.0.1.
Compilation with
Code: Select all
./compile em_real
seems to work (no errors) but there are no executables. So I checked the compilation log.
I used the default configuration for MacOS Darwin, serial without nests.

There are three main Problems:
1. non-existing built-in functions
gcc is looking for the built-in functions strcpy, memcpy, ... and can't find it.
This seems to me as if there is somewhere a HAVE_STD_LIB not set properly.
Can I or do I have to set this manually somewhere? I did not find it in the configure.wrf

2. Symbolic Links
make[4]: stat: wgrib: Too many levels of symbolic links

I read somewhere else, that this might be fixed with a -D_UNDERSCORE Flag. I tried this flag with both, the gcc and g95 as well as either of them - no success. Still the same story.

3.pretending empty libraries
ar: creating archive libesmf_time.a
ranlib: file: libesmf_time.a(ESMF_Fraction.o) has no symbols
ranlib: file: libesmf_time.a(ESMF_Mod.o) has no symbols
ranlib: file: libesmf_time.a(module_symbols_util.o) has no symbols[/code]
ranlib: file: libesmf_time.a(module_utility.o) has no symbols
ranlib libesmf_time.a
ranlib: file: libesmf_time.a(ESMF_Fraction.o) has no symbols
ranlib: file: libesmf_time.a(ESMF_Mod.o) has no symbols
ranlib: file: libesmf_time.a(module_symbols_util.o) has no symbols
ranlib: file: libesmf_time.a(module_utility.o) has no symbols


This is another issue, which indicates that linking does not work properly. However, I checked that libesmf_time.a exists and is not empty. ESMF_Fraction.o is also not empty though very small (but the source file EMSF_Fraction.f effectively contains 2 lines of code or so)

I am suspecting that there is something wrong with my installation of the g95 compiler (used the version 0.92 x86 binaries from g95.org). However, I compiled a simple program and it worked (and it also compiled the netcdf-library). I also mentioned that there are much fewer problems using the g95 0.92 compiler...Eventually - I HAVE NO IDEA, WHAT DO DO!

Thank you very much in advance for any help.
Cedrick
cedrick
 
Posts: 3
Joined: Tue Sep 08, 2009 6:15 am

Re: WRF3.1 installation on MacOS 10.5.8 (Darwin 9.8.0)

Postby cedrick on Fri Feb 05, 2010 4:20 am

Hi all,

after some time of running WRF (I obviously solved this problem), I thought it might be helpful for some people to post a solution.

The first part of the solution was rather obvious after checking the compilation log.

  • On a hard disc with case-insensitive filesystem you need to modify the wgrib makefile in order to prevent it from linking a folder to itself. I chose to rename the subfolder WGRIB, which includes the executable wgrib that again is linked back as wgrib, to WGRIB_ which prevents the system from linking the directory WGRIB back to itself.

The second part is a quick and dirty fix too, but it worked - THANKS TO WRFHELP!
  • The fix is to modify the Makefile in main directory.
    The change is only related to declaring an extra macro XTRA_OBJS, and add it to all $(LD) lines in the file.
    .

So what i did is: define an XTRA_OBJS containing the libraries which could not be linked in and added it to all the $(LD) lines.
cedrick
 
Posts: 3
Joined: Tue Sep 08, 2009 6:15 am

Re: WRF3.1 installation on MacOS 10.5.8 (Darwin 9.8.0)

Postby sru20 on Sat May 01, 2010 5:53 am

Cedric,

How did you create the XTRA_OBJ macros? I ams experiencing the same problems you encountered but am not clear on how to do the last step. Please help.

Thanks,

sru20
sru20
 
Posts: 1
Joined: Sat May 01, 2010 5:49 am


Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest

cron