[MITgcm-devel] testreport and cross compiling
Ed Hill
ed at eh3.com
Sun Feb 10 12:12:12 EST 2008
On Sun, 10 Feb 2008 16:44:41 +0100 Martin Losch <Martin.Losch at awi.de>
wrote:
> Hi Jean-Michel,
>
> thanks for making that clear. I had hoped that it worked that way.
> The sad circumstance is that when I have CC set to some cc or gcc,
> then mpack and the comparison code compile (with cc or gcc), but the
> stupid machine does not pick up the value of CC from the build
> options file for genmake2. The result is that not only do all sorts
> of tests fail, the compilation even hangs on one of the test. What's
> even more disturbing, is that this does not happen all the time, but
> only in some directories of the file system. I have not yet detected
> a pattern. When I run genmake2 "by hand" I do "ln -s `which sxcc`
> cc" first so that genmake2 used cc but really sxcc (the cross
> compiler), a subsequent make CLEAN removes all links (also the one to
> sxcc), and a "make makefile" works fine. But this does not work with
> testreport, as you can imagine. So I tried setting CC=sxcc in
> my .login/.cshrc files and that works, but then testreport uses that
> CC as well. I guess I have to trace down, why genmake2 does not see
> the CC value specified in the build options file.
Hi Martin,
I'm confused by the above description. How, exactly, are you setting CC
for testreport? If you use an environment variable for CC [note that
this is {ba,}sh syntax]:
export CC=gcc
./testreport
then you should have CC defined with one value for testreport and
genmake2 will then (as it always does) get a potentially different CC
value by source-ing the specified optfile. So, the result is:
for testreport: CC=gcc (or whatever your IA64 machine prefers)
for genmake2: CC=...whatever was in the specified optfile...
Does that make sense?
If you are *NOT* seeing the above then something is going wrong because
I've looked at the code and testreport clearly gets CC as an environment
variable (with a default value of "cc" if nothing is provided) and
genmake2 clearly gets its variables by source-ing the specified
optfile. So if you are not getting the above then please send the
*EXACT* commands you are using. And please include a copy of all your
environment variables ["env > ML_env_vars"] written to a file
immediately before you run testreport.
> For Ed: The headnode/front end is a TX7 with uname -a:
> Linux sx8 2.6.5-7.282-default #1 SMP Tue Aug 29 10:40:40 UTC 2006
> ia64 ia64 ia64 GNU/Linux
OK, so you have an SX machine with a Linux-IA64 "head" node. You should
have basically no trouble building testreport's mpack and the comparison
code to run on the IA64 "head" node while everything else is built to
run on the SX.
Ed
--
Edward H. Hill III, PhD | ed at eh3.com | http://eh3.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-devel/attachments/20080210/9072acc0/attachment.sig>
More information about the MITgcm-devel
mailing list