[MITgcm-devel] Changing _R4/_R8 macros

Jean-Michel Campin jmc at ocean.mit.edu
Mon Apr 27 18:45:51 EDT 2009


Hi,

I bumped (once more) into this problem when I tried:
 _GLOBAL_SUM_R4( tmpR4 , myThid ) 
with tmpR4 declared real*4 ...
I think it would be good to have a consistent set of macros for
  _EXCH_ and _GLOBAL_SUM/MAX_ , using the suffix:
 _R4 when applied to real*4 variable
 _R8 when applied to real*8 variable
 _RS when applied to real(_RS) variable
 _RL when applied to real(_RL) variable

Unfortunately, it involves changing many files (~170).

I still have few details to fix, but will be ready to check-in 
those changes sometime tomorrow.
Should I disable the sending of CVS-commit emails ?

I could do so for all check-in with the same (standard) cvs-commit 
message:
"change macros (EXCH & GLOBAL_SUM/MAX) sufix _R4/_R8 to _RS/_RL 
 when applied to _RS/_RL variable"
and then turn it back for the few special cases with 
a more specific cvs-commit message.

Comments ?

Cheers,
Jean-Michel

PS: if someone wants to update a new piece of code, here is
what I was using to make "standard" changes:

cat > modif.sed <<EOF
s/_GLOBAL_SUM_R4/_GLOBAL_SUM_RS/g
s/_GLOBAL_SUM_R8/_GLOBAL_SUM_RL/g
s/_GLOBAL_MAX_R4/_GLOBAL_MAX_RS/g
s/_GLOBAL_MAX_R8/_GLOBAL_MAX_RL/g
s/_EXCH_XY_R4/_EXCH_XY_RS/g
s/_EXCH_XY_R8/_EXCH_XY_RL/g
s/_EXCH_XYZ_R4/_EXCH_XYZ_RS/g
s/_EXCH_XYZ_R8/_EXCH_XYZ_RL/g
EOF
sed -f modif.sed file_to_update > updated_file




More information about the MITgcm-devel mailing list