[MITgcm-devel] Changing _R4/_R8 macros

Dimitris Menemenlis menemenlis at jpl.nasa.gov
Mon Apr 27 23:05:00 EDT 2009


JM isn't there some rule relating # of CVS commits and beer owed?  Are you trying to cheat?  ...

What you suggest is reasonable.  I will update affected contrib stuff after your check in.. 

Dimitris Menemenlis
818-625-6498
-----Original Message-----
From: Jean-Michel Campin <jmc at ocean.mit.edu>
Date: Monday, Apr 27, 2009 3:46 pm
Subject: [MITgcm-devel] Changing _R4/_R8 macros
To: "mitgcm-devel at mitgcm.org" <mitgcm-devel at mitgcm.org>Reply-To: "MITgcm-devel at mitgcm.org" <MITgcm-devel at mitgcm.org>

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

_______________________________________________
MITgcm-devel mailing list
MITgcm-devel at mitgcm.org
http://mitgcm.org/mailman/listinfo/mitgcm-devel





More information about the MITgcm-devel mailing list