Thursday, May 1, 2008

Playing with WRF3 (WRFV300, WPSV300) - part II

Some updates: In the post Playing with WRF3 (WRFV300, WPSV300) - part I below, I mentioned that WRFV300's OpenMP was broken on Mac and Linux, using ifort and pgf. This problem is solved. OpenMP isn't working in the stock configuration because the $(OMP) declaration was not defined in FCFLAGS. It was declared in LDFLAGS, so the model seemed to go through the motions of spawning the requested number of threads. But, its absence from FCFLAGS means that OpenMP support was not actually complied in the code.

The remedy for this is to edit arch/postamble_new and insert $(OMP) on the FCFLAGS line.

I also have WPSV300 working on my Intel Mac, because I did manage to get a 64 bit version of NCAR Graphics compiled and running. I will update this post to describe how this was done in the future.

[EDIT 10 June 2008: Some additional information..
* My 64 bit NCAR Graphics binaries built on my MacPro are
here. This is an 18MB gzipped tar file. It does not include all of NCL, just NCAR Graphics..

* For this build of NCAR Graphics, you need to include the -ncarbd flag with ncargf77, ncargf90 or ncargex. Or, when compiling with ifort, you need to link in /usr/local/ncarg64/lib/ncarg/robj/libncarbd.o

* With this NCAR Graphics, I had no trouble building WPSV300 and RIP4 64bit on the MacPro.

* Here are my build notes for NCAR Graphics 64 bit on the MacPro, using ifort. Of course, you need to change locations, etc..

setenv NCARG /case/ncl_ncarg-5.0.0
setenv NCARG_ROOT /case/ncl_ncarg-5.0.0
setenv NCARG_CONFIG /case/ncl_ncarg-5.0.0/config

cd config
./ymake
./Configure
..then, as root
mkdir /usr/local/ncarg64


edited config/Darwin_Intel and ran Configure again

ulimit -s 65530
compile as root, so source ifortvars.sh

had been getting segfaults with fontcap. Resolved by editing yMakefile in /case/ncl_ncarg-5.0.0/common/src/libncarg_c/yMakefile for Darwin section to make it like Linux x86_64 section. That is,

#elif defined(Darwin) && defined(i386)
EXCSRCS = bcopyswap.c logic32.c
EXFSRCS = gbytes.f sbytes.f
EXOBJS = sbytes.o gbytes.o bcopyswap.o logic32.o