[cig-commits] [commit] rajesh-petsc-schur: Eliminated the 2nd argument of allocate_tracer_arrays, which was set to the caps_per_proc loop variable (56025d5)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Nov 5 19:08:16 PST 2014


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

On branch  : rajesh-petsc-schur
Link       : https://github.com/geodynamics/citcoms/compare/464e1b32299b15819f93efd98d969cddb84dfe51...f97ae655a50bdbd6dac1923a3471ee4dae178fbd

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

commit 56025d5a1f7131d169bea5a40c138c994015f32c
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date:   Wed Sep 17 15:03:08 2014 -0700

    Eliminated the 2nd argument of allocate_tracer_arrays, which was set to the caps_per_proc loop variable


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

56025d5a1f7131d169bea5a40c138c994015f32c
 lib/Checkpoints.c  |  2 +-
 lib/Tracer_setup.c | 12 +++++-------
 lib/prototypes.h   |  2 +-
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/lib/Checkpoints.c b/lib/Checkpoints.c
index 16d10f6..4c980ae 100644
--- a/lib/Checkpoints.c
+++ b/lib/Checkpoints.c
@@ -315,7 +315,7 @@ static void read_tracer_checkpoint(struct All_variables *E, FILE *fp)
 
     /* # of tracers, allocate memory */
         fread(&itmp, sizeof(int), 1, fp);
-        allocate_tracer_arrays(E, CPPR, itmp);
+        allocate_tracer_arrays(E, itmp);
         E->trace.ntracers[CPPR] = itmp;
 
     /* read tracer data */
diff --git a/lib/Tracer_setup.c b/lib/Tracer_setup.c
index 4091d10..f77ed13 100644
--- a/lib/Tracer_setup.c
+++ b/lib/Tracer_setup.c
@@ -59,8 +59,7 @@ int icheck_that_processor_shell(struct All_variables *E,
 void expand_later_array(struct All_variables *E, int j);
 void expand_tracer_arrays(struct All_variables *E, int j);
 void tracer_post_processing(struct All_variables *E);
-void allocate_tracer_arrays(struct All_variables *E,
-                            int j, int number_of_tracers);
+void allocate_tracer_arrays(struct All_variables *E, int number_of_tracers);
 void count_tracers_of_flavors(struct All_variables *E);
 
 int full_icheck_cap(struct All_variables *E, int icap,
@@ -769,7 +768,7 @@ static void generate_random_tracers(struct All_variables *E,
     double random1,random2,random3;
 
 
-    allocate_tracer_arrays(E,CPPR,tracers_cap);
+    allocate_tracer_arrays(E,tracers_cap);
 
     /* Finding the min/max of the cartesian coordinates. */
     /* One must loop over E->X to find the min/max, since the 8 corner */
@@ -910,7 +909,7 @@ static void read_tracer_file(struct All_variables *E)
 
     iestimate=number_of_tracers/E->parallel.nproc + icushion;
 
-        allocate_tracer_arrays(E,CPPR,iestimate);
+        allocate_tracer_arrays(E,iestimate);
 
         for (kk=1;kk<=number_of_tracers;kk++) {
             int len, ncol;
@@ -1060,7 +1059,7 @@ static void read_old_tracer_file(struct All_variables *E)
 
         /* allocate memory for tracer arrays */
 
-        allocate_tracer_arrays(E,CPPR,numtracers);
+        allocate_tracer_arrays(E,numtracers);
         E->trace.ntracers[CPPR]=numtracers;
 
         for (kk=1;kk<=numtracers;kk++) {
@@ -1352,8 +1351,7 @@ void get_neighboring_caps(struct All_variables *E)
 /*                                                                            */
 /* This function allocates memories to tracer arrays.                         */
 
-void allocate_tracer_arrays(struct All_variables *E,
-                            int j, int number_of_tracers)
+void allocate_tracer_arrays(struct All_variables *E, int number_of_tracers)
 {
 
     int kk;
diff --git a/lib/prototypes.h b/lib/prototypes.h
index 923dd2a..41595e4 100644
--- a/lib/prototypes.h
+++ b/lib/prototypes.h
@@ -510,7 +510,7 @@ void initialize_tracers(struct All_variables *);
 void cart_to_sphere(struct All_variables *, double, double, double, double *, double *, double *);
 void sphere_to_cart(struct All_variables *, double, double, double, double *, double *, double *);
 void get_neighboring_caps(struct All_variables *);
-void allocate_tracer_arrays(struct All_variables *, int, int);
+void allocate_tracer_arrays(struct All_variables *, int);
 void expand_tracer_arrays(struct All_variables *, int);
 void expand_later_array(struct All_variables *, int);
 int icheck_processor_shell(struct All_variables *, int, double);



More information about the CIG-COMMITS mailing list