diff --git a/FFTlib/cc1fft.c b/FFTlib/cc1fft.c index d4658464b5aff9d2af055655c411293f4c768ab9..5367191b0f9c0a0ea49460e9ace61f63520ee321 100644 --- a/FFTlib/cc1fft.c +++ b/FFTlib/cc1fft.c @@ -1,4 +1,8 @@ #include "genfft.h" +#ifdef MKL +#include "mkl_dfti.h" +void dfti_status_print(MKL_LONG status); +#endif /** * NAME: cc1fft @@ -56,6 +60,10 @@ void cc1fft(complex *data, int n, int sign) static complex *work; REAL scl; complex *y; +#elif defined(MKL) + static DFTI_DESCRIPTOR_HANDLE handle=0; + static int nprev=0; + MKL_LONG Status; #endif #if defined(HAVE_LIBSCS) @@ -90,6 +98,28 @@ void cc1fft(complex *data, int n, int sign) nprev = n; } acmlcc1fft(sign, scl, inpl, n, data, 1, y, 1, work, &isys); +#elif defined(MKL) + if (n != nprev) { + DftiFreeDescriptor(&handle); + + Status = DftiCreateDescriptor(&handle, DFTI_SINGLE, DFTI_COMPLEX, 1, (MKL_LONG)n); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiCreateDescriptor FAIL\n"); + } + Status = DftiCommitDescriptor(handle); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiCommitDescriptor FAIL\n"); + } + nprev = n; + } + if (sign < 0) { + Status = DftiComputeBackward(handle, data); + } + else { + Status = DftiComputeForward(handle, data); + } #else cc1_fft(data, n, sign); #endif diff --git a/FFTlib/cc2dfft.c b/FFTlib/cc2dfft.c index d65fc26d6ca5a3d720c68df39cf28ad632b985dd..8ccd2775793d9f5e3c2d060a81994f6560bd8040 100644 --- a/FFTlib/cc2dfft.c +++ b/FFTlib/cc2dfft.c @@ -1,4 +1,8 @@ #include "genfft.h" +#ifdef MKL +#include "mkl_dfti.h" +void dfti_status_print(MKL_LONG status); +#endif /** * NAME: cc2dfft @@ -60,6 +64,10 @@ void cc2dfft(complex *data, int nx, int ny, int ldx, int sign) REAL scl; complex *y; complex *tmp; +#elif defined(MKL) + static DFTI_DESCRIPTOR_HANDLE handle=0; + static int nxprev=0, nyprev=0; + MKL_LONG Status, N[2]; #else int i, j; complex *tmp; @@ -110,6 +118,30 @@ void cc2dfft(complex *data, int nx, int ny, int ldx, int sign) else { cc1fft(data, nx, sign); } +#elif defined(MKL) + if (nx != nxprev || ny != nyprev) { + DftiFreeDescriptor(&handle); + + N[0] = nx; N[1] = ny; + Status = DftiCreateDescriptor(&handle, DFTI_SINGLE, DFTI_COMPLEX, 2, N); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiCreateDescriptor FAIL\n"); + } + Status = DftiCommitDescriptor(handle); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiCommitDescriptor FAIL\n"); + } + nxprev = nx; + nyprev = ny; + } + if (sign < 0) { + Status = DftiComputeBackward(handle, data); + } + else { + Status = DftiComputeForward(handle, data); + } #else if (ny != 1) { ccmfft(data, nx, ny, ldx, sign); diff --git a/FFTlib/ccmfft.c b/FFTlib/ccmfft.c index 9c8623506304cb4bb9bb02858e1bdf52adb2717a..b9f47f31afc5e54272d48f0a52fb97b031513223 100644 --- a/FFTlib/ccmfft.c +++ b/FFTlib/ccmfft.c @@ -1,4 +1,8 @@ #include "genfft.h" +#ifdef MKL +#include "mkl_dfti.h" +void dfti_status_print(MKL_LONG status); +#endif /** * NAME: ccmfft @@ -59,6 +63,10 @@ void ccmfft(complex *data, int n1, int n2, int ld1, int sign) static complex *work; REAL scl; complex *y; +#elif defined(MKL) + static DFTI_DESCRIPTOR_HANDLE handle=0; + static int nprev=0; + MKL_LONG Status; #endif #if defined(HAVE_LIBSCS) @@ -89,6 +97,32 @@ void ccmfft(complex *data, int n1, int n2, int ld1, int sign) nprev = n1; } acmlccmfft(sign, scl, inpl, n2, n1, data, 1, ld1, y, 1, ld1, work, &isys); +#elif defined(MKL) + if (n1 != nprev) { + DftiFreeDescriptor(&handle); + + Status = DftiCreateDescriptor(&handle, DFTI_SINGLE, DFTI_COMPLEX, 1, (MKL_LONG)n1); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiCreateDescriptor FAIL\n"); + } + Status = DftiCommitDescriptor(handle); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiCommitDescriptor FAIL\n"); + } + nprev = n1; + } + if (sign < 0) { + for (int j=0; j<n2; j++) { + Status = DftiComputeBackward(handle, &data[j*ld1]); + } + } + else { + for (int j=0; j<n2; j++) { + Status = DftiComputeForward(handle, &data[j*ld1]); + } + } #else ccm_fft(data, n1, n2, ld1, sign); #endif diff --git a/FFTlib/cr1fft.c b/FFTlib/cr1fft.c index 9aebffad8c00c1ff4d481005b5def42776edb5b8..2881d0019164b43ca4aafd03bd0e822e8c327b91 100644 --- a/FFTlib/cr1fft.c +++ b/FFTlib/cr1fft.c @@ -1,4 +1,8 @@ #include "genfft.h" +#ifdef MKL +#include "mkl_dfti.h" +void dfti_status_print(MKL_LONG status); +#endif /** * NAME: cr1fft @@ -52,10 +56,11 @@ void cr1fft(complex *cdata, REAL *rdata, int n, int sign) static int isys; static REAL *work, *table, scale=1.0; REAL scl; -#elif defined(FFTW3) - static int nprev=0; - int iopt, ier; - static float *work; +#elif defined(MKL) + static DFTI_DESCRIPTOR_HANDLE handle=0; + static int nprev=0; + REAL *tmp; + MKL_LONG Status; #endif #if defined(HAVE_LIBSCS) @@ -91,6 +96,46 @@ void cr1fft(complex *cdata, REAL *rdata, int n, int sign) nprev = n; } acmlcrfft(one, n, rdata, work, &isys); +#elif defined(MKL) + if (n != nprev) { + DftiFreeDescriptor(&handle); + + Status = DftiCreateDescriptor(&handle, DFTI_SINGLE, DFTI_REAL, 1, (MKL_LONG)n); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiCreateDescriptor FAIL\n"); + } + Status = DftiSetValue(handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiSetValue FAIL\n"); + } + + Status = DftiSetValue(handle, DFTI_CONJUGATE_EVEN_STORAGE, DFTI_COMPLEX_COMPLEX); + //This options is what we would like, but is depreciated in the future + //Status = DftiSetValue(handle, DFTI_CONJUGATE_EVEN_STORAGE, DFTI_COMPLEX_REAL); + if (! DftiErrorClass(Status, DFTI_NO_ERROR)) { + dfti_status_print(Status); + printf(" DftiSetValue FAIL\n"); + } + Status = DftiCommitDescriptor(handle); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiCommitDescriptor FAIL\n"); + } + nprev = n; + } + tmp = (float *)malloc(n*sizeof(float)); + Status = DftiComputeBackward(handle, (MKL_Complex8 *)cdata, tmp); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiComputeBackward FAIL\n"); + } + rdata[0] = tmp[0]; + for (int i=1; i<n; i++) { + rdata[i] = -sign*tmp[n-i]; + } + free(tmp); #else cr1_fft(cdata, rdata, n, sign); #endif diff --git a/FFTlib/crmfft.c b/FFTlib/crmfft.c index b1ca8904ca966a6d40ff29020e4b10d687ae103a..0e3242c7d3a1407ed3168c1edfbc170406daa488 100644 --- a/FFTlib/crmfft.c +++ b/FFTlib/crmfft.c @@ -1,5 +1,9 @@ #include "genfft.h" #include <string.h> +#ifdef MKL +#include "mkl_dfti.h" +void dfti_status_print(MKL_LONG status); +#endif /** * NAME: crmfft @@ -66,6 +70,11 @@ void crmfft(complex *cdata, REAL *rdata, int n1, int n2, int ldc, int ldr, int s static int isys; static REAL *work; REAL scl, *data; +#elif defined(MKL) + static DFTI_DESCRIPTOR_HANDLE handle=0; + static int nprev=0; + REAL *tmp; + MKL_LONG Status; #endif #if defined(HAVE_LIBSCS) @@ -127,6 +136,48 @@ void crmfft(complex *cdata, REAL *rdata, int n1, int n2, int ldc, int ldr, int s for (j=0; j<n2; j++) { memcpy(&rdata[j*ldr],&data[j*n1],n1*sizeof(REAL)); } +#elif defined(MKL) + if (n1 != nprev) { + DftiFreeDescriptor(&handle); + + Status = DftiCreateDescriptor(&handle, DFTI_SINGLE, DFTI_REAL, 1, (MKL_LONG)n1); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiCreateDescriptor FAIL\n"); + } + Status = DftiSetValue(handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiSetValue FAIL\n"); + } + + Status = DftiSetValue(handle, DFTI_CONJUGATE_EVEN_STORAGE, DFTI_COMPLEX_COMPLEX); + //This options is what we would like, but is depreciated in the future + //Status = DftiSetValue(handle, DFTI_CONJUGATE_EVEN_STORAGE, DFTI_COMPLEX_REAL); + if (! DftiErrorClass(Status, DFTI_NO_ERROR)) { + dfti_status_print(Status); + printf(" DftiSetValue FAIL\n"); + } + Status = DftiCommitDescriptor(handle); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiCommitDescriptor FAIL\n"); + } + nprev = n1; + } + tmp = (float *)malloc(n1*sizeof(float)); + for (int j=0; j<n2; j++) { + Status = DftiComputeBackward(handle, (MKL_Complex8 *)&cdata[j*ldc], tmp); + rdata[j*ldr] = tmp[0]; + for (int i=1; i<n1; i++) { + rdata[j*ldr+i] = -sign*tmp[n1-i]; + } + } + free(tmp); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiComputeBackward FAIL\n"); + } #else crm_fft(cdata, rdata, n1, n2, ldc, ldr, sign); #endif diff --git a/FFTlib/rc1fft.c b/FFTlib/rc1fft.c index efddc3a73b32cec99cd76214f0502a539e30d89e..77cae6af41919fdbce3a08a7134b2d266c85fe4b 100644 --- a/FFTlib/rc1fft.c +++ b/FFTlib/rc1fft.c @@ -1,5 +1,9 @@ #include "genfft.h" #include <string.h> +#ifdef MKL +#include "mkl_dfti.h" +void dfti_status_print(MKL_LONG status); +#endif /** * NAME: rc1fft @@ -52,6 +56,10 @@ void rc1fft(REAL *rdata, complex *cdata, int n, int sign) static int isys; static REAL *work, *table, scale=1.0; REAL scl, *data; +#elif defined(MKL) + static DFTI_DESCRIPTOR_HANDLE handle=0; + static int nprev=0; + MKL_LONG Status; #endif #if defined(HAVE_LIBSCS) @@ -92,6 +100,42 @@ void rc1fft(REAL *rdata, complex *cdata, int n, int sign) } cdata[n/2].i=0.0; free(data); +#elif defined(MKL) + if (n != nprev) { + DftiFreeDescriptor(&handle); + + Status = DftiCreateDescriptor(&handle, DFTI_SINGLE, DFTI_REAL, 1, (MKL_LONG)n); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiCreateDescriptor FAIL\n"); + } + Status = DftiSetValue(handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiSetValue FAIL\n"); + } + + Status = DftiSetValue(handle, DFTI_CONJUGATE_EVEN_STORAGE, DFTI_COMPLEX_COMPLEX); + if (! DftiErrorClass(Status, DFTI_NO_ERROR)) { + dfti_status_print(Status); + printf(" DftiSetValue FAIL\n"); + } + Status = DftiCommitDescriptor(handle); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiCommitDescriptor FAIL\n"); + } + nprev = n; + } + Status = DftiComputeForward(handle, rdata, (MKL_Complex8 *)cdata); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiComputeForward FAIL\n"); + } + for (int i=1; i<((n-1)/2)+1; i++) { + cdata[i].i *= -sign; + } + #else rc1_fft(rdata, cdata, n, sign); #endif @@ -99,6 +143,18 @@ void rc1fft(REAL *rdata, complex *cdata, int n, int sign) return; } +#ifdef MKL +void dfti_status_print(MKL_LONG status) +{ + MKL_LONG class_error; + char* error_message; + + error_message = DftiErrorMessage(status); + printf("error_message = %s \n", error_message); + return; +} +#endif + /****************** NO COMPLEX DEFINED ******************/ diff --git a/FFTlib/rcmfft.c b/FFTlib/rcmfft.c index e336eb722736d0e5f9dafd4e2ccf2fc092633b8a..c2d25247ff0b638566c3965bfeda42f87e16437d 100644 --- a/FFTlib/rcmfft.c +++ b/FFTlib/rcmfft.c @@ -1,5 +1,9 @@ #include "genfft.h" #include <string.h> +#ifdef MKL +#include "mkl_dfti.h" +void dfti_status_print(MKL_LONG status); +#endif /** * NAME: rcmfft @@ -64,6 +68,10 @@ void rcmfft(REAL *rdata, complex *cdata, int n1, int n2, int ldr, int ldc, int s static int isys; static REAL *work; REAL scl, *data; +#elif defined(MKL) + static DFTI_DESCRIPTOR_HANDLE handle=0; + static int nprev=0; + MKL_LONG Status; #endif #if defined(HAVE_LIBSCS) @@ -120,6 +128,44 @@ void rcmfft(REAL *rdata, complex *cdata, int n1, int n2, int ldr, int ldc, int s cdata[j*ldc+n1/2].i=0.0; } free(data); +#elif defined(MKL) + if (n1 != nprev) { + DftiFreeDescriptor(&handle); + + Status = DftiCreateDescriptor(&handle, DFTI_SINGLE, DFTI_REAL, 1, (MKL_LONG)n1); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiCreateDescriptor FAIL\n"); + } + Status = DftiSetValue(handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiSetValue FAIL\n"); + } + + Status = DftiSetValue(handle, DFTI_CONJUGATE_EVEN_STORAGE, DFTI_COMPLEX_COMPLEX); + if (! DftiErrorClass(Status, DFTI_NO_ERROR)) { + dfti_status_print(Status); + printf(" DftiSetValue FAIL\n"); + } + Status = DftiCommitDescriptor(handle); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiCommitDescriptor FAIL\n"); + } + nprev = n1; + } + Status = DftiComputeForward(handle, rdata, (MKL_Complex8 *)cdata); + if(! DftiErrorClass(Status, DFTI_NO_ERROR)){ + dfti_status_print(Status); + printf(" DftiComputeForward FAIL\n"); + } + for (int j=0; j<n2; j++) { + Status = DftiComputeForward(handle, &rdata[j*ldr], (MKL_Complex8 *)&cdata[j*ldc]); + for (int i=1; i<((n1-1)/2)+1; i++) { + cdata[j*ldc+i].i *= -sign; + } + } #else rcm_fft(rdata, cdata, n1, n2, ldr, ldc, sign); #endif diff --git a/FFTlib/test/Makefile b/FFTlib/test/Makefile index dc1c31fda3b99b480debd4fa1b7696d8ca7051cd..bfca6f33111dea66fa64634c1a28aeff482ca5a4 100644 --- a/FFTlib/test/Makefile +++ b/FFTlib/test/Makefile @@ -2,7 +2,7 @@ include ../../Make_include -LIBS += -L$L -lgenfft -lm +LIBS += -L$L -lgenfft $(FFT) -lm ALL: cc1test cc2dtest ccmtest rc1test rc2dtest rcmtest rc1loop cc1loop diff --git a/FFTlib/test/cc1loop.c b/FFTlib/test/cc1loop.c index f076afdd7da22470a39d2aed3fca3d4f728ec71c..040fa70375df1e2872911ebec4ca4bc0f74bb521 100644 --- a/FFTlib/test/cc1loop.c +++ b/FFTlib/test/cc1loop.c @@ -1,8 +1,7 @@ #include <genfft.h> #include <time.h> -#include <kiss_fft.h> -main () { +int main () { int j,i,n,sign, isign; int N, Nmax=600, Nitcc; @@ -65,5 +64,6 @@ main () { N += 1; } + return 0; } diff --git a/FFTlib/test/cc1test.c b/FFTlib/test/cc1test.c index 346f112b290af05771b8571dd94ba1e372e79282..8e076508dd5efa0d8c31245151854c01e6618725 100644 --- a/FFTlib/test/cc1test.c +++ b/FFTlib/test/cc1test.c @@ -1,7 +1,7 @@ #include <genfft.h> #include <time.h> -main () { +int main () { int j,i,n,sign, isign; int N, Nmax=8192, Nitcc; @@ -79,5 +79,6 @@ main () { k += 1.0; } + return 0; } diff --git a/FFTlib/test/cc2dtest.c b/FFTlib/test/cc2dtest.c index 157a0674f20670d6db71a5de648448a3b2419fbd..f714d32c5cb2405df8b18c7803efe061df28a5c7 100644 --- a/FFTlib/test/cc2dtest.c +++ b/FFTlib/test/cc2dtest.c @@ -1,7 +1,7 @@ #include <genfft.h> #include <time.h> -main () { +int main () { int j,i,n,sign, isign; int N, Nmax=1024, Nitcc, Nlot=1024, ld1; @@ -142,5 +142,6 @@ main () { Nlot *= 2; } + return 0; } diff --git a/FFTlib/test/ccmtest.c b/FFTlib/test/ccmtest.c index 39b10059f8101012a1d2e4d21f6c1345ff0acc69..5ea472e4e3d1381b0e290ed8fc148630c742a3cd 100644 --- a/FFTlib/test/ccmtest.c +++ b/FFTlib/test/ccmtest.c @@ -1,7 +1,7 @@ #include <genfft.h> #include <time.h> -main () { +int main () { int j,i,n,sign, isign; int N, Nmax=4097, Nitcc, Nlot=513, ld1; @@ -128,5 +128,6 @@ main () { k += 1.0; } + return 0; } diff --git a/FFTlib/test/rc1loop.c b/FFTlib/test/rc1loop.c index a2209a191b919c8ae75b6dd590ebaab53ba09573..9018e0c46a55af8c89088883673880849f3f9b84 100644 --- a/FFTlib/test/rc1loop.c +++ b/FFTlib/test/rc1loop.c @@ -5,7 +5,7 @@ void crdft(complex *cdata, REAL *rdata, int n, int sign); void rcdft(REAL *rdata, complex *cdata, int n, int sign); -main () { +int main () { int j,i,n,k,sign, isign; int N, Nmax=600, Nitcc; @@ -94,5 +94,6 @@ main () { N += 1; } + return 0; } diff --git a/FFTlib/test/rc1test.c b/FFTlib/test/rc1test.c index c375793c6f6fc181e27414338dd5e13e530c66a4..b5c4999c2fda78c2dd4308781969e6f110ac110a 100644 --- a/FFTlib/test/rc1test.c +++ b/FFTlib/test/rc1test.c @@ -1,7 +1,7 @@ #include <genfft.h> #include <time.h> -main () { +int main () { int j,i,n,sign, isign; int N, Nmax=8192, Nitcc; @@ -37,12 +37,28 @@ main () { // c_data[0] = 1.0; t = 0.0; +/* +N=16; + scl = 1.0/(float)N; + for (j=0;j<N;j++) data[j] = c_data[j]; + rc1fft(data, cdata, N, sign); + cr1fft(cdata, data, N, isign); + for (i=0; i<N; i++) + fprintf(stderr,"%s: i = %d data = %f Ref-data = %f Complex=%f,%f\n", machine, i, data[i]*scl, c_data[i],cdata[i/2].r,cdata[i/2].i); + for (j=0;j<N;j++) data[j] = c_data[j]; + rc1_fft(data, cdata, N, sign); + cr1_fft(cdata, data, N, isign); + for (i=0; i<N; i++) + fprintf(stderr,"%s: i = %d data = %f Ref-data = %f Complex=%f,%f\n", machine, i, data[i]*scl, c_data[i],cdata[i/2].r,cdata[i/2].i); + return; +*/ /* FFT */ for (i=0; i<2500; i++) { for (j=0;j<N;j++) data[j] = c_data[j]; t0 = wallclock_time(); rc1fft(data, cdata, N, sign); cr1fft(cdata, data, N, isign); +// cr1_fft(cdata, data, N, isign); t1 = wallclock_time(); t += t1-t0; } @@ -51,9 +67,9 @@ main () { scl = 1.0/(float)N; for (i=0; i<N; i++) { /* - fprintf(stderr,"%s: i = %d data = %f C-data = %f\n", machine, i, data[i].r*scl, c_data[i].r); - fprintf(stderr,"%s: i = %d data = %f C-data = %f\n", machine, i, data[i].i*scl, c_data[i].i); + fprintf(stderr,"%s: i = %d data = %f Ref-data = %f Complex=%f,%f\n", machine, i, data[i]*scl, c_data[i],cdata[i/2].r,cdata[i/2].i); */ + if (c_data[i] != 0.0) { diff = fabs((data[i]*scl - c_data[i]) / c_data[i]); } @@ -77,5 +93,6 @@ main () { k += 1.0; } + return 0; } diff --git a/FFTlib/test/rc2dtest.c b/FFTlib/test/rc2dtest.c index e9965f34611a098d5593f70c3182f1675bf6106e..685b8071a78e7e190c8eca6736aae23bd8dff89d 100644 --- a/FFTlib/test/rc2dtest.c +++ b/FFTlib/test/rc2dtest.c @@ -1,7 +1,7 @@ #include <genfft.h> #include <time.h> -main () { +int main () { int l,j,i,n,sign, isign, ldr, ldc; int N, Nmax=2048, Nlot=150, Nitcc; @@ -141,6 +141,6 @@ main () { Nlot *= 2; } - + return 0; } diff --git a/FFTlib/test/rcmtest.c b/FFTlib/test/rcmtest.c index f8ef83dc5c14cf8493b30bd360c5d20f72c7eb4a..9602ceb8acf0db0f1d024a5301afeb21549dffb1 100644 --- a/FFTlib/test/rcmtest.c +++ b/FFTlib/test/rcmtest.c @@ -1,7 +1,7 @@ #include <genfft.h> #include <time.h> -main () { +int main () { int l,j,i,n,sign, isign, ldr, ldc; int N, Nmax=8193, Nlot=150, Nitcc; @@ -82,5 +82,6 @@ main () { k += 1.0; } + return 0; }