def event_by_event(fout, cent='30_35', idx=0, etaos=0.0, fname_ini='/lustre/nyx/hyihp/lpang/hdf5_data/auau39.h5', gpu_id=3): ''' Run event_by_event hydro, with initial condition from smearing on the particle list''' if not os.path.exists(fout): os.mkdir(fout) cfg.NX = 301 cfg.NY = 301 cfg.NZ = 5 cfg.DT = 0.005 cfg.DX = 0.1 cfg.DY = 0.1 cfg.DZ = 0.15 cfg.IEOS = 1 cfg.TFRZ = 0.136 cfg.ntskip = 60 cfg.nzskip = 1 cfg.TAU0 = 0.4 cfg.ETAOS = etaos cfg.fPathOut = fout t0 = time() visc = CLVisc(cfg, gpu_id=gpu_id) parton_list, eid, imp_b, nwound, npartons = read_p4x4(cent, idx, fname_ini) comments = 'cent=%s, eventid=%s, impact parameter=%s, nw=%s, npartons=%s' % ( cent, eid, imp_b, nwound, npartons) write_config(cfg, comments) visc.smear_from_p4x4(parton_list, SIGR=0.6, SIGZ=0.6, KFACTOR=1.3, force_bjorken=True) visc.evolve(max_loops=4000, save_hypersf=True, save_bulk=True, save_vorticity=False) # test whether queue.finish() fix the opencl memory leak problem visc.queue.finish() t1 = time() print('finished. Total time: {dtime}'.format(dtime=t1 - t0))
def event_by_event(fout, cent='30_35', idx=0, etaos=0.0, system='auau200', fname_ini='/lustre/nyx/hyihp/lpang/hdf5_data/auau39.h5', gpu_id=3, switch_off_longitudinal_fluctuations=False, force_bjorken=False, eos_type="lattice_pce150"): ''' Run event_by_event hydro, with initial condition from smearing on the particle list''' if not os.path.exists(fout): os.mkdir(fout) cfg.NX = 201 cfg.NY = 201 cfg.NZ = 121 cfg.DT = 0.01 cfg.DX = 0.16 cfg.DY = 0.16 cfg.DZ = 0.16 cfg.ntskip = 32 cfg.nzskip = 2 cfg.nxskip = 2 cfg.nyskip = 2 #cfg.NX = 301 #cfg.NY = 301 #cfg.NZ = 51 #cfg.DT = 0.005 #cfg.DX = 0.1 #cfg.DY = 0.1 #cfg.DZ = 0.2 cfg.eos_type = eos_type #cfg.TFRZ = 0.110 #cfg.TFRZ = 0.105 #cfg.TFRZ = 0.137 cfg.TFRZ = 0.100 cfg.TAU0 = 0.4 if system == 'pbpb2p76': cfg.TAU0 = 0.2 cfg.Eta_gw = 1.8 cfg.Eta_flat = 2.0 elif system == 'auau200': cfg.Eta_gw = 1.3 cfg.Eta_flat = 1.5 #cfg.ETAOS = etaos cfg.ETAOS_XMIN = 0.154 cfg.ETAOS_YMIN = etaos cfg.ETAOS_RIGHT_SLOP = 0.0 cfg.ETAOS_LEFT_SLOP = 0.0 cfg.fPathOut = fout t0 = time() visc = CLVisc(cfg, gpu_id=gpu_id) parton_list, eid, imp_b, nwound, npartons = read_p4x4(cent, idx, fname_ini) comments = 'cent=%s, eventid=%s, impact parameter=%s, nw=%s, npartons=%s' % ( cent, eid, imp_b, nwound, npartons) write_config(cfg, comments) if force_bjorken: if cfg.eos_type == "lattice_pce150": # KFACTOR=1.4 for etaos = 0.08; KFACTOR = 1.2 for etaos=0.16 visc.smear_from_p4x4(parton_list, SIGR=0.6, SIGZ=0.6, KFACTOR=1.2, force_bjorken=True) elif cfg.eos_type == "first_order": visc.smear_from_p4x4(parton_list, SIGR=0.6, SIGZ=0.6, KFACTOR=0.8, force_bjorken=True) elif switch_off_longitudinal_fluctuations: heta = create_longitudinal_profile(cfg) visc.smear_from_p4x4(parton_list, SIGR=0.6, SIGZ=0.6, KFACTOR=1.4, longitudinal_profile=heta) else: if etaos >= 0.16: visc.smear_from_p4x4(parton_list, SIGR=0.6, SIGZ=0.6, KFACTOR=1.2) elif etaos >= 0.08: visc.smear_from_p4x4(parton_list, SIGR=0.6, SIGZ=0.6, KFACTOR=1.4) else: visc.smear_from_p4x4(parton_list, SIGR=0.6, SIGZ=0.6, KFACTOR=1.5) visc.evolve(max_loops=4000, save_hypersf=True, save_bulk=True, save_vorticity=True) # test whether queue.finish() fix the opencl memory leak problem visc.queue.finish() t1 = time() print('finished. Total time: {dtime}'.format(dtime=t1 - t0))