diff --git a/cuda_fft.cpp b/cuda_fft.cpp deleted file mode 100644 index 0d88ea8f0180a47c4aac5e47050274a33008dd38..0000000000000000000000000000000000000000 --- a/cuda_fft.cpp +++ /dev/null @@ -1,162 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "cuComplex.h" -#include "proto.h" -#include "errcodes.h" -#include - -#if defined(CUFFTMP) && defined(USE_FFTW) - -void cuda_fft( - int num_w_planes, - int grid_size_x, - int grid_size_y, - int xaxis, - int yaxis, - double * grid, - double * gridss, - int rank, - MPI_Comm comm) -{ - - #if !defined __CUDACC__ - int ndevices; - cudaGetDeviceCount(&ndevices); - cudaSetDevice(rank % ndevices); - - if ( rank == 0 ) { - if (0 == ndevices) { - - shutdown_wstacking(NO_ACCELERATORS_FOUND, "No accelerators found", __FILE__, __LINE__ ); - } - } - #endif - - cudaError_t mmm; - cufftResult_t status; - - cufftDoubleComplex *fftwgrid; - fftwgrid = (cufftDoubleComplex*) malloc(sizeof(cufftDoubleComplex)*2*num_w_planes*yaxis*grid_size_x); - - - - // Plan creation - - cufftHandle plan; - status = cufftCreate(&plan); - if (status != CUFFT_SUCCESS) {printf("!!! cufftCreate ERROR %d !!!\n", status);} - - cudaStream_t stream{}; - cudaStreamCreate(&stream); - - - status = cufftMpAttachComm(plan, CUFFT_COMM_MPI, &comm); - if (status != CUFFT_SUCCESS) {printf("!!! cufftMpAttachComm ERROR %d !!!\n", status);} - - status = cufftSetStream(plan, stream); - if (status != CUFFT_SUCCESS) {printf("!!! cufftSetStream ERROR %d !!!\n", status);} - - size_t workspace; - status = cufftMakePlan2d(plan, grid_size_x, grid_size_y, CUFFT_Z2Z, &workspace); - if (status != CUFFT_SUCCESS) {printf("!!! cufftMakePlan2d ERROR %d !!!\n", status);} - cudaDeviceSynchronize(); - - - - uint fftwindex = 0; - uint fftwindex2D = 0; - double norm = 1.0/(double)(grid_size_x*grid_size_y); - - - - - // Grid composition - - for (int iw=0; iw