00001 module m_rdinput
00002 implicit none
00003 private
00004 public::read_input
00005
00006 integer,public::N_CALC_BAND
00007 real(8),public::Ecut_for_eps
00008 real(8),public::shift_ef
00009 real(8),public::Max_excitation_energy
00010 real(8),public::delta_ex
00011 real(8),public::Green_func_delt
00012 real(8),public::delt
00013 real(8),public::ttrhdrn_dmna
00014 real(8),public::dmna
00015 real(8),public::ttrhdrn_dmnr
00016 real(8),public::dmnr
00017 integer,public::MPI_io_rank
00018 integer,public::io_rank
00019 integer,public::MPI_num_proc_per_qcomm
00020 integer,public::num_of_mpi_per_comm
00021 integer,public::MPI_num_qcomm
00022 integer,public::num_of_comm
00023 integer,public::Num_freq_grid
00024 integer,public::nen
00025 real(8),public::Lower_bound_energy_window
00026 real(8),public::E_LOWER
00027 real(8),public::Upper_bound_energy_window
00028 real(8),public::E_UPPER
00029 integer,public::flg_cRPA
00030 integer,public::flg_cRPA_band
00031 integer,public::flg_cRPA_ewin
00032 integer,public::flg_calc_type
00033 integer,public::file_num_log_start
00034 integer,public::file_num_chi_start
00035 integer,public::file_num_eps_start
00036 integer,public::file_num_chi_base_start
00037 integer,public::file_num_eps_base_start
00038
00039 integer,public::n_calc_q
00040 integer,public,allocatable::calc_num_k(:)
00041 namelist/param_chiqw/N_CALC_BAND,Ecut_for_eps,shift_ef,Max_excitation_energy,&
00042 Green_func_delt,ttrhdrn_dmna,ttrhdrn_dmnr,MPI_io_rank,MPI_num_proc_per_qcomm,&
00043 MPI_num_qcomm,Num_freq_grid,Lower_bound_energy_window,Upper_bound_energy_window,&
00044 flg_cRPA,flg_calc_type,file_num_log_start,file_num_chi_start,file_num_eps_start,&
00045 file_num_chi_base_start,file_num_eps_base_start,n_calc_q
00046 contains
00047 subroutine read_input(nproc)
00048 integer::nproc
00049 integer::ix
00050
00051
00052 Ecut_for_eps=0.0d0
00053 Num_freq_grid=70
00054 N_CALC_BAND=0
00055 SHIFT_EF=0.0d0
00056 MAX_EXCITATION_ENERGY=200.0d0
00057 GREEN_FUNC_DELT=0.1d0
00058 TTRHDRN_DMNA=0.001d0
00059 TTRHDRN_DMNR=0.001d0
00060 MPI_IO_RANK=0
00061 MPI_NUM_QCOMM=0
00062 MPI_NUM_PROC_PER_QCOMM=0
00063 LOWER_BOUND_ENERGY_WINDOW=0.0d0
00064 UPPER_BOUND_ENERGY_WINDOW=0.0d0
00065 FLG_CRPA=0
00066 FLG_CALC_TYPE=0
00067 FILE_NUM_LOG_START=400
00068 FILE_NUM_CHI_START=500
00069 FILE_NUM_EPS_START=600
00070 FILE_NUM_CHI_BASE_START=500000
00071 FILE_NUM_EPS_BASE_START=600000
00072 N_CALC_Q=0
00073
00074
00075
00076 read(5,nml=param_chiqw)
00077
00078
00079 if(MPI_num_qcomm==0)then
00080 MPI_num_qcomm=1
00081 MPI_num_proc_per_qcomm=nproc
00082 endif
00083 if(MPI_num_qcomm/=0)then
00084 if(mod(nproc,MPI_num_qcomm)/=0)then
00085 write(6,*)'ERROR: mpi setting wrong'
00086 stop
00087 endif
00088 MPI_num_proc_per_qcomm=nproc/MPI_num_qcomm
00089 endif
00090
00091 if(flg_cRPA==0)then
00092 write(6,*)
00093 write(6,*)'========================'
00094 write(6,*)'THIS CALCULATION IS fRPA'
00095 write(6,*)'========================'
00096 write(6,*)
00097 elseif(flg_cRPA==1)then
00098 write(6,*)
00099 write(6,*)'========================'
00100 write(6,*)'THIS CALCULATION IS cRPA'
00101 write(6,*)'========================'
00102 write(6,*)
00103 endif
00104
00105 if(flg_calc_type==2.and.n_calc_q==0)then
00106 write(6,*)'ERROR: n_calc_q should not be zero'
00107 stop
00108 endif
00109
00110 if(n_calc_q/=0)then
00111 allocate(calc_num_k(n_calc_q));calc_num_k=0
00112
00113 read(5,*)(calc_num_k(ix),ix=1,n_calc_q)
00114 else
00115 allocate(calc_num_k(n_calc_q));calc_num_k=0
00116 endif
00117
00118 write(6,nml=param_chiqw)
00119 delta_ex=Max_excitation_energy
00120 delt=Green_func_delt
00121 dmna=ttrhdrn_dmna
00122 dmnr=ttrhdrn_dmnr
00123 io_rank=MPI_io_rank
00124 num_of_mpi_per_comm=MPI_num_proc_per_qcomm
00125 num_of_comm=MPI_num_qcomm
00126 nen=Num_freq_grid
00127 E_LOWER=Lower_bound_energy_window
00128 E_UPPER=Upper_bound_energy_window
00129 end subroutine
00130 end module