*** scripts/ccsm_utils/Machines/env.ibm.esmf.t 2004-09-28 09:21:44.000000000 -0700

--- scripts/ccsm_utils/Machines/env.ibm.esmf	2004-09-28 09:21:26.000000000 -0700
***************
*** 0 ****
--- 1,235 ----
+ #! /bin/csh -f
+ 
+ # Documentation of following environment varibles is provided in env.readme
+ 
+ # One of the configurations that we have run on NCAR's IBM Power4 machine is as follows for a T42x1 resolution:
+ # 
+ # ocn 32 cpus
+ # atm 16 cpus configured as 4 MPI tasks, 4 threads each
+ # ice 8 cpus
+ # lnd 4 cpus
+ # cpl 4 cpus
+ # 
+ # Total 64 cpus
+ # Only the atm component is configured for hybrid (MPI and OMP).
+ # 
+ # This configuration was run with a prerelease version of CCSM3, beta18 but should be a good place to start for the CCSM3 release version. On our system we were able to get 5.03 simulation years per wall clock day at the T42x1 resolution.
+ # 
+ # As a starting point for a smaller configuration, I would reduce each processor count in half for each component.
+ # _________________
+ # George R Carr Jr
+ # NCAR/CGD
+ # gcarr@ucar.edu
+ # -------------------------------------------------------------------------
+ # Tasks and Threads: Edit any time prior to invoking the configure command
+ # -------------------------------------------------------------------------
+ 
+ set COMPONENTS = ($COMP_CPL $COMP_ICE $COMP_LND $COMP_OCN $COMP_ATM)
+ 
+                           set ntasks_atm =  4; set nthrds_atm = 4
+                           set ntasks_lnd =  2; set nthrds_lnd = 1
+                           set ntasks_ice =  4; set nthrds_ice = 1
+                           set ntasks_ocn = 16; set nthrds_ocn = 1
+                           set ntasks_cpl =  2; set nthrds_cpl = 1
+ 
+ if ($COMP_LND == xlnd) then    
+                           set ntasks_lnd =  2; set nthrds_lnd = 1
+ endif
+ 
+ if ($COMP_ICE == xice) then    
+                           set ntasks_ice =  4; set nthrds_ice = 1
+ endif
+ 
+ if ($COMP_ATM == cam) then
+                           set ntasks_atm =  4; set nthrds_atm = 4
+   if      ($GRID =~ T31*    ) then  
+                           set ntasks_atm =  4; set nthrds_atm = 4
+   else if ($GRID =~ T42_gx1*) then  
+                           set ntasks_atm =  4; set nthrds_atm = 4
+   else if ($GRID =~ T85_gx1*) then  
+                           set ntasks_atm =  4; set nthrds_atm = 4
+   endif
+ endif
+ 
+ if ($COMP_LND == clm) then
+                           set ntasks_lnd =  2; set nthrds_lnd = 1
+   if      ($GRID =~ T31*    ) then  
+                           set ntasks_lnd =  2; set nthrds_lnd = 1
+   else if ($GRID =~ T42_gx1*) then  
+                           set ntasks_lnd =  2; set nthrds_lnd = 1
+   else if ($GRID =~ T85_gx1*) then  
+                           set ntasks_lnd =  2; set nthrds_lnd = 1
+   endif
+ endif
+ 
+ if ($COMP_ICE == csim) then
+   set pic = prescribed_ice_clim
+   set pia = prescribed_ice_amip
+                           set ntasks_ice =  4; set nthrds_ice = 1  
+   if      ($GRID =~    *gx3*) then  
+                           set ntasks_ice =  4; set nthrds_ice = 1
+   else if ($GRID =~ T42_gx1*) then  
+                           set ntasks_ice =  4; set nthrds_ice = 1
+   else if ($GRID =~ T85_gx1*) then  
+                           set ntasks_ice =  4; set nthrds_ice = 1
+   else if ($CSIM_MODE == $pic) then 
+                           set ntasks_ice =  4; set nthrds_ice = 1  
+   else if ($CSIM_MODE == $pia) then 
+                           set ntasks_ice =  4; set nthrds_ice = 1  
+   endif
+ endif
+ 
+ if ($COMP_OCN == pop) then
+                           set ntasks_ocn = 16; set nthrds_ocn = 1
+   if      ($GRID =~    *gx3*) then  
+                           set ntasks_ocn = 16; set nthrds_ocn = 1
+   else if ($GRID =~ T42_gx1*) then  
+                           set ntasks_ocn = 16; set nthrds_ocn = 1
+   else if ($GRID =~ T85_gx1*) then  
+                           set ntasks_ocn = 16; set nthrds_ocn = 1
+   endif
+ endif
+ 
+ setenv NTASKS_ATM $ntasks_atm
+ setenv NTHRDS_ATM $nthrds_atm
+ setenv NTASKS_LND $ntasks_lnd
+ setenv NTHRDS_LND $nthrds_lnd
+ setenv NTASKS_ICE $ntasks_ice
+ setenv NTHRDS_ICE $nthrds_ice
+ setenv NTASKS_OCN $ntasks_ocn
+ setenv NTHRDS_OCN $nthrds_ocn
+ setenv NTASKS_CPL $ntasks_cpl
+ setenv NTHRDS_CPL $nthrds_cpl
+ 
+ # -------------------------------------------------------------------------
+ # General machine specific environment variables - edit before the initial build
+ # -------------------------------------------------------------------------
+ 
+ setenv MAX_TASKS_PER_NODE  4
+ if !($?SCRATCH) then
+   set SCRATCH = $HOME
+   echo "## Warning: SCRATCH not defined in system environment. Set SCRATCH to be $HOME";
+ endif
+ 
+ setenv EXEROOT             $SCRATCH/$CASE
+ setenv RUNROOT             $EXEROOT
+ setenv GMAKE_J             1
+ 
+ # -------------------------------------------------------------------------
+ # Environment variables for prestaging input data
+ # -------------------------------------------------------------------------
+ 
+ setenv DIN_LOC_ROOT        $SCRATCH/inputdata
+ setenv DIN_LOC_ROOT_USER   $SCRATCH/inputdata_user
+ setenv DIN_LOC_MSROOT      /CCSM/inputdata
+ setenv DIN_REM_MACH        dataproc.ucar.edu
+ setenv DIN_REM_MSROOT      /CCSM/inputdata
+ setenv DIN_REM_ROOT        /fs/cgd/csm/inputdata
+ 
+ # -------------------------------------------------------------------------
+ # Environment variables for short term output storage - edit anytime during run
+ # -------------------------------------------------------------------------
+ 
+ setenv DOUT_S              TRUE
+ setenv DOUT_S_ROOT         /ptmp/$LOGNAME/archive/$CASE
+ 
+ # -------------------------------------------------------------------------
+ # Environment variables for longer term output storage - edit anytime during run
+ # -------------------------------------------------------------------------
+ 
+ setenv DOUT_L_RCP          FALSE
+ setenv DOUT_L_RCP_ROOT     mylogin@remotesite.edu:/ptmp/$LOGNAME/archive/$CASE
+ setenv DOUT_L_MS           FALSE
+ setenv DOUT_L_MSNAME       `echo $LOGNAME | tr '[a-z]' '[A-Z]'`
+ setenv DOUT_L_MSROOT       /$DOUT_L_MSNAME/csm/$CASE
+ setenv DOUT_L_MSPWD        $DOUT_L_MSNAME                    
+ setenv DOUT_L_MSRPD        3650                              
+ setenv DOUT_L_MSPRJ        00000000                          
+ 
+ # -------------------------------------------------------------------------
+ # Build and runtime environment variables - edit before the initial build
+ # -------------------------------------------------------------------------
+ 
+ #setenv OBJECT_MODE 32; #setenv XLSMPOPTS "stack=86000000"
+  setenv OBJECT_MODE 64;  setenv XLSMPOPTS "stack=256000000"
+ #ulimit -d unlimited;  #ulimit -s unlimited
+ 
+  limit datasize  unlimited    
+  setenv MP_EUILIB us          
+  setenv MP_RMPOOL 1
+  setenv MP_PGMMODEL mpmd      
+  setenv MP_CMDFILE poe.cmdfile
+  setenv MP_STDOUTMODE ordered 
+  setenv MP_SHARED_MEMORY yes
+  setenv MP_EAGER_LIMIT 65536  
+  setenv MP_INFOLEVEL 6
+  setenv MP_LABELIO yes        
+ #setenv MP_CSS_INTERRUPT yes
+  setenv OMP_DYNAMIC FALSE     
+  setenv AIXTHREAD_SCOPE S
+  setenv MALLOCMULTIHEAP TRUE  
+ #setenv SPINLOOPTIME 100000
+ #setenv YIELDLOOPTIME 40000
+ 
+ #=========================================================================
+ # DERIVED ENVIRONMENT VARIABLES (user should not edit these)
+ #=========================================================================
+ 
+ setenv ARCH             IBM
+ setenv OS               AIX
+ setenv SITE             NCAR
+ setenv BATCH            LL
+ setenv OBJROOT          $EXEROOT                          # build code here
+ setenv LIBROOT          $EXEROOT/lib                      # location of supplemental libraries
+ setenv INCROOT          $LIBROOT/include                  # location of supplemental includes/modfiles
+ 
+ # Translate the lower case to upper case for true and false.
+ setenv DOUT_S          `echo $DOUT_S     | tr '[a-z]' '[A-Z]'`
+ setenv DOUT_L_MS       `echo $DOUT_L_MS  | tr '[a-z]' '[A-Z]'`
+ setenv DOUT_L_RCP      `echo $DOUT_L_RCP | tr '[a-z]' '[A-Z]'`
+ 
+ set MODELS = ()
+ set NTASKS = ()
+ set NTHRDS = ()
+ foreach n (1 2 3 4 5)
+    set comp = $COMPONENTS[$n]
+    if ($comp =~ "cam" ) then
+        set model = atm ; set ntask = $NTASKS_ATM; set nthrd = $NTHRDS_ATM
+    else if ($comp =~ "latm") then
+        set model = atm ; set ntask = $NTASKS_ATM; set nthrd = $NTHRDS_ATM
+    else if ($comp =~ "datm") then
+        set model = atm ; set ntask = $NTASKS_ATM; set nthrd = $NTHRDS_ATM
+    else if ($comp =~ "xatm") then
+        set model = atm ; set ntask = $NTASKS_ATM; set nthrd = $NTHRDS_ATM
+    else if ($comp =~ "clm" ) then
+        set model = lnd ; set ntask = $NTASKS_LND; set nthrd = $NTHRDS_LND
+    else if ($comp =~ "dlnd") then
+        set model = lnd ; set ntask = $NTASKS_LND; set nthrd = $NTHRDS_LND
+    else if ($comp =~ "xlnd") then
+        set model = lnd ; set ntask = $NTASKS_LND; set nthrd = $NTHRDS_LND
+    else if ($comp =~ "csim") then
+        set model = ice ; set ntask = $NTASKS_ICE; set nthrd = $NTHRDS_ICE
+    else if ($comp =~ "dice") then
+        set model = ice ; set ntask = $NTASKS_ICE; set nthrd = $NTHRDS_ICE
+    else if ($comp =~ "xice") then
+        set model = ice ; set ntask = $NTASKS_ICE; set nthrd = $NTHRDS_ICE
+    else if ($comp =~ "pop" ) then
+        set model = ocn ; set ntask = $NTASKS_OCN; set nthrd = $NTHRDS_OCN
+    else if ($comp =~ "docn") then
+        set model = ocn ; set ntask = $NTASKS_OCN; set nthrd = $NTHRDS_OCN
+    else if ($comp =~ "xocn") then
+        set model = ocn ; set ntask = $NTASKS_OCN; set nthrd = $NTHRDS_OCN
+    else if ($comp =~ "cpl" ) then
+        set model = cpl ; set ntask = $NTASKS_CPL; set nthrd = $NTHRDS_CPL
+    endif
+    set MODELS = ($MODELS $model)
+    set NTASKS = ($NTASKS $ntask)
+    set NTHRDS = ($NTHRDS $nthrd)
+ end
+ 
+setenv PATH ${PATH}:/usr/vacpp/bin
+
+ if ( $?LOADL_PROCESSOR_LIST ) then
+ 	setenv LOADL_PROCESSOR_LIST "`echo $LOADL_PROCESSOR_LIST | sed 's/\(esmf[0-9][0-9]\)m/\1s/g'`"
+ endif
+