[cig-commits] [commit] rajesh_dev: Minor cleanup related to caps_per_proc removal (f8f8ac9)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Nov 5 19:01:28 PST 2014


Repository : https://github.com/geodynamics/citcoms

On branch  : rajesh_dev
Link       : https://github.com/geodynamics/citcoms/compare/464e1b32299b15819f93efd98d969cddb84dfe51...f97ae655a50bdbd6dac1923a3471ee4dae178fbd

>---------------------------------------------------------------

commit f8f8ac9d2debc000a1b14bbe2468aa3a3b16d3bd
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date:   Fri Apr 18 15:33:36 2014 -0700

    Minor cleanup related to caps_per_proc removal


>---------------------------------------------------------------

f8f8ac9d2debc000a1b14bbe2468aa3a3b16d3bd
 CitcomS/Components/IC.py       |   5 +
 bin/input.sample               | 232 -----------------------------------------
 lib/Full_parallel_related.c    |  20 ++--
 lib/General_matrix_functions.c |   3 +-
 lib/Parsing.c                  |   2 +-
 5 files changed, 18 insertions(+), 244 deletions(-)

diff --git a/CitcomS/Components/IC.py b/CitcomS/Components/IC.py
index 08c6745..4dd77ad 100644
--- a/CitcomS/Components/IC.py
+++ b/CitcomS/Components/IC.py
@@ -42,6 +42,11 @@ class IC(CitcomComponent):
         from CitcomSLib import IC_set_properties
 
         inv = self.inventory
+        
+        # rkk: the following is casting/corecing the inv.perturbmag to be a sequence
+        # of type float. what kind of sequence is inv.perturbmag? An array? It is a
+        # pyre.inventory.list, as declared on line 131
+
         inv.perturbmag = map(float, inv.perturbmag)
         inv.perturbl = map(int, inv.perturbl)
         inv.perturbm = map(int, inv.perturbm)
diff --git a/bin/input.sample b/bin/input.sample
deleted file mode 100644
index 4837945..0000000
--- a/bin/input.sample
+++ /dev/null
@@ -1,232 +0,0 @@
-# specify output files
-datadir="scratch"
-datafile="regtest"
-
-output_format=ascii
-output_optional=surf,botm
-output_ll_max=20
-
-# specify input files
-# Important: when file_vbcs is 1, make sure topvbc is also turned on.
-file_vbcs=0
-vel_bound_file=""
-#vel_bound_file="velbc/velbc_regional"
-
-coor=0
-coor_file=""
-
-mat_control=0
-mat_file=""
-
-lith_age=0
-lith_age_file=""
-
-tracer=0
-tracer_file=""
-
-
-# processors, mesh grid information
-nproc_surf=1
-nprocx=1
-nprocy=1
-nprocz=1
-nodex=17
-nodey=17
-nodez=9
-mgunitx=8
-mgunity=8
-mgunitz=8
-levels=1
-
-
-# the calculation region definition
-theta_min=1.0708
-theta_max=2.0708
-fi_min=0.0
-fi_max=1.0000
-
-radius_inner=0.5500
-radius_outer=1.0
-
-
-# restart info
-restart=0
-post_p=0
-datadir_old="."
-datafile_old=""
-solution_cycles_init=0
-zero_elapsed_time=1
-
-
-# timestepping information
-minstep=1
-maxstep=1
-maxtotstep=1
-storage_spacing=10
-cpu_limits_in_seconds=360000000
-
-
-# Initial conditions
-num_perturbations=1
-perturblayer=3
-perturbmag=0.1
-perturbl=1
-perturbm=1
-
-
-# Boundary Conditions
-topvbc=0
-     topvbxval=0.0
-     topvbyval=0.0
-botvbc=0
-     botvbxval=0.0
-     botvbyval=0.0
-
-toptbc=1
-     toptbcval=0.0
-bottbc=1
-     bottbcval=1.0
-
-lith_age_time=0
-lith_age_depth=0.031400
-mantle_temp=1.000000
-temperature_bound_adj=0
-depth_bound_adj=0.157000
-width_bound_adj=0.087270
-
-
-# miscellaneous information
-stokes_flow_only=0
-inputdiffusicity=1.0
-rayleigh=1e6
-Q0=0
-
-
-# required information
-Problem=convection
-Geometry=sphere
-Solver=cgrad
-node_assemble=1
-
-
-# Depth Information
-# for material above z_lith,    mat = 1;
-# for material above z_410,     mat = 2;
-# for material above z_lmantle, mat = 3;
-# for material below z_lmantle, mat = 4;
-z_lith=0.0007848
-z_410=0.03924			#also depth of 410-phase change
-z_lmantle=0.06435		#also depth of 670-phase change
-z_cmb=0.439			#     depth of another phase change
-
-
-# Viscosity Information
-Viscosity=system
-rheol=3
-visc_smooth_method=3
-
-VISC_UPDATE=on
-num_mat=4
-
-TDEPV=on
-viscE=30,30,30,30
-viscT=.2,.2,.2,.2
-visc0=10,1,10,10
-
-SDEPV=off
-sdepv_expt=1,1,1,1
-sdepv_misfit=0.020
-
-low_visc_channel=off
-low_visc_wedge=off
-lv_min_radius=0.9764
-lv_max_radius=0.9921
-lv_channel_thickness=0.0047
-lv_reduction=0.5
-
-VMIN=on
-visc_min=1.0e0
-VMAX=on
-visc_max=1.0e1
-
-
-# Tracer information
-tracer=off
-
-tracer_ic_method=0
-tracers_per_element=10
-tracer_file="tracer.dat"
-
-tracer_flavors=0
-ic_method_for_flavors=0
-z_interface=0.700000
-
-chemical_buoyancy=on
-buoy_type=1
-buoyancy_ratio=1.0
-reset_initial_composition=off
-
-
-# Phase Change Information
-Ra_410=0.0
-clapeyron410=0.0235
-transT410=0.78
-width410=0.0058
-
-Ra_670=0.0
-clapeyron670=-0.0235
-transT670=0.875
-width670=0.0058
-
-Ra_cmb=0.0
-clapeyroncmb=-0.0235
-transTcmb=0.875
-widthcmb=0.0058
-
-
-# Dimensional Information
-radius=6371e3
-density=3500.0
-thermdiff=1.0e-6
-gravacc=10.0
-thermexp=3.0e-5
-refvisc=1e21
-cp=1250
-density_above=0.0
-density_below=6600.0
-
-# Data input and program debugging
-DESCRIBE=off
-BEGINNER=off
-VERBOSE=on
-
-verbose=off
-see_convergence=1
-
-
-# Solver Related Matters
-mg_cycle=1
-down_heavy=3
-up_heavy=3
-vlowstep=1000
-vhighstep=3
-
-piterations=375
-accuracy=1.0e-6
-
-ADV=on
-fixed_timestep=0.0
-finetunedt=0.7
-adv_sub_iterations=2
-adv_gamma=0.5
-
-precond=on
-aug_lagr=on
-aug_number=2.0e3
-
-remove_rigid_rotation=on
-
-# Age information
-start_age=4.0
-reset_startage=0
-
diff --git a/lib/Full_parallel_related.c b/lib/Full_parallel_related.c
index 86819ac..f8946a9 100644
--- a/lib/Full_parallel_related.c
+++ b/lib/Full_parallel_related.c
@@ -195,7 +195,7 @@ static void set_vertical_communicator(struct All_variables *E)
 
   processors = (int *)malloc((E->parallel.nprocz+2)*sizeof(int));
 
-  m = E->sphere.capid - 1;
+  m = E->sphere.capid[1] - 1;
   i = E->parallel.me_loc[1];
   j = E->parallel.me_loc[2];
 
@@ -395,7 +395,7 @@ void full_parallel_domain_boundary_nodes( struct All_variables *E )
     add them back here */
 
     /* north pole is at the front left proc. of 1st cap */
-    if (E->sphere.capid == 1 &&
+    if (E->sphere.capid[1] == 1 &&
     E->parallel.me_loc[1] == 0 &&
     E->parallel.me_loc[2] == 0)
       for(j=1;j<=noz;j++) {
@@ -404,7 +404,7 @@ void full_parallel_domain_boundary_nodes( struct All_variables *E )
       }
 
     /* south pole is at the back right proc. of final cap */
-    if (E->sphere.capid == E->sphere.caps &&
+    if (E->sphere.capid[1] == E->sphere.caps &&
     E->parallel.me_loc[1] == E->parallel.nprocx-1 &&
     E->parallel.me_loc[2] == E->parallel.nprocy-1)
       for(j=1;j<=noz;j++) {
@@ -426,7 +426,7 @@ void full_parallel_domain_boundary_nodes( struct All_variables *E )
     fprintf(E->fp_out,"output_shared_nodes %d \n",E->parallel.me);
     for(lev=E->mesh.gridmax;lev>=E->mesh.gridmin;lev--)
       fprintf(E->fp_out,"lev=%d  me=%d capid=%d\n",
-          lev, E->parallel.me,E->sphere.capid);
+          lev, E->parallel.me,E->sphere.capid[1]);
     for (ii=1;ii<=6;ii++)
       for (i=1;i<=E->parallel.NUM_NNO[lev].bound[ii];i++)
         fprintf(E->fp_out,"ii=%d   %d %d \n",ii,i,
@@ -476,7 +476,7 @@ void full_parallel_communication_routs_v( struct All_variables *E )
     noz = E->lmesh.NOZ[lev];
     noy = E->lmesh.NOY[lev];
 
-    cap = E->sphere.capid - 1;  /* which cap I am in (0~11) */
+    cap = E->sphere.capid[1] - 1;  /* which cap I am in (0~11) */
 
     /* -X face */
     npass = ii = 1;
@@ -617,7 +617,7 @@ void full_parallel_communication_routs_v( struct All_variables *E )
         E->parallel.NUM_NODEz[lev].pass[kkk] = 0;
         E->parallel.NUM_NEQz[lev].pass[kkk] = 0;
 
-        cap = E->sphere.capid - 1;  /* which cap I am in (0~11) */
+        cap = E->sphere.capid[1] - 1;  /* which cap I am in (0~11) */
         E->parallel.PROCESSORz[lev].pass[kkk] =
         E->parallel.loc2proc_map[cap][lx][ly][lz+((ii==5)?-1:1)];
 
@@ -644,7 +644,7 @@ void full_parallel_communication_routs_v( struct All_variables *E )
     for(lev=E->mesh.gridmax;lev>=E->mesh.gridmin;lev--) {
       fprintf(E->fp_out,"output_communication route surface for lev=%d\n",lev);
       fprintf(E->fp_out,"  me= %d cap=%d pass  %d \n",
-        E->parallel.me,E->sphere.capid,E->parallel.TNUM_PASS[lev]);
+        E->parallel.me,E->sphere.capid[1],E->parallel.TNUM_PASS[lev]);
       for (k=1;k<=E->parallel.TNUM_PASS[lev];k++) {
         fprintf(E->fp_out,
             "proc %d and pass  %d to proc %d with %d eqn and %d node\n",
@@ -670,7 +670,7 @@ void full_parallel_communication_routs_v( struct All_variables *E )
       fprintf(E->fp_out,"proc %d and pass  %d to proc %d\n",
           E->parallel.me,k,E->parallel.PROCESSORz[lev].pass[k]);
 
-      fprintf(E->fp_out,"cap=%d eqn=%d node=%d\n", E->sphere.capid,
+      fprintf(E->fp_out,"cap=%d eqn=%d node=%d\n", E->sphere.capid[1],
       E->parallel.NUM_NEQ[lev].pass[kkkp],
       E->parallel.NUM_NODE[lev].pass[kkkp]);
       for(ii=1;ii<=E->parallel.NUM_NEQ[lev].pass[kkkp];ii++) 
@@ -708,7 +708,7 @@ void full_parallel_communication_routs_s( struct All_variables *E )
     noz = E->lmesh.NOZ[lev];
     noy = E->lmesh.NOY[lev];
 
-    j = E->sphere.capid;
+    j = E->sphere.capid[1];
     for (kkk=1;kkk<=E->parallel.TNUM_PASS[lev];kkk++) {
       if (kkk<=4) {  /* first 4 communications are for XZ and YZ planes */
         ii = kkk;
@@ -739,7 +739,7 @@ void full_parallel_communication_routs_s( struct All_variables *E )
       fprintf(E->fp_out,"output_communication route surface for lev=%d\n",lev);
       fprintf(E->fp_out,"  me= %d cap=%d pass  %d \n",
           E->parallel.me,
-          E->sphere.capid,
+          E->sphere.capid[1],
           E->parallel.TNUM_PASS[lev]);
       for (k=1;k<=E->parallel.TNUM_PASS[lev];k++) {
         fprintf(E->fp_out,"proc %d and pass  %d to proc %d with %d node\n",
diff --git a/lib/General_matrix_functions.c b/lib/General_matrix_functions.c
index 6e55843..8112446 100644
--- a/lib/General_matrix_functions.c
+++ b/lib/General_matrix_functions.c
@@ -383,7 +383,8 @@ double conj_grad( struct All_variables *E,
     free((double*) p2);
     free((double*) Ap);
 
-    return(residual);   }
+    return(residual);   
+}
 #endif /* !USE_CUDA */
 
 
diff --git a/lib/Parsing.c b/lib/Parsing.c
index b8d1d08..c92dca6 100644
--- a/lib/Parsing.c
+++ b/lib/Parsing.c
@@ -68,7 +68,7 @@ struct ext_par		/* global variables for getpar */
   int listmax;
   int bufmax;
   FILE *listout;
-}	ext_par;
+} ext_par;
 
 struct arglist		/* structure of list set up by setpar */
 {



More information about the CIG-COMMITS mailing list