added two parameters to control behavior of FFTW, timelimit is not working at the moment

remove fftw3.f as it is not needed anymore
!incremental update, wait for commit of damask_spectral.f90 before checking out
This commit is contained in:
Martin Diehl 2011-10-18 09:16:18 +00:00
parent 96223ddf39
commit a8a53ee525
2 changed files with 24 additions and 81 deletions

View File

@ -1,72 +0,0 @@
INTEGER FFTW_R2HC
PARAMETER (FFTW_R2HC=0)
INTEGER FFTW_HC2R
PARAMETER (FFTW_HC2R=1)
INTEGER FFTW_DHT
PARAMETER (FFTW_DHT=2)
INTEGER FFTW_REDFT00
PARAMETER (FFTW_REDFT00=3)
INTEGER FFTW_REDFT01
PARAMETER (FFTW_REDFT01=4)
INTEGER FFTW_REDFT10
PARAMETER (FFTW_REDFT10=5)
INTEGER FFTW_REDFT11
PARAMETER (FFTW_REDFT11=6)
INTEGER FFTW_RODFT00
PARAMETER (FFTW_RODFT00=7)
INTEGER FFTW_RODFT01
PARAMETER (FFTW_RODFT01=8)
INTEGER FFTW_RODFT10
PARAMETER (FFTW_RODFT10=9)
INTEGER FFTW_RODFT11
PARAMETER (FFTW_RODFT11=10)
INTEGER FFTW_FORWARD
PARAMETER (FFTW_FORWARD=-1)
INTEGER FFTW_BACKWARD
PARAMETER (FFTW_BACKWARD=+1)
INTEGER FFTW_MEASURE
PARAMETER (FFTW_MEASURE=0)
INTEGER FFTW_DESTROY_INPUT
PARAMETER (FFTW_DESTROY_INPUT=1)
INTEGER FFTW_UNALIGNED
PARAMETER (FFTW_UNALIGNED=2)
INTEGER FFTW_CONSERVE_MEMORY
PARAMETER (FFTW_CONSERVE_MEMORY=4)
INTEGER FFTW_EXHAUSTIVE
PARAMETER (FFTW_EXHAUSTIVE=8)
INTEGER FFTW_PRESERVE_INPUT
PARAMETER (FFTW_PRESERVE_INPUT=16)
INTEGER FFTW_PATIENT
PARAMETER (FFTW_PATIENT=32)
INTEGER FFTW_ESTIMATE
PARAMETER (FFTW_ESTIMATE=64)
INTEGER FFTW_ESTIMATE_PATIENT
PARAMETER (FFTW_ESTIMATE_PATIENT=128)
INTEGER FFTW_BELIEVE_PCOST
PARAMETER (FFTW_BELIEVE_PCOST=256)
INTEGER FFTW_NO_DFT_R2HC
PARAMETER (FFTW_NO_DFT_R2HC=512)
INTEGER FFTW_NO_NONTHREADED
PARAMETER (FFTW_NO_NONTHREADED=1024)
INTEGER FFTW_NO_BUFFERING
PARAMETER (FFTW_NO_BUFFERING=2048)
INTEGER FFTW_NO_INDIRECT_OP
PARAMETER (FFTW_NO_INDIRECT_OP=4096)
INTEGER FFTW_ALLOW_LARGE_GENERIC
PARAMETER (FFTW_ALLOW_LARGE_GENERIC=8192)
INTEGER FFTW_NO_RANK_SPLITS
PARAMETER (FFTW_NO_RANK_SPLITS=16384)
INTEGER FFTW_NO_VRANK_SPLITS
PARAMETER (FFTW_NO_VRANK_SPLITS=32768)
INTEGER FFTW_NO_VRECURSE
PARAMETER (FFTW_NO_VRECURSE=65536)
INTEGER FFTW_NO_SIMD
PARAMETER (FFTW_NO_SIMD=131072)
INTEGER FFTW_NO_SLOW
PARAMETER (FFTW_NO_SLOW=262144)
INTEGER FFTW_NO_FIXED_RADIX_LARGE_N
PARAMETER (FFTW_NO_FIXED_RADIX_LARGE_N=524288)
INTEGER FFTW_ALLOW_PRUNING
PARAMETER (FFTW_ALLOW_PRUNING=1048576)
INTEGER FFTW_WISDOM_ONLY
PARAMETER (FFTW_WISDOM_ONLY=2097152)

View File

@ -67,7 +67,9 @@ real(pReal) relevantStrain, & ! strain
!* spectral parameters: !* spectral parameters:
err_div_tol, & ! error of divergence in fourier space err_div_tol, & ! error of divergence in fourier space
err_stress_tol, & ! absolut stress error, will be computed from err_stress_tolrel (dont prescribe a value) err_stress_tol, & ! absolut stress error, will be computed from err_stress_tolrel (dont prescribe a value)
err_stress_tolrel ! factor to multiply with highest stress to get err_stress_tol err_stress_tolrel, & ! factor to multiply with highest stress to get err_stress_tol
fftw_timelimit ! sets the timelimit of plan creation for FFTW, see manual on www.fftw.org
character(len=64) fftw_planner_flag ! sets the planig-rigor flag, see manual on www.fftw.org
logical memory_efficient ! for fast execution (pre calculation of gamma_hat) logical memory_efficient ! for fast execution (pre calculation of gamma_hat)
integer(pInt) itmax , & ! maximum number of iterations integer(pInt) itmax , & ! maximum number of iterations
@ -163,9 +165,12 @@ subroutine numerics_init()
!* spectral parameters: !* spectral parameters:
err_div_tol = 1.0e-4 ! 1.0e-4 proposed by Suquet err_div_tol = 1.0e-4 ! 1.0e-4 proposed by Suquet
err_stress_tolrel = 0.01 ! relative tolerance for fullfillment of stress BC err_stress_tolrel = 0.01 ! relative tolerance for fullfillment of stress BC (1% of maximum stress)
itmax = 20_pInt ! Maximum iteration number itmax = 20_pInt ! Maximum iteration number
memory_efficient = .true. ! Precalculate Gamma-operator (81 double per point) memory_efficient = .true. ! Precalculate Gamma-operator (81 double per point)
fftw_timelimit = -1.0_pReal ! no timelimit of plan creation for FFTW
fftw_planner_flag ='patient'
!* Random seeding parameters: added <<<updated 27.08.2009>>> !* Random seeding parameters: added <<<updated 27.08.2009>>>
fixedSeed = 0_pInt fixedSeed = 0_pInt
@ -278,6 +283,10 @@ subroutine numerics_init()
itmax = IO_intValue(line,positions,2) itmax = IO_intValue(line,positions,2)
case ('memory_efficient') case ('memory_efficient')
memory_efficient = IO_intValue(line,positions,2) > 0_pInt memory_efficient = IO_intValue(line,positions,2) > 0_pInt
case ('fftw_timelimit')
fftw_timelimit = IO_floatValue(line,positions,2)
case ('fftw_planner_flag')
fftw_planner_flag = IO_stringValue(line,positions,2)
!* Random seeding parameters !* Random seeding parameters
case ('fixed_seed') case ('fixed_seed')
@ -344,6 +353,12 @@ subroutine numerics_init()
write(6,'(a24,x,e8.1)') 'err_stress_tolrel: ',err_stress_tolrel write(6,'(a24,x,e8.1)') 'err_stress_tolrel: ',err_stress_tolrel
write(6,'(a24,x,i8)') 'itmax: ',itmax write(6,'(a24,x,i8)') 'itmax: ',itmax
write(6,'(a24,x,L8)') 'memory_efficient: ',memory_efficient write(6,'(a24,x,L8)') 'memory_efficient: ',memory_efficient
if(fftw_timelimit<0) then
write(6,'(a24,x,L8)') 'fftw_timelimit: ',.false.
else
write(6,'(a24,x,e8.1)') 'fftw_timelimit: ',fftw_timelimit
endif
write(6,'(a24,x,a)') 'fftw_planner_flag: ',trim(fftw_planner_flag)
write(6,*) write(6,*)
!* Random seeding parameters !* Random seeding parameters