[MITgcm-devel] testreport and cross compiling

Jean-Michel Campin jmc at ocean.mit.edu
Sat Feb 9 13:54:17 EST 2008


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



More information about the MITgcm-devel mailing list