From owner-nwchem-users@emsl.pnl.gov Wed Jun  6 13:23:20 2007
Received: from odyssey.emsl.pnl.gov (localhost [127.0.0.1])
	by odyssey.emsl.pnl.gov (8.13.8/8.13.8) with ESMTP id l56KNJlU002689
	for <nwchem-users-outgoing-0915@odyssey.emsl.pnl.gov>; Wed, 6 Jun 2007 13:23:20 -0700 (PDT)
Received: (from majordom@localhost)
	by odyssey.emsl.pnl.gov (8.13.8/8.13.8/Submit) id l56KNI5g002688
	for nwchem-users-outgoing-0915; Wed, 6 Jun 2007 13:23:18 -0700 (PDT)
X-Authentication-Warning: odyssey.emsl.pnl.gov: majordom set sender to owner-nwchem-users@emsl.pnl.gov using -f
X-Possible-Spoof: True
X-IronPort-AV: E=Sophos;i="4.16,390,1175497200"; 
   d="scan'208";a="34193703"
Message-ID: <466717B4.2060802@pnl.gov>
Date: Wed, 06 Jun 2007 13:23:16 -0700
From: Dunyou Wang <dunyou.wang@pnl.gov>
User-Agent: Thunderbird 2.0.0.0 (X11/20070326)
MIME-Version: 1.0
To: "Fco. Javier Modrego" <modrego@unizar.es>
CC: nwchem-users@emsl.pnl.gov
Subject: Re: [NWCHEM] nwchem 5.0 compilation problems
References: <a06240803c28cb2aaf928@[155.210.88.109]>
In-Reply-To: <a06240803c28cb2aaf928@[155.210.88.109]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 06 Jun 2007 20:23:15.0860 (UTC) FILETIME=[83787540:01C7A878]
Sender: owner-nwchem-users@emsl.pnl.gov
Precedence: bulk

Hi F.J.

You don't need to modify the makefile.h for the compilation using pgf77
on LINUX target. You have to make sure when you do the compilation, your
compilation is on the 32 bit node, your environment variables (libs
etc.) points to the appropriate directories. However, from your
compilation error message:

-malign-double makes no sense in the 64bit mode

You are still working in a 64 bit node environment not on a 32 bit as
you want to.

Please don't modify the makefile.h, it works on LINUX (32 bit platform)
with pgf77 compiler.

Hope this helps

Fco. Javier Modrego wrote:
> Hello,
> I am trying to compile NwChem with PGF for a small cluster of mixed 32
> bit and 64 bit Dual Xeon nodes. The Portland fortran compiler is
> installed in a 64 bit node and the rest have installed the portability
> libraries provided by Portland Group. I have built the 64 bit
> executables without trouble (TARGET=LINUX64) but the cross-compiling
> to the 32 bit machines (TARGET=LINUX) is something harder.
> I have done it for other codes such as G03 and GAMESS. You just need
> to convince the makefiles that your CPU it is not what it says to be,
> and add a couple of switches for the fortran compiler (-tp p7) and the
> gcc compiler (-march=i686 -m32). It has been enough...
> With NwChem I am not getting through it.
> I have sligthly modified makefile.h but is seems that it is not enough.
> I have tried to override calls to machine -m and setting the 32 bit
> target switches for the compilers
> just at the beggining of the LINUX section
>
> LINUXCPU = x86
> CFLAGS += -march=i686 -m32
> COPTIONS += -march=i686 -m32
> FFLAGS += -tp p7
> FOPTIONS += -tp p7
> FC = pgf77
> # _CPU = $(shell uname -m )
> _CPU = i786
>
>
> It seems that I am missing something or somewhere those options are
> overrided because my first (and single at the moment...there will be
> more I guess...) fatal error in make.log reads:
>
> Blah, Blah, Blah...
> echo "" > LINUX-TCG-N.stamp
>
> *** Building Parallel Tools ****
>
> >>> making Memory Allocator (MA) library <<<
> (cd ./ma; make)
> if [ -f *.stamp ]; then\
> make cleanstamp;\
> fi
> cp macommon.h matypes.h macdecls.h scope.h error.h memcpy.h
> string-util.h table.
> h mafdecls.fh typesf2c.h winutil.h winf2c.h ../include
> echo "" > LINUX.stamp
> gcc -DLINUX -DVERIFY -DSTATS -O2 -funroll-loops -malign-double -c -o
> error.o e
> rror.c
> error.c:1: error: -malign-double makes no sense in the 64bit mode
> make[2]: *** [error.o] Error 1
> make[1]: *** [tools] Error 2
> make: *** [libraries] Error 1
>
> As can be seen the gcc compiler does not receive the intended -m32
> -march=i686 options...
> Somewhere in the forest of GNUmakefiles are lost...
> As a test I have tried to set as a environment variable in the shell:
> export CFLAGS="-m32 -march=i686" which according to the gnu make
> variable should be taken by make and it is unset after the failed
> compilation.
>
>
> Any help will be wellcome,
>
> F.J. Modrego
>
>
>