Compilers:
1) gcc, I use the gcc that comes w/ X-Code Version 3.2.1 available free from Apple.
Its' version statement is:
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) (dot 1)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2) mpi, mpicc (an mpi-wrapper for c) comes packaged w/ X-Dev. I've found this works just fine with ParFlow.
3) gfortran, The only 64-bit compatible gfortran I've found, pre-built, is here:http://r.research.att.com/tools/
Its' version statement is:
GNU Fortran (GCC) 4.2.3
Copyright (C) 2007 Free Software Foundation, Inc.
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
4) Libraries, I download and build SILO and HYPRE libraries from scratch.
SILO: https://wci.llnl.gov/codes/silo/silo-4.7.2/silo-4.7.2.tar.gz
HYPRE: v. 2.4.0b https://computation.llnl.gov/casc/hypre/software.html
5) Configure Lines
I find that all packages need to be told to build in 64 bit. This is usually done w/ an '-arch x86_64' flag in the configure line.
For SILO:
setenv SILO_DIR path-to-silo/silo-4.7.2/
or for bash
export SILO_DIR=path-to-silo/silo-4.7.2/
./configure CC='gcc -arch x86_64' CXX='g++ -arch x86_64' F77='gfortran -arch x86_64' FC='gfortran -arch x86_64' --disable-silex
For HYPRE
setenv HYPRE_DIR path-to-hypre/hypre-2.4.0b/
or for bash
PARFLOW
I'm assuming you've set environmental variables PARFLOW_DIR to point to where PF is installed, SILO_DIR to point to SILO and HYPRE_DIR to point to hypre as above.
1) cd $PARFLOW_DIR/pfsimulator
2) ./configure CC='gcc -arch x86_64' F77='gfortran -arch x86_64' FC='gfortran -arch x86_64' --prefix=$PARFLOW_DIR --with-clm --enable-timing --with-silo=$SILO_DIR --with-hypre=$HYPRE_DIR --with-amps=mpi1
3) make install
The compilation process goes fine to almost the end, then errors out w/
ld: duplicate symbol start in /usr/lib/crt1.o and /usr/lib/crt1.10.6.o
These steps will fix this:
1) cd config
2) manually edit Makefile.config to change crt1.o in LDLIBS to crt1.10.6.o
3) cd ..
4) make install
PFTOOLS
1) cd $PARFLOW_DIR/pftools
2) ./configure CC='gcc -arch x86_64' F77='gfortran -arch x86_64' FC='gfortran -arch x86_64' --prefix=$PARFLOW_DIR --enable-timing --with-silo=$SILO_DIR --with-amps=mpi1
3) make install
The build process is very similar, it errors out on same linking step/error duplicate libraries. Here is how to fix:
1) cd config
2) manually change Makefile.config to reflect crt1.10.5.o to crt1.10.6.o this time in two places in the LDLIBS line (it might also be crt1.o in two places as above depending on the system)
3) make install
This now almost seems to work, but errors with an odd message at the end during the linking step
4) Manually adding the -arch x86_64 to the end of the tools linking step will fix this, you can link manually by typing:
ld -dylib pftappinit.o printdatabox.o readdatabox.o databox.o error.o velocity.o head.o flux.o diff.o stats.o tools_io.o axpy.o getsubbox.o enlargebox.o load.o usergrid.o grid.o region.o file.o pftools.o top.o water_balance.o water_table.o sum.o -o ./bin/parflow.dylib -L/usr/lib -L$PARFLOW_DIR/lib -lparflow -L$SILO_DIR/lib -lsilo -ltcl -lc -arch x86_64
from the command line.
5) make install
Everything should now work and you can cd $PARFLOW_DIR/test and make check to test that everything is working.
-Reed