[MITgcm-devel] testreport and cross compiling

Martin Losch Martin.Losch at awi.de
Sun Feb 10 10:44:41 EST 2008


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.

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

Martin


On 9 Feb 2008, at 19:54, Jean-Michel Campin wrote:

> Hi Martin,
>
> I did not change testreport.
> The reason is that you can already specify a C compiler for testreport
> only, which can be different from the one in the optfile which is
> used to build mitgcmuv.
> Just setting CC should do it:
> csh,tcsh: setenv CC {tr_c_compiler}
>  sh,bash: export CC={tr_c_compiler}
> (and same thing also for makedepend, just need to set MAKEDEPEND)
>
> I tried it and it seems to work for me:
> testreport use this {tr_c_compiler} to build the mpack and to compile
> the comparison code ; and the C-compiler from the optfile is used
> to compile the C-routines of MITgcm.
>
> If this does not work for you (or if I missed something), let me know.
>
> Jean-Michel
>
> On Fri, Feb 08, 2008 at 10:34:42AM -0500, Jean-Michel Campin wrote:
>> Hi Martin,
>>
>> I can have a look at it (today or tomorrow).
>> CC for testreport itself will be the one of the optfile (default)
>> unless it is specified on the command line (testreport -cc XXXX),
>> and nothing to change to the genmake2 command.
>> Is that right ?
>>
>> Might add also a makedepend option (since there is already
>> a make option).
>>
>> Just beeing curious, since the 2 testreport run is too
>> complicated, you will run only 1 testreport
>> with a command which contains a qsub ?
>>
>> Jean-Michel
>>
>> On Thu, Feb 07, 2008 at 05:10:15PM +0100, Martin Losch wrote:
>>> Hi Jean-Michel, your idea is too complicated. But I am almost there.
>>> All I need now, is to specify two different c-compilers. One for
>>> genmake (in build options) and one for testreport. Is it possible to
>>> add a flag to testreport, such as "-cc gcc", to specify the c-
>>> compiler that is supposed to be used for compiling the comparison
>>> code and the mpack-code? This flag must then overide any CC, which
>>> holds the compiler used for genmake. I am a little afraid that I  
>>> will
>>> testreport, if I do it, but if you give me directions ...
>>>
>>> Martin
>>>
>>> On 5 Feb 2008, at 09:10, Martin Losch wrote:
>>>
>>>> Nice idea, I'll try that:
>>>>
>>>> in the first round I give testreport a stupid command such as "ls -
>>>> l mitgcmuv" and the second on I submit in a batch job with the real
>>>> mpirun-command. I don't think any changes to testreport a required.
>>>>
>>>> Martin
>>>> On 5 Feb 2008, at 01:55, Jean-Michel Campin wrote:
>>>>
>>>>> Hi Martin,
>>>>>
>>>>> Just a vague idea: Would it be possible to run 2 times
>>>>> testreport:
>>>>> - 1rst time just to compile (would require an other option
>>>>> to testreport, but seems relatively easy to add)
>>>>> - 2nd time with "-q" (-quick) to just run.
>>>>> This way, would be easy to start the 2nd testreport once the 1rst
>>>>> one is done (no sync problems), and you would be able to
>>>>> run all the tests with a single "qsub".
>>>>> Cheers,
>>>>> Jean-Michel
>>>>>
>>>>> On Mon, Feb 04, 2008 at 03:56:50PM +0100, Martin Losch wrote:
>>>>>> Hi there,
>>>>>>
>>>>>> I am trying to set up an automated testreport on our SX8. This
>>>>>> machine involves cross-compiling, so that I have to define some
>>>>>> command ./testreport -command "qsub runthemodel" where  
>>>>>> "runthemodel"
>>>>>> is the job-script that includes "mpirun -np 2 ./mitgcmuv".
>>>>>> Unfortunately, the script testreport does not wait until the  
>>>>>> model
>>>>>> run is finished, so that there is no output to compare. With the
>>>>>> queueing system PBS I can use "qsub -W block=true" to achieve  
>>>>>> that
>>>>>> the  calling script waits.
>>>>>> Does anyone know of a similar option for NQSII (which is the
>>>>>> queueing
>>>>>> system on SX8), or do you have another practical solution for
>>>>>> running
>>>>>> testreport on a machine which requires cross compiling?
>>>>>>
>>>>>> Martin
>>>>>>
>>>>>> _______________________________________________
>>>>>> MITgcm-devel mailing list
>>>>>> MITgcm-devel at mitgcm.org
>>>>>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
>>>>> _______________________________________________
>>>>> MITgcm-devel mailing list
>>>>> MITgcm-devel at mitgcm.org
>>>>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
>>>>
>>>> _______________________________________________
>>>> MITgcm-devel mailing list
>>>> MITgcm-devel at mitgcm.org
>>>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
>>>
>>> _______________________________________________
>>> MITgcm-devel mailing list
>>> MITgcm-devel at mitgcm.org
>>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
>> _______________________________________________
>> MITgcm-devel mailing list
>> MITgcm-devel at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-devel
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel




More information about the MITgcm-devel mailing list