Skip to content

Commit

Permalink
mixed_cg_merge: merge forgotten MPI datatypes
Browse files Browse the repository at this point in the history
  • Loading branch information
kostrzewa committed Nov 13, 2015
1 parent 09f2c66 commit a766884
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 2 deletions.
31 changes: 30 additions & 1 deletion mpi_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,22 @@ MPI_Datatype deri_time_slice_cont;
MPI_Datatype deri_time_slice_split;

MPI_Datatype field_point;
MPI_Datatype field_point32;
MPI_Datatype field_time_slice_cont;
MPI_Datatype lfield_time_slice_cont;
MPI_Datatype lfield_time_slice_cont32;
MPI_Datatype gauge_x_slice_cont;
MPI_Datatype gauge_x_subslice;
MPI_Datatype gauge_x_slice_gath;
MPI_Datatype field_x_slice_cont;
MPI_Datatype field_x_subslice;
MPI_Datatype field_x_slice_gath;
MPI_Datatype lfield_x_slice_cont;
MPI_Datatype lfield_x_slice_cont32;
MPI_Datatype lfield_x_subslice;
MPI_Datatype lfield_x_subslice32;
MPI_Datatype lfield_x_slice_gath;
MPI_Datatype lfield_x_slice_gath32;
MPI_Datatype deri_x_slice_cont;
MPI_Datatype deri_x_subslice;
MPI_Datatype deri_x_slice_gath;
Expand All @@ -69,14 +74,19 @@ MPI_Datatype field_y_slice_gath;
MPI_Datatype field_y_slice_cont;
MPI_Datatype field_y_subslice;
MPI_Datatype lfield_y_slice_gath;
MPI_Datatype lfield_y_slice_gath32;
MPI_Datatype lfield_y_slice_cont;
MPI_Datatype lfield_y_slice_cont32;
MPI_Datatype lfield_y_subslice;
MPI_Datatype lfield_y_subslice32;

MPI_Datatype field_z_slice_gath;
MPI_Datatype field_z_subslice;
MPI_Datatype field_z_slice_cont;
MPI_Datatype lfield_z_slice_gath;
MPI_Datatype lfield_z_slice_gath32;
MPI_Datatype lfield_z_slice_cont;
MPI_Datatype lfield_z_slice_cont32;
MPI_Datatype field_z_slice_half;

MPI_Datatype deri_y_slice_cont;
Expand Down Expand Up @@ -514,6 +524,7 @@ void tmlqcd_mpi_init(int argc,char *argv[]) {
/* The spinor fields */
/* this is a single spinor field on one space-time point */
MPI_Type_contiguous(24, MPI_DOUBLE, &field_point);
MPI_Type_contiguous(24, MPI_FLOAT, &field_point32);
/* Tis is an even or odd spinor field time slice, continuous */
/* MPI_Type_contiguous(LX*LY*LZ/2, field_point, &field_time_slice_cont); */
MPI_Type_contiguous(LX*LY*LZ*12, MPI_DOUBLE, &field_time_slice_cont);
Expand All @@ -523,7 +534,8 @@ void tmlqcd_mpi_init(int argc,char *argv[]) {
/* this is the not even/odd field */
MPI_Type_contiguous(LX*LY*LZ, field_point, &lfield_time_slice_cont);
MPI_Type_commit(&lfield_time_slice_cont);

MPI_Type_contiguous(LX*LY*LZ, field_point32, &lfield_time_slice_cont32);
MPI_Type_commit(&lfield_time_slice_cont32);

/* This is an even or odd continuous spinor field x-slice */
MPI_Type_contiguous(T*LY*LZ/2, field_point, &field_x_slice_cont);
Expand All @@ -543,6 +555,12 @@ void tmlqcd_mpi_init(int argc,char *argv[]) {
MPI_Type_vector(T, 1, LX, lfield_x_subslice, &lfield_x_slice_gath);
MPI_Type_commit(&lfield_x_slice_gath);
MPI_Type_commit(&lfield_x_slice_cont);

MPI_Type_contiguous(T*LY*LZ, field_point32, &lfield_x_slice_cont32);
MPI_Type_contiguous(LY*LZ, field_point32, &lfield_x_subslice32);
MPI_Type_vector(T, 1, LX, lfield_x_subslice32, &lfield_x_slice_gath32);
MPI_Type_commit(&lfield_x_slice_gath32);
MPI_Type_commit(&lfield_x_slice_cont32);

/* This is an even or odd continuous spinor field y-slice */
MPI_Type_contiguous(T*LX*LZ/2, field_point, &field_y_slice_cont);
Expand All @@ -562,6 +580,12 @@ void tmlqcd_mpi_init(int argc,char *argv[]) {
MPI_Type_vector(T*LX, 1, LY, lfield_y_subslice, &lfield_y_slice_gath);
MPI_Type_commit(&lfield_y_slice_cont);
MPI_Type_commit(&lfield_y_slice_gath);

MPI_Type_contiguous(T*LX*LZ, field_point32, &lfield_y_slice_cont32);
MPI_Type_contiguous(LZ, field_point32, &lfield_y_subslice32);
MPI_Type_vector(T*LX, 1, LY, lfield_y_subslice32, &lfield_y_slice_gath32);
MPI_Type_commit(&lfield_y_slice_cont32);
MPI_Type_commit(&lfield_y_slice_gath32);

/* If z-dir is parallelized, I have assumed that both LZ and T*LX*LY are even */
/* This is an even or odd continuous spinor field z-slice */
Expand All @@ -578,6 +602,11 @@ void tmlqcd_mpi_init(int argc,char *argv[]) {
MPI_Type_vector(T*LX*LY, 1, LZ, field_point, &lfield_z_slice_gath);
MPI_Type_commit(&lfield_z_slice_cont);
MPI_Type_commit(&lfield_z_slice_gath);

MPI_Type_contiguous(T*LX*LY, field_point32, &lfield_z_slice_cont32);
MPI_Type_vector(T*LX*LY, 1, LZ, field_point32, &lfield_z_slice_gath32);
MPI_Type_commit(&lfield_z_slice_cont32);
MPI_Type_commit(&lfield_z_slice_gath32);

#ifdef _USE_TSPLITPAR
/* here I construct the xt yt zt edges for use in _USE_TSPLITPAR */
Expand Down
23 changes: 22 additions & 1 deletion mpi_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,22 @@
/* Datatypes for the data exchange */
extern MPI_Datatype mpi_su3;
extern MPI_Datatype field_point;
extern MPI_Datatype field_point32;
extern MPI_Datatype gauge_time_slice_cont;
extern MPI_Datatype gauge_time_slice_split;
extern MPI_Datatype deri_time_slice_cont;
extern MPI_Datatype deri_time_slice_split;
extern MPI_Datatype field_time_slice_cont;
extern MPI_Datatype lfield_time_slice_cont;
extern MPI_Datatype lfield_time_slice_cont32;
extern MPI_Datatype gauge_x_slice_cont;
extern MPI_Datatype gauge_x_slice_gath;
extern MPI_Datatype field_x_slice_cont;
extern MPI_Datatype field_x_slice_gath;
extern MPI_Datatype lfield_x_slice_cont;
extern MPI_Datatype lfield_x_slice_cont32;
extern MPI_Datatype lfield_x_slice_gath;
extern MPI_Datatype lfield_x_slice_gath32;
extern MPI_Datatype deri_x_slice_cont;
extern MPI_Datatype deri_x_slice_gath;
extern MPI_Datatype gauge_xt_edge_cont;
Expand Down Expand Up @@ -70,7 +74,9 @@ extern MPI_Datatype gauge_y_slice_gath;
extern MPI_Datatype field_y_slice_cont;
extern MPI_Datatype field_y_slice_gath;
extern MPI_Datatype lfield_y_slice_cont;
extern MPI_Datatype lfield_y_slice_cont32;
extern MPI_Datatype lfield_y_slice_gath;
extern MPI_Datatype lfield_y_slice_gath32;
extern MPI_Datatype deri_y_slice_cont;
extern MPI_Datatype deri_y_slice_gath;

Expand All @@ -83,7 +89,9 @@ extern MPI_Datatype gauge_z_slice_cont;
extern MPI_Datatype field_z_slice_cont;
extern MPI_Datatype field_z_slice_gath;
extern MPI_Datatype lfield_z_slice_cont;
extern MPI_Datatype lfield_z_slice_cont32;
extern MPI_Datatype lfield_z_slice_gath;
extern MPI_Datatype lfield_z_slice_gath32;
extern MPI_Datatype field_z_slice_half;

extern MPI_Datatype halffield_point;
Expand Down Expand Up @@ -123,7 +131,7 @@ extern MPI_Datatype jfield_z_slice_gath;
extern MPI_Datatype jfield_y_subslice;
#endif

#if ( defined PARALLELXYZT || defined PARALLELXYZ )
#if ( defined PARALLELT || defined PARALLELXT || defined PARALLELXYT || defined PARALLELXYZT || defined PARALLELXYZ )
extern MPI_Datatype field_z_slice_even_dn;
extern MPI_Datatype field_z_slice_even_up;
extern MPI_Datatype field_z_slice_odd_dn;
Expand All @@ -134,6 +142,19 @@ extern spinor * field_buffer_z ALIGN;
extern spinor * field_buffer_z2 ALIGN;
extern spinor * field_buffer_z3 ALIGN;
extern spinor * field_buffer_z4 ALIGN;
extern spinor * field_buffer_y ALIGN;
extern spinor * field_buffer_y2 ALIGN;
extern spinor * field_buffer_y3 ALIGN;
extern spinor * field_buffer_y4 ALIGN;
extern spinor * field_buffer_x ALIGN;
extern spinor * field_buffer_x2 ALIGN;
extern spinor * field_buffer_x3 ALIGN;
extern spinor * field_buffer_x4 ALIGN;
extern spinor * field_buffer_t ALIGN;
extern spinor * field_buffer_t2 ALIGN;
extern spinor * field_buffer_t3 ALIGN;
extern spinor * field_buffer_t4 ALIGN;

extern halfspinor * halffield_buffer_z ALIGN;
extern halfspinor * halffield_buffer_z2 ALIGN;
# endif
Expand Down

0 comments on commit a766884

Please sign in to comment.