The zip archive below contains WRFV22 code modifications for an Intel-based Mac with the Intel Fortran compiler (ifort). I have been able to run the single-threaded and OMP versions without problem, but my tests with the MPI version (RSL and RSL_LITE) with mpich-1.2.5 have not produced results that are the same when one and two processors are requested. This has only been tested on a MacBook with a Core Duo processor. So, use at your own risk. Feedback appreciated.
WRFV22_MacIntel_mods.zip
Thursday, April 19, 2007
Sunday, April 15, 2007
WRFV22 g95 on Mac supporting programs
Previously, I reported that I had to use tcsh to run WRFV22. Turns out I can run in bash if I specifically set the stacksize and datasize as follows
ulimit -s 65536
ulimit -d unlimited
To go along with the configure.defaults additions for g95 on Mac PPC, here are the flags I used for NetCDF and MPICH to get everything working. Specific versions of these programs I used were 3.6.0-p1 for NetCDF and 1.2.5 for MPICH.
netcdf-3.6.0-p1
* I used tcsh for the compilation
setenv CC /usr/bin/gcc
setenv CPPFLAGS "-O -DNDEBUG -DpgiFortran"
setenv CFLAGS "-O"
setenv CXX /usr/bin/c++
setenv CXXFLAGS "-O"
setenv FC g95
setenv F77 g95
setenv F90 g95
setenv FFLAGS "-O3 -fno-second-underscore"
setenv FCFLAGS "-O3 -fno-second-underscore"
setenv F90FLAGS "-O3 -fno-second-underscore"
./configure
* I then edited "macros.make", adding:
FLIBS = -lSystemStubs
F90LIBS = -lSystemStubs
./make
./make test
[all tests were found to work]
make install
mpich-1.2.5
* I used tcsh for the compilation
setenv FC g95
setenv F90 g95
setenv RSHCOMMAND "/usr/bin/ssh"
setenv CC gcc
setenv CXX gcc
setenv LIBS "-lSystemStubs"
setenv FFLAGS "-fno-second-underscore"
setenv F90FLAGS "-fno-second-underscore"
setenv CFLAGS "-fno-common -DFORTRANUNDERSCORE"
./configure --with-device=ch_p4 --without-romio
./make
* On one Mac PPC machine, I had to add -lstdc++ to LIBS, but another failed to work if that was done
* Although mpich compiles fine, the example programs would not compile without manually adding the "-fno-second-underscore" flag. Example:
mpif77 -fno-second-underscore -c fpi.f
mpif77 -o fpi fpi.o
ulimit -s 65536
ulimit -d unlimited
To go along with the configure.defaults additions for g95 on Mac PPC, here are the flags I used for NetCDF and MPICH to get everything working. Specific versions of these programs I used were 3.6.0-p1 for NetCDF and 1.2.5 for MPICH.
netcdf-3.6.0-p1
* I used tcsh for the compilation
setenv CC /usr/bin/gcc
setenv CPPFLAGS "-O -DNDEBUG -DpgiFortran"
setenv CFLAGS "-O"
setenv CXX /usr/bin/c++
setenv CXXFLAGS "-O"
setenv FC g95
setenv F77 g95
setenv F90 g95
setenv FFLAGS "-O3 -fno-second-underscore"
setenv FCFLAGS "-O3 -fno-second-underscore"
setenv F90FLAGS "-O3 -fno-second-underscore"
./configure
* I then edited "macros.make", adding:
FLIBS = -lSystemStubs
F90LIBS = -lSystemStubs
./make
./make test
[all tests were found to work]
make install
mpich-1.2.5
* I used tcsh for the compilation
setenv FC g95
setenv F90 g95
setenv RSHCOMMAND "/usr/bin/ssh"
setenv CC gcc
setenv CXX gcc
setenv LIBS "-lSystemStubs"
setenv FFLAGS "-fno-second-underscore"
setenv F90FLAGS "-fno-second-underscore"
setenv CFLAGS "-fno-common -DFORTRANUNDERSCORE"
./configure --with-device=ch_p4 --without-romio
./make
* On one Mac PPC machine, I had to add -lstdc++ to LIBS, but another failed to work if that was done
* Although mpich compiles fine, the example programs would not compile without manually adding the "-fno-second-underscore" flag. Example:
mpif77 -fno-second-underscore -c fpi.f
mpif77 -o fpi fpi.o
Subscribe to:
Posts (Atom)