This document is (c) TimN, 2011
Revision 21.08.2011

Building NWChem 6.0 for win32 =============================

* install Cygwin, install gcc and gfortran (basic and GCC4 versions) there * install GCC 4.1.2 binaries (execute tar -xjvf to extract from .tar.bz2 archieve) * copy MPICH2 fo some folder * download NwChem source code into some folder ( denoted by $NWCHEM_TOP below) * modify source code: $NWCHEM_TOP/src/config/makefile.h - exclude some options (like '-fno-f90') $NWCHEM_TOP/src/tools/tcgmsg/farg.h - #define GFORTRAN $NWCHEM_TOP/src/util/linux_shift.F - #define GCC4 $NWCHEM_TOP/src/input/get_inp_file.F - #define GCC4 $NWCHEM_TOP/src/inp/inp.F - #define GCC4 $NWCHEM_TOP/src/util/bitops_decls.fh - #define GCC4 (it acts as replacing lshift(a,b) with ishft(a,b) and rshift(a,b) with ishft(a,-b) in: $NWCHEM_TOP/src/ddscf/int2e_file.F $NWCHEM_TOP/src/ddscf/fast/fastj.F $NWCHEM_TOP/src/ddscf/comp4_insert.F $NWCHEM_TOP/src/ddscf/comp4_ext.F $NWCHEM_TOP/src/ddscf/comp4_bins.F) $NWCHEM_TOP/src/tools/armci/src/x86copy.gcc - add _ before ptbuf and vendor inside asm_memcpy4 subroutine for non-MPI build (i.e., when there is no 'export USE_MPI=' command): I:\media\FreeSciSoft\NW_Win\nw-6.0\src\tools\tcgmsg\ipcv4.0\sndrcv.h - #define SOLARIS * run cygwin shell * create file named stL ------------------------------------------------------------------ #!/bin/bash export PATH="/lib/gcc/i686-pc-cygwin/4.1.2/:$PATH" export LARGE_FILES=TRUE export NWCHEM_TOP=/cygdrive/i/media/FreeSciSoft/NW_Win/nw-6.0 export NWCHEM_MODULES=nwints hessian export NWCHEM_TARGET=LINUX export USE_MPI=y remove this line for pure tcgmsg-build export MPI_LIB=/cygdrive/i/media/FreeSciSoft/NW_Win/nw-6.0/src/MPICH2/lib export MPI_INCLUDE=/cygdrive/i/media/FreeSciSoft/NW_Win/nw-6.0/src/MPICH2/include export LIBMPI="-lmpi" make nwchem_config make -f GNUmakefile ------------------------------------------------------------------ (here export NWCHEM_MODULES=nwints hessian is the minimal configuration) * go to src dir and execute dos2unix stL ./stL get en error, copy global.fh from $NWCHEM_TOP/src/tools/include/global.fh to $NWCHEM_TOP/src/include to src/include ? and execute ./stL The total compilation time is about 2 hours (Intel Core2 Duo, single core) * remove -lm from the final build line * set NWCHEM_MODULES=all and rebuild (time consuming!) enjoy :) Note: modified files are also available

Your comments are welcomed: tim_mail (AT) ukr (DOT) net
Back to main page