-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgenerate_fftw_wisdom.fpp
66 lines (51 loc) · 1.98 KB
/
generate_fftw_wisdom.fpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
!> A program that calls init_transforms, to be used for generating fftw wisdom
!! for a given input file.
!!
!! This is free software released under the MIT licence
!! Written by: Edmund Highcock ([email protected])
program generate_fftw_wisdom
!use unit_tests
use mp, only: init_mp, finish_mp, proc0, broadcast, nproc
use file_utils, only: init_file_utils, run_name
!use file_utils, only: append_output_file, close_output_file
!use species, only: init_species, nspec, spec
!use constants, only: pi
!use kt_grids, only: naky, ntheta0, init_kt_grids
!use theta_grid, only: ntgrid, init_theta_grid
!use gs2_layouts, only: init_gs2_layouts, g_lo, ie_idx
use nonlinear_terms, only: init_nonlinear_terms, finish_nonlinear_terms
!use dist_fn_arrays, only: g
!use nonlinear_terms, only: nonlinear_terms_unit_test_time_add_nl
!use kt_grids, only: ntheta0, naky
use job_manage, only: time_message
!use runtime_tests, only: get_svn_rev, get_compiler_name
use benchmarks, only: benchmark_identifier
implicit none
character (500), target :: cbuff
real :: tstart
logical :: dummy=.false.
real :: time_taken(2) = 0.0
!integer :: i
!integer :: timing_unit
! Set up depenencies
call init_mp
if (proc0) call init_file_utils(dummy, name="gs")
if (proc0) then
cbuff = trim(run_name)
end if
call broadcast (cbuff)
if (.not. proc0) run_name => cbuff
if (proc0) call time_message(.false., time_taken, "Init transforms")
call init_nonlinear_terms
if (proc0) then
call time_message(.false., time_taken, "Init transforms")
write(*, '(" Time taken to calculate fftw plans ",I6," procs: ",F3.1," s")') nproc, time_taken(1)
write(*,*)
! call append_output_file(timing_unit, &
! benchmark_identifier())
! write(timing_unit, '(I6," ",F9.3)') nproc, time_taken(1)
! call close_output_file(timing_unit)
end if
!call finish_nonlinear_terms
call finish_mp
end program generate_fftw_wisdom