4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
17 * GROMACS: A message-passing parallel molecular dynamics implementation
18 * H.J.C. Berendsen, D. van der Spoel and R. van Drunen
19 * Comp. Phys. Comm. 91, 43-56 (1995)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
27 * Green Red Orange Magenta Azure Cyan Skyblue
29 static char *SRCID_transpose_mpi_h
= "$Id$";
31 #ifndef TRANSPOSE_MPI_H
32 #define TRANSPOSE_MPI_H
36 #endif /* __cplusplus */
38 #include <mpi.h> /* need access to the MPI type constants */
41 /*********************** Transpose Element Type ************************/
43 /* Here, we define the data type of the individual elements in the
46 typedef fftw_real TRANSPOSE_EL_TYPE
;
48 /* We need to set the MPI type constant corresponding to the type
49 TRANSPOSE_EL_TYPE. (MPI needs to know the data type in case it
50 has to make translations on heterogeneous networks.) Possible
51 type constants are MPI_DOUBLE, MPI_FLOAT, MPI_INT, MPI_LONG, ...
52 see your MPI manual for more. */
54 #define MPI_TRANSPOSE_EL_TYPE_CONSTANT MPI_DOUBLE
56 #define MPI_TRANSPOSE_EL_TYPE_CONSTANT MPI_FLOAT
59 /***********************************************************************/
62 int block_num
, dest_pe
, send_size
, recv_size
;
63 } transpose_mpi_block_dest
;
69 int nx
,ny
,local_nx
,local_ny
;
71 transpose_mpi_block_dest
*block_dest
;
72 int num_blocks
, block_size
;
73 int block_size_padded
;
76 int num_perm_blocks
, perm_block_size
;
80 } transpose_mpi_plan_struct
;
82 typedef transpose_mpi_plan_struct
*transpose_mpi_plan
;
84 extern void transpose_mpi_get_local_size(int n
, int my_pe
, int n_pes
,
85 int *local_n
, int *local_start
);
86 extern int transpose_mpi_get_local_storage_size(int nx
, int ny
,
87 int my_pe
, int n_pes
);
89 extern transpose_mpi_plan
transpose_mpi_create_plan(int nx
, int ny
,
91 extern void transpose_mpi_destroy_plan(transpose_mpi_plan p
);
93 extern void transpose_mpi(transpose_mpi_plan p
,
94 TRANSPOSE_EL_TYPE
*local_data
, int el_size
);
98 #endif /* __cplusplus */
100 #endif /* TRANSPOSE_MPI_H */