aboutsummaryrefslogtreecommitdiff
path: root/src/GetHyperslab.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/GetHyperslab.c')
-rw-r--r--src/GetHyperslab.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/GetHyperslab.c b/src/GetHyperslab.c
index c24d1f0..1ad9a9c 100644
--- a/src/GetHyperslab.c
+++ b/src/GetHyperslab.c
@@ -45,7 +45,6 @@ static int GetLocalHyperslab (const cGH *GH,
void *hdata);
static int GetDiagonalFromFrom3D (const cGH *GH,
const hslab_mapping_t *mapping,
- int proc,
int vindex,
int timelevel,
int hdatatype,
@@ -80,11 +79,12 @@ CCTK_INT Hyperslab_GetList (const cGH *GH,
void *const *hdata /* num_arrays */,
CCTK_INT *retvals /* num_arrays */)
{
- int i, nprocs, myproc, proc, timelevel, hdatatype, retval;
+ int i, nprocs, proc, timelevel, hdatatype, retval;
CCTK_INT result, *result_ptr;
hslab_mapping_t *mapping;
void *local_hdata;
#ifdef CCTK_MPI
+ int myproc;
CCTK_INT totals_global, *chunk_hsize, *local_hsize;
MPI_Comm comm;
int *displs, *recvcnts;
@@ -130,9 +130,10 @@ CCTK_INT Hyperslab_GetList (const cGH *GH,
return (retval);
}
+ nprocs = CCTK_nProcs (GH);
+
#ifdef CCTK_MPI
myproc = CCTK_MyProc (GH);
- nprocs = CCTK_nProcs (GH);
/* now build the CCTK_INT buffer to communicate the sizes and offsets */
/*** FIXME: could also do this already when creating the mapping ***/
@@ -462,8 +463,8 @@ static int GetLocalHyperslab (const cGH *GH,
/* diagonals from 3D variables are treated special */
if (mapping->is_diagonal_in_3D)
{
- retval = GetDiagonalFromFrom3D (GH, mapping, proc, vindex, timelevel,
- hdatatype, hdata);
+ retval = GetDiagonalFromFrom3D (GH, mapping, vindex, timelevel, hdatatype,
+ hdata);
return (retval);
}
@@ -652,7 +653,6 @@ static int GetLocalHyperslab (const cGH *GH,
static int GetDiagonalFromFrom3D (const cGH *GH,
const hslab_mapping_t *mapping,
- int proc,
int vindex,
int timelevel,
int hdatatype,