2022-12-09 19:08:35 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								subroutine ftninit
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-10 09:24:24 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  use timer_impl, only: init_timer !,fini_timer, limtrace
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  use, intrinsic :: iso_c_binding, only: C_NULL_CHAR
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  use FFTW3
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-09 19:08:35 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								!  character*(*) appd
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  character*1 appd
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  character addpfx*8
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  character wisfile*256
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  common/pfxcom/addpfx
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-10 09:24:24 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  lu=8
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  call init_timer('./timer.out')
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-09 19:08:35 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  appd='.'
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  addpfx='    '
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-25 08:51:51 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  open(12,file=appd//'/all_qmap.txt',status='unknown',position='append')
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-09 19:08:35 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  open(17,file=appd//'/red.dat',status='unknown')
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  open(19,file=appd//'/livecq.txt',status='unknown')
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-20 14:17:33 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  open(71,file=appd//'/fort.71',status='unknown')
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  open(72,file=appd//'/fort.72',status='unknown')
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  open(73,file=appd//'/fort.73',status='unknown')
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								! Import FFTW wisdom, if available:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  iret=fftwf_init_threads()            !Initialize FFTW threading 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								! Default to 1 thread, but use nthreads for the big ones
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  call fftwf_plan_with_nthreads(1)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								! Import FFTW wisdom, if available
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  wisfile=trim(appd)//'/m65_wisdom.dat'// C_NULL_CHAR
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  iret=fftwf_import_wisdom_from_filename(wisfile)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-12 15:37:06 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  return
							 | 
						
					
						
							
								
									
										
										
										
											2022-12-04 10:17:02 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								end subroutine ftninit
							 |