c======================================================================= c c a c r e i n p h c 3 . f c ----------------------- c Automatic creation of successive steering files to run parallel c corsika simulations and of the corresponding shell scripts at hc3. c (qgsjet, gheisha, always single showers) c----------------------------------------------------------------------- c creation script: c #!/bin/bash c # gfortran -O0 -fbounds-check acreinphc3.f -o acreinphc3 c ifort -C -O0 -check bounds acreinphc3.f -o acreinphc3 c ./acreinphc3 c chmod +x jobhc3* c----------------------------------------------------------------------- c run parallel corsika simulation: c job_submit -cp -p200 -t990 -m3000 \ c -oJob000004_%j.out -eJob000004_%j.err mpirun \ c mpi_corsika75026_thin_QGSII4_gupwcvd_coreas_runner parallel-000004 c----------------------------------------------------------------------- c run analysis (optional): c #!/bin/bash c job_submit -p1 -cp -t1000 -m1000 showanalyhc3.sh001750 c ls -1 DAT001750* | grep t -v > showanalyhc3.i001750 c showanalyhc3 < showanalyhc3.i001750 > showanalyhc3.out001750 c mv fort.9 showanalyhc3.fort001750 c----------------------------------------------------------------------- c juergen.oehlschlaeger@kit.edu c======================================================================= program acreinphc3 implicit double precision (a-h,o-z), integer (i-n) character cpinput*15,cplldir*10,cjobhc3*13,cquota*8,cquotb*8 dimension qengy(18),mprim(8),mfanz(16),mshif(16) c - - - - - - set number of files, showers, values of energy - - - - - - data mprim/ 14, 402, 1206, 2814, 5626, 1, 1, 1/ data mfanz/ 200, 160, 130, 100, 80, 20, 20, 20, 8*20/ data mshif/ 0, 200, 400, 600, 700, 800, 900, 950, 8*990/ data qengy/1.0000d7,1.7783d7,3.1623d7,5.6234d7, + 1.0000d8,1.7783d8,3.1623d8,5.6234d8, + 1.0000d9,1.7783d9,3.1623d9,5.6234d9, + 1.0000d10,1.7783d10,3.1623d10,5.6234d10,1.d11,3.16d11/ data cquota/'"______ '/, cquotb/' ______"'/ c - - - - - - some initialisations for corsika files - - - - - - - - - - ecut1 = 0.10d0 ecut2 = 0.01d0 ecut3 = 5.00d-5 ecut4 = 5.00d-5 iauge = 0 ifluk = 0 eslop = 0.0 themin = 20.0 themax = 20.0 phideg = 180.d0-153.435d0 dectmax = 1.d5 dectcut = dectmax*1.d-3 c - - - - - - particle energy loop - - - - - - - - - - - - - - - - - - - do 29 iegy=1,1 engya = qengy(iegy) engyb = engya write(*,'(''- - - - - - - - - - - - - - - - - - - - -'')') if ( engya .lt. engyb ) then write(*,'('' energ='',1p,e12.4,'' ...'',e12.4,'' GeV'')') + engya,engyb else write(*,'('' energ='',1p,e12.4,'' GeV'')') engya endif write(*,'(''- - - - - - - - - - - - - - - - - - - - -'')') isnmax = 5 ! isnmax = mfanz(iegy) mstrt0 = 500 + 50*(iegy-8) if ( iegy .ge. 7 ) then dectmax = 1.d6 dectcut = dectmax*1.d-3 endif c - - - - - - primary particle loop - - - - - - - - do 27 iprm=1,2 mstrt = mstrt0 + 20*(iprm-1) iprim = mprim(1) write(*,'(10x,''prim='',i6)') mprim(1) c - - - - - - theta angle loop - - - - - - - - do 26 ithe=1,2 themin = 20.d0*ithe + 20.d0*(ithe-1) themax = themin write(*,'(17x,''theta='',f8.2)') themin mstrt = mstrt + isnmax*(ithe-1) c - - - - - - (single) shower loop - - - - - - - - do 25 isnr=1,isnmax msrun = mstrt + isnr - 1 if ( isnr .eq. 1 .or. isnr .eq. isnmax) + write(*,'(25x,''msrun='',i9)') msrun if ( isnr .eq. 2 .and. isnr .ne. isnmax) + write(*,'(24x,8('' .''))') irun = msrun im = mod(irun,1000000) phideg = 23.45d0 + 34.56d0*(isnr-1) c - - - - - - some more quantities for shell scripts - - - - - - - - cpinput = 'parallel-000000' write(cpinput(10:15),'(I6.6)') im cplldir = 'csk000000/' write(cplldir(4:9),'(I6.6)') im cjobhc3 = 'jobhc3-000000' write(cjobhc3(8:13),'(I6.6)') im c - - - - - - - - create corsika steering file - - - - - - - - - - - - iseed = msrun*3 + 100000*iprm open(unit=9,FILE=cpinput,STATUS='UNKNOWN') write(9,'(''RUNNR '',I10)') irun write(9,'(''PARALLEL'',f9.0,f11.0,'' 1 F'')') + dectcut,dectmax write(9,'(''NSHOW '',I10)') 1 write(9,'(''EVTNR '',I10)') 1 write(9,'(''SEED '',3I10)') iseed,0,0 write(9,'(''SEED '',3I10)') iseed+1,0,0 write(9,'(''SEED '',3I10)') iseed+2,0,0 write(9,'(''SEED '',3I10)') iseed+3,0,0 write(9,'(''SEED '',3I10)') iseed+4,0,0 write(9,'(''SEED '',3I10)') iseed+5,0,0 write(9,'(''PRMPAR'',I10)') iprim if ( engya .lt. engyb ) write(9,'(''ESLOPE'',F10.2)') eslop write(9,'(''ERANGE'',5x,1p,2E13.4)') engya,engyb write(9,'(''THETAP'',2F13.3)') themin,themax write(9,'(''PHIP '',2F13.3)') phideg,phideg ! 0.,360. if ( iauge .eq. 1 ) then write(9,'(''OBSLEV 1452.e2 870.000 g/cm^2'')') write(9,'(''MAGNET 19.47 -14.17 Auger'')') ! write(9,'(''OBSLEV 110.e2 1022.647 g/cm^2'')') ! write(9,'(''MAGNET 20.40 43.20 Karlsruhe'')') else write(9,'(''OBSLEV 370.e2 991.147 g/cm^2'')') write(9,'(''MAGNET 27.38 -48.34 SKA '', + ''(West-Australia)'')') endif write(9,'(''MAXPRT'',I10)') 1 write(9,'(''ECTMAP 1.E11'')') write(9,'(''ECUTS '',2F9.4,1p,2e11.2)') + ecut1,ecut2,ecut3,ecut4 write(9,'(''RADNKG 5.E5'')') write(9,'(''HADFLG'',6I5)') (0,i=1,5),2 write(9,'(''ELMFLG T T'')') ! write(9,'(''SIBYLL T'',I10)') 0 ! write(9,'(''SIBSIG T'')') ! write(9,'(''QGSJET T'',I10)') 0 ! write(9,'(''QGSSIG T'')') write(9,'(''MUMULT T'')') write(9,'(''MUADDI T'')') write(9,'(''STEPFC 1.'')') write(9,'(''LONGI T 5.0 T T'')') write(9,'(''* AUGSCT 20 35. 750. T T'')') write(9,'(''HILOW 88.88'')') write(9,'(''OUTFILE '',a,''DAT'',i6.6,''.firstint'')') + cplldir,irun write(9,'(''DIRECT '',a)') cplldir write(9,'(''HOST hc3.uni'')') write(9,'(''USER joe'')') write(9,'(''EXIT '')') close(unit=9) c - - - - - - - - create shell script - - - - - - - - - - - - - - - - - itimec = 110 if ( engya .gt. 3.3333e10 ) itimec = 68 * 60 ! max 4080 min. open(unit=9,FILE=cjobhc3,STATUS='UNKNOWN') write(9,'(''#!/bin/bash'')') write(9,'(''#'')') write(9,'(''if [ ! -e qgsdat-II-04 ] ; then'')') write(9,'('' echo " WARNING:'', + '' no corsika submit path."'')') write(9,'('' exit ;'')') write(9,'(''fi'')') write(9,'(''#'')') write(9,'(''/bin/rm -rf '',a)') cplldir write(9,'(''/bin/mkdir '',a)') cplldir write(9,'(''tail -11 '',a)') cjobhc3 write(9,'(''#'')') write(9,'(''/bin/cp '',a,1x,a)') cjobhc3,cplldir write(9,'(''/bin/cp '',a,1x,a)') cpinput,cplldir write(9,'(''/bin/cp summ* '',a)') cplldir write(9,'(''/bin/cp readpartic* '',a)') cplldir ! write(9,'(''/bin/cp readmthin* '',a)') cplldir ! write(9,'(''/bin/cp sortaugerhit* '',a)') cplldir write(9,'(''/bin/cp readcsk2asci* '',a)') cplldir write(9,'(''/bin/cp totaltimenew* '',a)') cplldir write(9,'(''/bin/cp postprocess* '',a)') cplldir write(9,'(''#'')') if ( iegy .ge. 7 ) then write(9,'(''job_submit -cp -p320 -t'',i3,'' -m2000 -oJob'', + i6.6,''_%j.out -eJob'',i6.6,''_%j.err mpirun '', + ''mpi_corsika75061_stnd_QGSII4_gheisha_runner '',a)') + itimec,im,im,cpinput else write(9,'(''job_submit -cp -p16 -t60 -m2000 -oJob'', + i6.6,''_%j.out -eJob'',i6.6,''_%j.err mpirun '', + ''mpi_corsika75061_stnd_QGSII4_gheisha_runner '',a)') + im,im,cpinput endif close(unit=9) 25 continue 26 continue 27 continue 28 continue 29 continue c - - - - - - end of all loops - - - - - - - - - - - - - - - - - - - - - stop end