[MITgcm-devel] [MITgcm-cvs] MITgcm/pkg/exf CVS Commit

Martin Losch Martin.Losch at awi.de
Mon Sep 5 10:28:19 EDT 2011


Hi,

> 1-OLx,sNx+OLx 
is definitely better for vectorisation (will then work over both loops)
I do not know of any place where S/R EXF_SWAPFFIELDS_3D is called (do we have 3D forcing fields? In the atmosphere maybe?)
M.

On Sep 5, 2011, at 4:21 PM, Jean-Michel Campin wrote:

> Hi Martin,
> 
> Well, I think it's a good point, but I don't have a clear
> preference. May be others will have.
> 
> There was 2 points I was unsure:
> 1) might be faster (and cleaner) to do the loops over the full
> range of i,j indices (sometime get better performance),
> 1-OLx,sNx+OLx instead of just 1,sNx.
> 2) I did not find any call to S/R EXF_SWAPFFIELDS_3D
> Is there some hidden code that use this one ?
> 
> Cheers,
> Jean-Michel
> 
> On Mon, Sep 05, 2011 at 09:45:52AM +0200, Martin Losch wrote:
>> Hi Jean-Michel,
>> 
>> thanks for stopping the uncontrolled growth of number of S/Rs, in particular since I am responsible (in part) for this. I found
>> 
>>> csysm15::build_ad> grep -i exf_swapffields *.F | grep -i call
>>> ctrl_get_gen.F:        call exf_SwapFFields( xx_gen0, xx_gen1, mythid )
>>> exf_set_gen.F:            call exf_SwapFFields( gen0, gen1, mythid )
>>> exf_set_obcs.F:            CALL exf_swapffields_xz( obcs_xz_0, obcs_xz_1, nNz,myThid )
>>> exf_set_obcs.F:            CALL exf_swapffields_yz( obcs_yz_0, obcs_yz_1, nNz,myThid )
>>> exf_set_obcs.F:            CALL exf_swapffields_xz( obcs_x_0, obcs_x_1, 1,myThid )
>>> exf_set_obcs.F:            CALL exf_swapffields_yz( obcs_y_0, obcs_y_1, 1,myThid )
>>> exf_set_runoff.F:            call exf_SwapFFields( gen0, gen1, mythid )
>>> exf_set_uv.F:            call exf_SwapFFields( uvec0, uvec1, mythid )
>>> exf_set_uv.F:            call exf_SwapFFields( vvec0, vvec1, mythid )
>> 
>> and all the exf_swapffields* routines do is copy a field an reset another. (exf_set_runoff is basically a cop of exf_set_gen.) 
>> I am wondering wether we need exf_swapffields* at all. They might improve readability a little, but could be replaced by a comment ( "swap forcing fields") and in-lined code for better performance (?) (and fewer fortran files). What do you (and others) think? Is it worth the effort? (in F90 it would mean be just two lines + comment instead of the s/r-call (o:) 
>> 
>> Martin
>> 
>> 
>> On Sep 2, 2011, at 8:22 PM, Jean-Michel Campin wrote:
>> 
>>> Update of /u/gcmpack/MITgcm/pkg/exf
>>> In directory forge:/tmp/cvs-serv14770
>>> 
>>> Modified Files:
>>> 	exf_set_obcs.F 
>>> Log Message:
>>> - add argument nNz (= number of levels) to S/R EXF_SET_OBCS_XZ &
>>> EXF_SET_OBCS_YZ ; disable S/R EXF_SET_OBCS_X & EXF_SET_OBCS_Y.
>>> - fix for multi-threaded (assuming loaded arrays are shared).
>>> 
>>> 
>>> _______________________________________________
>>> MITgcm-cvs mailing list
>>> MITgcm-cvs at mitgcm.org
>>> http://mitgcm.org/mailman/listinfo/mitgcm-cvs
>> 
>> 
>> _______________________________________________
>> 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