26 use,
intrinsic :: iso_c_binding
27 use,
intrinsic :: ieee_arithmetic
34 use,
intrinsic :: iso_fortran_env
44#if defined(HAVE_OPENMP) && defined(HAVE_FFTW3_THREADS)
79 integer,
public,
parameter :: &
84 integer,
public,
parameter :: &
92 integer,
parameter :: &
100 integer,
public ::
type
101 integer,
public :: library
103 type(MPI_Comm) :: comm
104 integer :: rs_n_global(3)
105 integer :: fs_n_global(3)
108 integer :: rs_istart(1:3)
109 integer :: fs_istart(1:3)
111 integer,
public :: stride_rs(1:3)
112 integer,
public :: stride_fs(1:3)
121 real(real64),
pointer,
public :: drs_data(:,:,:)
122 complex(real64),
pointer,
public :: zrs_data(:,:,:)
123 complex(real64),
pointer,
public :: fs_data(:,:,:)
124 type(c_ptr) :: cuda_plan_fw
125 type(c_ptr) :: cuda_plan_bw
127 type(nfft_t),
public :: nfft
129 type(pnfft_t),
public :: pnfft
131 logical,
public :: aligned_memory
150 logical,
save,
public :: fft_initialized = .false.
151 integer,
save :: fft_refs(FFT_MAX)
152 type(fft_t),
save :: fft_array(FFT_MAX)
153 logical :: fft_optimize
154 integer,
save :: fft_prepare_plan
155 integer,
public :: fft_default_lib = -1
157 type(nfft_t),
save :: nfft_options
159 type(pnfft_t),
save :: pnfft_options
161 integer,
parameter :: &
162 CUFFT_R2C = int(z
'2a'), &
176 integer :: ii, fft_default
177#if defined(HAVE_OPENMP) && defined(HAVE_FFTW3_THREADS)
183 fft_initialized = .
true.
239 call parse_variable(namespace,
'FFTPreparePlan', fftw_estimate, fft_prepare_plan)
262 call parse_variable(namespace,
'FFTLibrary', fft_default, fft_default_lib)
265#if ! defined(HAVE_CUDA)
266 call messages_write(
'You have selected the Accelerated FFT, but Octopus was compiled', new_line = .
true.)
271 call messages_write(
'You have selected the accelerated FFT, but acceleration is disabled.')
276#if defined(HAVE_OPENMP) && defined(HAVE_FFTW3_THREADS)
277 if (omp_get_max_threads() > 1)
then
282 iret = fftw_init_threads()
287 call fftw_plan_with_nthreads(omp_get_max_threads())
317#if defined(HAVE_OPENMP) && defined(HAVE_FFTW3_THREADS)
318 call fftw_cleanup_threads()
323 fft_initialized = .false.
329 subroutine fft_init(this, nn, dim, type, library, optimize, optimize_parity, comm, mpi_grp, use_aligned)
330 type(
fft_t),
intent(inout) :: this
331 integer,
intent(inout) :: nn(3)
332 integer,
intent(in) :: dim
333 integer,
intent(in) ::
type
334 integer,
intent(in) :: library
336 integer,
intent(in) :: optimize_parity(3)
338 type(mpi_comm),
optional,
intent(out) :: comm
339 type(
mpi_grp_t),
optional,
intent(in) :: mpi_grp
340 logical,
optional :: use_aligned
342 integer :: ii, jj, fft_dim, idir, column_size, row_size, n3
343 integer :: n_1, n_2, n_3, nn_temp(3)
346 integer(int64) :: number_points, alloc_size
354 assert(fft_initialized)
359 if (
present(mpi_grp)) mpi_grp_ = mpi_grp
366 if (nn(ii) <= 1)
exit
367 fft_dim = fft_dim + 1
370 if (fft_dim == 0)
then
371 message(1) =
"Internal error in fft_init: apparently, a 1x1x1 FFT is required."
378 nn_temp(1:fft_dim) = nn(1:fft_dim)
380 select case (library_)
383 if(any(optimize_parity(1:fft_dim) > 1))
then
384 message(1) =
"Internal error in fft_init: optimize_parity must be negative, 0, or 1."
389 nn_temp(ii) =
fft_size(nn(ii), (/2, 3, 5, 7/), optimize_parity(ii))
390 if (fft_optimize .and.
optimize(ii)) nn(ii) = nn_temp(ii)
398 if (int(nn(ii)/2)*2 /= nn(ii) .and. (fft_optimize .and.
optimize(ii)))&
406 if (int(nn(ii)/2)*2 /= nn(ii)) nn(ii) = nn(ii) + 1
409 if (fft_dim < 3)
then
415 if (fft_dim < 3 .and. library_ ==
fftlib_pfft)
then
420 if (any(optimize_parity(1:fft_dim) > 1))
then
421 message(1) =
"Internal error in fft_init: optimize_parity must be negative, 0, or 1."
427 if (fft_optimize .and.
optimize(ii)) nn(ii) = nn_temp(ii)
434 do ii = fft_max, 1, -1
436 if (all(nn(1:dim) == fft_array(ii)%rs_n_global(1:dim)) .and.
type == fft_array(ii)%type &
437 .and. library_ == fft_array(ii)%library .and. library_ /=
fftlib_nfft &
439 .and. this%aligned_memory .eqv. fft_array(ii)%aligned_memory)
then
444 fft_refs(ii) = fft_refs(ii) + 1
445 if (
present(comm)) comm = fft_array(ii)%comm
455 message(1) =
"Not enough slots for FFTs."
456 message(2) =
"Please increase FFT_MAX in fft.F90 and recompile."
462 fft_array(jj)%slot = jj
463 fft_array(jj)%type =
type
464 fft_array(jj)%library = library_
465 fft_array(jj)%rs_n_global(1:dim) = nn(1:dim)
466 fft_array(jj)%rs_n_global(dim+1:) = 1
467 nullify(fft_array(jj)%drs_data)
468 nullify(fft_array(jj)%zrs_data)
469 nullify(fft_array(jj)%fs_data)
471 fft_array(jj)%aligned_memory = this%aligned_memory
474 select case (library_)
481 ierror = pfft_create_procmesh_2d(mpi_grp_%comm%MPI_VAL, column_size, row_size, fft_array(jj)%comm%MPI_VAL)
483 if (ierror /= 0)
then
484 message(1) =
"The number of rows and columns in PFFT processor grid is not equal to "
485 message(2) =
"the number of processor in the MPI communicator."
486 message(3) =
"Please check it."
500 if (
present(comm)) comm = fft_array(jj)%comm
503 select case (library_)
506 fft_array(jj)%rs_n = fft_array(jj)%rs_n_global
507 fft_array(jj)%fs_n = fft_array(jj)%fs_n_global
508 fft_array(jj)%rs_istart = 1
509 fft_array(jj)%fs_istart = 1
511 if (this%aligned_memory)
then
513 fft_array(jj)%drs_data, fft_array(jj)%zrs_data, fft_array(jj)%fs_data)
519 alloc_size, fft_array(jj)%fs_n_global, fft_array(jj)%rs_n, &
520 fft_array(jj)%fs_n, fft_array(jj)%rs_istart, fft_array(jj)%fs_istart)
533 n_1 = max(1, fft_array(jj)%rs_n(1))
534 n_2 = max(1, fft_array(jj)%rs_n(2))
535 n_3 = max(1, fft_array(jj)%rs_n(3))
537 n3 = ceiling(real(2*alloc_size)/real(n_1*n_2))
538 safe_allocate(fft_array(jj)%drs_data(1:n_1, 1:n_2, 1:n3))
540 n3 = ceiling(real(alloc_size)/real(fft_array(jj)%rs_n(1)*fft_array(jj)%rs_n(2)))
541 safe_allocate(fft_array(jj)%zrs_data(1:fft_array(jj)%rs_n(1), 1:fft_array(jj)%rs_n(2), 1:n3))
544 n_1 = max(1, fft_array(jj)%fs_n(1))
545 n_2 = max(1, fft_array(jj)%fs_n(2))
546 n_3 = max(1, fft_array(jj)%fs_n(3))
548 n3 = ceiling(real(alloc_size)/real(n_3*n_1))
549 safe_allocate(fft_array(jj)%fs_data(1:n_3, 1:n_1, 1:n3))
553 fft_array(jj)%rs_n = fft_array(jj)%rs_n_global
554 fft_array(jj)%fs_n = fft_array(jj)%fs_n_global
555 fft_array(jj)%rs_istart = 1
556 fft_array(jj)%fs_istart = 1
559 fft_array(jj)%fs_n_global = fft_array(jj)%rs_n_global
560 fft_array(jj)%rs_n = fft_array(jj)%rs_n_global
561 fft_array(jj)%fs_n = fft_array(jj)%fs_n_global
562 fft_array(jj)%rs_istart = 1
563 fft_array(jj)%fs_istart = 1
566 fft_array(jj)%fs_n_global = fft_array(jj)%rs_n_global
567 fft_array(jj)%rs_n = fft_array(jj)%rs_n_global
568 fft_array(jj)%fs_n = fft_array(jj)%fs_n_global
569 fft_array(jj)%rs_istart = 1
570 fft_array(jj)%fs_istart = 1
577 select case (library_)
579 if (.not. this%aligned_memory)
then
580 call fftw_prepare_plan(fft_array(jj)%planf, fft_dim, fft_array(jj)%rs_n_global, &
581 type ==
fft_real, fftw_forward, fft_prepare_plan+fftw_unaligned)
582 call fftw_prepare_plan(fft_array(jj)%planb, fft_dim, fft_array(jj)%rs_n_global, &
583 type ==
fft_real, fftw_backward, fft_prepare_plan+fftw_unaligned)
586 call fftw_prepare_plan(fft_array(jj)%planf, fft_dim, fft_array(jj)%rs_n_global, &
587 type ==
fft_real, fftw_forward, fft_prepare_plan, &
588 din_=fft_array(jj)%drs_data, cout_=fft_array(jj)%fs_data)
589 call fftw_prepare_plan(fft_array(jj)%planb, fft_dim, fft_array(jj)%rs_n_global, &
590 type ==
fft_real, fftw_backward, fft_prepare_plan, &
591 din_=fft_array(jj)%drs_data, cout_=fft_array(jj)%fs_data)
593 call fftw_prepare_plan(fft_array(jj)%planf, fft_dim, fft_array(jj)%rs_n_global, &
594 type ==
fft_real, fftw_forward, fft_prepare_plan, &
595 cin_=fft_array(jj)%zrs_data, cout_=fft_array(jj)%fs_data)
596 call fftw_prepare_plan(fft_array(jj)%planb, fft_dim, fft_array(jj)%rs_n_global, &
597 type ==
fft_real, fftw_backward, fft_prepare_plan, &
598 cin_=fft_array(jj)%zrs_data, cout_=fft_array(jj)%fs_data)
605 call nfft_init(fft_array(jj)%nfft, nfft_options, fft_array(jj)%rs_n_global, &
612 fft_array(jj)%fs_data, fftw_forward, fft_prepare_plan, comm%MPI_VAL)
614 fft_array(jj)%drs_data, fftw_backward, fft_prepare_plan, comm%MPI_VAL)
617 fft_array(jj)%fs_data, fftw_forward, fft_prepare_plan, comm%MPI_VAL)
619 fft_array(jj)%zrs_data, fftw_backward, fft_prepare_plan, comm%MPI_VAL)
641 call pnfft_init_plan(fft_array(jj)%pnfft, pnfft_options, comm, fft_array(jj)%fs_n_global, &
642 fft_array(jj)%fs_n, fft_array(jj)%fs_istart, fft_array(jj)%rs_n, fft_array(jj)%rs_istart)
646 fft_array(jj)%stride_rs(1) = 1
647 fft_array(jj)%stride_fs(1) = 1
649 fft_array(jj)%stride_rs(ii) = fft_array(jj)%stride_rs(ii - 1)*fft_array(jj)%rs_n(ii - 1)
650 fft_array(jj)%stride_fs(ii) = fft_array(jj)%stride_fs(ii - 1)*fft_array(jj)%fs_n(ii - 1)
655 call cuda_fft_plan3d(fft_array(jj)%cuda_plan_fw, &
656 fft_array(jj)%rs_n_global(3), fft_array(jj)%rs_n_global(2), fft_array(jj)%rs_n_global(1),
cufft_d2z, &
658 call cuda_fft_plan3d(fft_array(jj)%cuda_plan_bw, &
659 fft_array(jj)%rs_n_global(3), fft_array(jj)%rs_n_global(2), fft_array(jj)%rs_n_global(1),
cufft_z2d, &
662 call cuda_fft_plan3d(fft_array(jj)%cuda_plan_fw, &
663 fft_array(jj)%rs_n_global(3), fft_array(jj)%rs_n_global(2), fft_array(jj)%rs_n_global(1),
cufft_z2z, &
665 call cuda_fft_plan3d(fft_array(jj)%cuda_plan_bw, &
666 fft_array(jj)%rs_n_global(3), fft_array(jj)%rs_n_global(2), fft_array(jj)%rs_n_global(1),
cufft_z2z, &
686 number_points = number_points * fft_array(jj)%rs_n_global(idir)
695 if (any(nn(1:fft_dim) /= nn_temp(1:fft_dim)))
then
697 call messages_write(
' Inefficient FFT grid. A better grid would be: ')
705 select case (library_)
707 write(
message(1),
'(a)')
"Info: FFT library = PFFT"
708 write(
message(2),
'(a)')
"Info: PFFT processor grid"
709 write(
message(3),
'(a, i9)')
" No. of processors = ", mpi_grp_%size
710 write(
message(4),
'(a, i9)')
" No. of columns in the proc. grid = ", column_size
711 write(
message(5),
'(a, i9)')
" No. of rows in the proc. grid = ", row_size
712 write(
message(6),
'(a, i9)')
" The size of integer is = ", c_intptr_t
737 type(
fft_t),
intent(inout) :: this
741 real(real64),
intent(in) :: xx(:,:)
742 integer,
optional,
intent(in) :: nn(:)
748 assert(
size(xx,2) == 3)
751 select case (fft_array(slot)%library)
758 xx(1:nn(1),1), xx(1:nn(2),2), xx(1:nn(3),3))
779 type(
fft_t),
intent(inout) :: this
787 message(1) =
"Trying to deallocate FFT that has not been allocated."
790 if (fft_refs(ii) > 1)
then
791 fft_refs(ii) = fft_refs(ii) - 1
793 select case (fft_array(ii)%library)
795 call fftw_destroy_plan(fft_array(ii)%planf)
796 call fftw_destroy_plan(fft_array(ii)%planb)
798 if (this%aligned_memory)
then
800 fft_array(ii)%drs_data, fft_array(ii)%zrs_data, fft_array(ii)%fs_data)
805 call pfft_destroy_plan(fft_array(ii)%planf)
806 call pfft_destroy_plan(fft_array(ii)%planb)
808 safe_deallocate_p(fft_array(ii)%drs_data)
809 safe_deallocate_p(fft_array(ii)%zrs_data)
810 safe_deallocate_p(fft_array(ii)%fs_data)
814 call cuda_fft_destroy(fft_array(ii)%cuda_plan_fw)
815 call cuda_fft_destroy(fft_array(ii)%cuda_plan_bw)
837 type(
fft_t),
intent(in) :: fft_i
838 type(
fft_t),
intent(inout) :: fft_o
842 if (fft_o%slot > 0)
then
845 assert(fft_i%slot >= 1.and.fft_i%slot <= fft_max)
846 assert(fft_refs(fft_i%slot) > 0)
849 fft_refs(fft_i%slot) = fft_refs(fft_i%slot) + 1
855 subroutine fft_get_dims(fft, rs_n_global, fs_n_global, rs_n, fs_n, rs_istart, fs_istart)
856 type(
fft_t),
intent(in) :: fft
857 integer,
intent(out) :: rs_n_global(1:3)
858 integer,
intent(out) :: fs_n_global(1:3)
859 integer,
intent(out) :: rs_n(1:3)
860 integer,
intent(out) :: fs_n(1:3)
861 integer,
intent(out) :: rs_istart(1:3)
862 integer,
intent(out) :: fs_istart(1:3)
869 rs_n_global(1:3) = fft_array(slot)%rs_n_global(1:3)
870 fs_n_global(1:3) = fft_array(slot)%fs_n_global(1:3)
871 rs_n(1:3) = fft_array(slot)%rs_n(1:3)
872 fs_n(1:3) = fft_array(slot)%fs_n(1:3)
873 rs_istart(1:3) = fft_array(slot)%rs_istart(1:3)
874 fs_istart(1:3) = fft_array(slot)%fs_istart(1:3)
881 pure function pad_feq(ii, nn, mode)
882 integer,
intent(in) :: ii,nn
883 logical,
intent(in) ::
mode
889 if (ii <= nn/2 + 1)
then
906 integer function fft_size(size, factors, parity)
907 integer,
intent(in) :: size
908 integer,
intent(in) :: factors(:)
909 integer,
intent(in) :: parity
913 integer,
allocatable :: exponents(:)
917 nfactors = ubound(factors, dim = 1)
919 safe_allocate(exponents(1:nfactors))
924 if (nondiv == 1 .and. mod(
fft_size, 2) == parity)
exit
928 safe_deallocate_a(exponents)
935 subroutine get_exponents(num, nfactors, factors, exponents, nondiv)
936 integer,
intent(in) :: num
937 integer,
intent(in) :: nfactors
938 integer,
intent(in) :: factors(:)
939 integer,
intent(out) :: exponents(:)
940 integer,
intent(out) :: nondiv
947 do ifactor = 1, nfactors
948 exponents(ifactor) = 0
950 if (mod(nondiv, factors(ifactor)) /= 0)
exit
951 nondiv = nondiv/factors(ifactor)
952 exponents(ifactor) = exponents(ifactor) + 1
963 type(
fft_t),
intent(in) :: fft
965 real(real64) :: fullsize
969 fullsize = product(real(fft%fs_n(1:3), real64))
977 integer,
intent(in) :: gg_in(:)
978 real(real64),
intent(in) :: temp(:)
979 integer,
intent(in) :: periodic_dim
981 real(real64),
intent(in) :: qq(:)
982 real(real64),
intent(inout) :: gg(:)
983 real(real64),
intent(out) :: modg2
988 gg(1:periodic_dim) = gg(1:periodic_dim) + qq(1:periodic_dim)
989 gg(1:3) = gg(1:3) * temp(1:3)
990 gg(1:3) = matmul(latt%klattice_primitive(1:3,1:3),gg(1:3))
991 modg2 = sum(gg(1:3)**2)
1000 type(
fft_t),
intent(in) :: fft
1003 scaling_factor =
m_one
1005 select case (fft_array(fft%slot)%library)
1008 scaling_factor =
m_one/real(fft_array(fft%slot)%rs_n_global(1), real64)
1009 scaling_factor = scaling_factor/real(fft_array(fft%slot)%rs_n_global(2), real64)
1010 scaling_factor = scaling_factor/real(fft_array(fft%slot)%rs_n_global(3), real64)
1021 real(real64) function
fft_get_ecut_from_box(box_dim, fs_istart, latt, gspacing, periodic_dim, qq) result(ecut)
1022 integer,
intent(in) :: box_dim(:)
1023 integer,
intent(in) :: fs_istart(:)
1025 real(real64),
intent(in) :: gspacing(:)
1026 integer,
intent(in) :: periodic_dim
1027 real(real64),
intent(in) :: qq(:)
1029 integer :: lx, ix, iy, iz, idir, idir2, idir3
1030 real(real64) :: dminsq, gg(3), modg2
1031 integer :: box_dim_(3), ixx(3)
1032 integer :: ming(3), maxg(3)
1036 assert(periodic_dim > 0)
1038 box_dim_(1:periodic_dim) = box_dim(1:periodic_dim)
1039 if (periodic_dim < 3) box_dim_(periodic_dim+1:3) = 1
1044 do idir = 1, periodic_dim
1045 do lx = 1, box_dim(idir)
1046 ix = fs_istart(idir) + lx - 1
1048 ming(idir) = min(ming(idir), ixx(idir))
1049 maxg(idir) = max(maxg(idir), ixx(idir))
1051 maxg(idir) = min(abs(ming(idir)), maxg(idir))
1056 do idir = 1, periodic_dim
1057 idir2 = mod(idir, 3)+1
1058 idir3 = mod(idir+1, 3)+1
1061 ixx(idir) = -maxg(idir)
1062 do iy = -maxg(idir2), maxg(idir2)
1064 do iz = -maxg(idir3), maxg(idir3)
1067 dminsq = min(dminsq, sum(gg(1:periodic_dim)**2))
1071 ixx(idir) = maxg(idir)
1072 do iy = -maxg(idir2), maxg(idir2)
1074 do iz = -maxg(idir3), maxg(idir3)
1077 dminsq = min(dminsq, sum(gg(1:periodic_dim)**2))
1088#include "fft_inc.F90"
1091#include "complex.F90"
1092#include "fft_inc.F90"
if write to the Free Software Franklin Fifth USA !If the compiler accepts long Fortran it is better to use that and build all the preprocessor definitions in one line In !this the debuggers will provide the right line numbers !If the compiler accepts line number then CARDINAL and ACARDINAL !will put them just a new line or a ampersand plus a new line !These macros should be used in macros that span several lines They should by !put immedialty before a line where a compilation error might occur and at the !end of the macro !Note that the cardinal and newline words are substituted by the program !preprocess pl by the ampersand and by a real new line just before compilation !The assertions are ignored if the code is compiled in not debug mode(NDEBUG ! is defined). Otherwise it is merely a logical assertion that
double log(double __x) __attribute__((__nothrow__
pure logical function, public accel_is_enabled()
type(accel_t), public accel
Fast Fourier Transform module. This module provides a single interface that works with different FFT ...
subroutine zfft_forward_accel(fft, in, out)
subroutine dfft_backward_1d(fft, in, out)
integer, parameter cufft_z2d
subroutine get_exponents(num, nfactors, factors, exponents, nondiv)
subroutine, public fft_init(this, nn, dim, type, library, optimize, optimize_parity, comm, mpi_grp, use_aligned)
subroutine, public fft_all_init(namespace)
initialize the table
real(real64) function, public fft_get_ecut_from_box(box_dim, fs_istart, latt, gspacing, periodic_dim, qq)
Given an fft box (fixed by the real-space grid), it returns the cutoff energy of the sphere that fits...
subroutine dfft_forward_3d(fft, in, out, norm)
subroutine dfft_forward_accel(fft, in, out)
subroutine, public fft_end(this)
subroutine, public fft_gg_transform(gg_in, temp, periodic_dim, latt, qq, gg, modg2)
real(real64) pure function, public fft_scaling_factor(fft)
This function returns the factor required to normalize a function after a forward and backward transf...
integer, parameter cufft_z2z
pure integer function, public pad_feq(ii, nn, mode)
convert between array index and G-vector
subroutine zfft_backward_1d(fft, in, out)
integer, parameter, public fftlib_accel
subroutine, public fft_all_end()
delete all plans
integer function fft_size(size, factors, parity)
subroutine zfft_backward_3d(fft, in, out, norm)
subroutine fft_operation_count(fft)
subroutine zfft_backward_accel(fft, in, out)
integer, parameter cufft_c2r
integer, parameter cufft_c2c
integer, parameter, public fft_real
subroutine, public fft_get_dims(fft, rs_n_global, fs_n_global, rs_n, fs_n, rs_istart, fs_istart)
integer, parameter, public fft_complex
integer, parameter, public fftlib_nfft
subroutine dfft_backward_3d(fft, in, out, norm)
subroutine, public fft_copy(fft_i, fft_o)
subroutine dfft_forward_1d(fft, in, out)
integer, parameter cufft_d2z
integer, parameter fft_null
integer, parameter, public fftlib_pnfft
subroutine zfft_forward_1d(fft, in, out)
subroutine zfft_forward_3d(fft, in, out, norm)
integer, parameter, public fftlib_pfft
subroutine dfft_backward_accel(fft, in, out)
integer, parameter, public fftlib_fftw
subroutine, public fft_init_stage1(this, namespace, XX, nn)
Some fft-libraries (only NFFT for the moment) need an additional precomputation stage that depends on...
subroutine, public fftw_prepare_plan(plan, dim, n, is_real, sign, flags, din_, cin_, cout_)
subroutine, public fftw_free_memory(is_real, drs_data, zrs_data, fs_data)
subroutine, public fftw_get_dims(rs_n, is_real, fs_n)
subroutine, public fftw_alloc_memory(rs_n, is_real, fs_n, drs_data, zrs_data, fs_data)
real(real64), parameter, public m_two
real(real64), parameter, public m_huge
real(real64), parameter, public m_half
real(real64), parameter, public m_one
subroutine, public messages_not_implemented(feature, namespace)
subroutine, public messages_warning(no_lines, all_nodes, namespace)
subroutine, public messages_new_line()
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
subroutine, public messages_fatal(no_lines, only_root_writes, namespace)
subroutine, public messages_input_error(namespace, var, details, row, column)
subroutine, public messages_info(no_lines, iunit, debug_only, stress, all_nodes, namespace)
type(mpi_comm), parameter, public mpi_comm_undefined
used to indicate a communicator has not been initialized
type(mpi_grp_t), public mpi_world
subroutine, public nfft_write_info(nfft)
subroutine, public nfft_end(nfft)
subroutine, public nfft_init(nfft, nfft_options, N, dim, M, optimize)
subroutine, public nfft_copy_info(in, out)
subroutine, public nfft_precompute(nfft, X1, X2, X3)
subroutine, public nfft_guru_options(nfft, namespace)
The low level module to work with the PFFT library. http:
subroutine, public pfft_prepare_plan_c2c(plan, n, in, out, sign, flags, mpi_comm)
Octopus subroutine to prepare a PFFT plan real to complex.
subroutine, public pfft_prepare_plan_c2r(plan, n, in, out, sign, flags, mpi_comm)
Octopus subroutine to prepare a PFFT plan real to complex.
subroutine, public pfft_decompose(n_proc, dim1, dim2)
Decompose all available processors in 2D processor grid, most equally possible.
subroutine, public pfft_prepare_plan_r2c(plan, n, in, out, sign, flags, mpi_comm)
Octopus subroutine to prepare a PFFT plan real to complex.
subroutine, public pfft_get_dims(rs_n_global, mpi_comm, is_real, alloc_size, fs_n_global, rs_n, fs_n, rs_istart, fs_istart)
The includes for the PFFT.
The low level module to work with the PNFFT library. http:
subroutine, public pnfft_copy_params(in, out)
subroutine, public pnfft_set_sp_nodes(pnfft, namespace, X)
subroutine, public pnfft_init_plan(pnfft, pnfft_options, comm, fs_n_global, fs_n, fs_istart, rs_n, rs_istart)
subroutine, public pnfft_write_info(pnfft)
subroutine, public pnfft_guru_options(pnfft, namespace)
subroutine, public pnfft_end(pnfft)
subroutine, public pnfft_init_procmesh(pnfft, mpi_grp, comm)
This module defines the unit system, used for input and output.
type(unit_t), public unit_megabytes
For large amounts of data (natural code units are bytes)
This is defined even when running serial.