source: palm/trunk/SOURCE/cuda_fft_interfaces.f90 @ 1106

Last change on this file since 1106 was 1106, checked in by raasch, 11 years ago

New:
---

Porting of FFT-solver for serial runs to GPU using CUDA FFT,
preprocessor lines in transpose routines rearranged, so that routines can also
be used in serial (non-parallel) mode,
transpositions also carried out in serial mode, routines fftx, fftxp replaced
by calls of fft_x, fft_x replaced by fft_x_1d in the 1D-decomposition routines
(Makefile, Makefile_check, fft_xy, poisfft, poisfft_hybrid, transpose, new: cuda_fft_interfaces)

--stdin argument for mpiexec on lckyuh, -y and -Y settings output to header (mrun)

Changed:


Module array_kind renamed precision_kind
(check_open, data_output_3d, fft_xy, modules, user_data_output_3d)

some format changes for coupled atmosphere-ocean runs (header)
small changes in code formatting (microphysics, prognostic_equations)

Errors:


bugfix: default value (0) assigned to coupling_start_time (modules)
bugfix: initial time for preruns of coupled runs is output as -coupling_start_time (data_output_profiles)

  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1 MODULE cuda_fft_interfaces
2
3!--------------------------------------------------------------------------------!
4! This file is part of PALM.
5!
6! PALM is free software: you can redistribute it and/or modify it under the terms
7! of the GNU General Public License as published by the Free Software Foundation,
8! either version 3 of the License, or (at your option) any later version.
9!
10! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
11! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13!
14! You should have received a copy of the GNU General Public License along with
15! PALM. If not, see <http://www.gnu.org/licenses/>.
16!
17! Copyright 1997-2012  Leibniz University Hannover
18!--------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: cuda_fft_interfaces.f90 1106 2013-03-04 05:31:38Z raasch $
27!
28!
29! Description:
30! ------------
31! FORTRAN interfaces for the CUDA fft
32! Routines for the fft along x and y (forward/backward) using the CUDA fft
33!--------------------------------------------------------------------------------!
34
35#if defined ( __cuda_fft )
36
37    INTEGER :: CUFFT_FORWARD = -1,  &
38               CUFFT_INVERSE =  1,  &
39               CUFFT_R2C = Z'2a',   &    ! Real to Complex (interleaved)
40               CUFFT_C2R = Z'2c',   &    ! Complex (interleaved) to Real
41               CUFFT_C2C = Z'29',   &    ! Complex to Complex, interleaved
42               CUFFT_D2Z = Z'6a',   &    ! Double to Double-Complex
43               CUFFT_Z2D = Z'6c',   &    ! Double-Complex to Double
44               CUFFT_Z2Z = Z'69'         ! Double-Complex to Double-Complex
45
46    PUBLIC
47
48
49!
50!-- cufftPlan1d( cufftHandle *plan, int nx, cufftType type, int batch )
51    INTERFACE CUFFTPLAN1D
52
53       SUBROUTINE CUFFTPLAN1D( plan, nx, type, batch ) bind( C, name='cufftPlan1d' )
54
55          USE ISO_C_BINDING
56
57          INTEGER(C_INT) ::  plan
58          INTEGER(C_INT), value ::  batch, nx, type
59
60       END SUBROUTINE CUFFTPLAN1D
61
62    END INTERFACE CUFFTPLAN1D
63
64!
65!-- cufftDestroy( cufftHandle plan )  !!! remove later if not really needed !!!
66    INTERFACE CUFFTDESTROY
67
68       SUBROUTINE CUFFTDESTROY( plan ) bind( C, name='cufftDestroy' )
69
70          USE ISO_C_BINDING
71
72          INTEGER(C_INT), value ::  plan
73
74       END SUBROUTINE CUFFTDESTROY
75
76    END INTERFACE CUFFTDESTROY
77
78
79    INTERFACE CUFFTEXECZ2D
80
81       SUBROUTINE CUFFTEXECZ2D( plan, idata, odata ) bind( C, name='cufftExecZ2D' )
82
83          USE ISO_C_BINDING
84          USE precision_kind
85
86          INTEGER(C_INT), value ::  plan
87          COMPLEX(dpk), device  ::  idata(*)
88          REAL(dpk), device     ::  odata(*)
89
90       END SUBROUTINE CUFFTEXECZ2D
91
92    END INTERFACE CUFFTEXECZ2D
93
94
95    INTERFACE CUFFTEXECD2Z
96
97       SUBROUTINE CUFFTEXECD2Z( plan, idata, odata ) bind( C, name='cufftExecD2Z' )
98
99          USE ISO_C_BINDING
100          USE precision_kind
101
102          INTEGER(C_INT), value ::  plan
103          REAL(dpk), device     ::  idata(*)
104          COMPLEX(dpk), device  ::  odata(*)
105
106       END SUBROUTINE CUFFTEXECD2Z
107
108    END INTERFACE CUFFTEXECD2Z
109
110#endif
111 END MODULE cuda_fft_interfaces
Note: See TracBrowser for help on using the repository browser.