29 #include "accfft_common.h"
36 void * ptr=fftw_malloc(size);
59 MPI_Comm_rank(in_comm, &procid);
60 MPI_Comm_size(in_comm, &nprocs);
62 if(c_dims[0]*c_dims[1]!=nprocs){
63 PCOUT<<
"ERROR c_dims!=nprocs --> "<<c_dims[0]<<
"*"<<c_dims[1]<<
" !="<<nprocs<<std::endl;
64 c_dims[0]=0;c_dims[1]=0;
65 MPI_Dims_create(nprocs,2, c_dims);
67 PCOUT<<
"Switching to c_dims_0="<< c_dims[0]<<
" , c_dims_1="<<c_dims[1]<<std::endl;
71 int period[2], reorder;
73 period[0]=0; period[1]=0;
76 MPI_Cart_create(in_comm, 2, c_dims, period, reorder, c_comm);
void accfft_create_comm(MPI_Comm in_comm, int *c_dims, MPI_Comm *c_comm)
void * accfft_alloc(ptrdiff_t size)
void accfft_free(void *ptr)