Commit 2a9a87fe authored by Daniel Wortmann's avatar Daniel Wortmann

Added a few command line switches, including documentation

Modified the dump of /proc/self/status at the end of the run
Modified debugtime output
parent 0e1bcd00
......@@ -19,15 +19,24 @@
!Dump status file into out file (should be done only at end of run)
SUBROUTINE print_memory_info()
IMPLICIT NONE
CHARACTER(LEN=1024):: line
INTEGER :: err
OPEN(99,FILE="/proc/self/status",ERR=999)
DO
READ(99,"(a)",ERR=999,END=999) line
WRITE(6,*) trim(line)
ENDDO
999 CLOSE(99,IOSTAT=err)
INTEGER :: err,irank
#ifdef CPP_MPI
INCLUDE 'mpif.h'
CALL MPI_COMM_RANK(MPI_COMM_WORLD,irank,err)
#else
irank=0
#endif
IF (irank==0) THEN
OPEN(99,FILE="/proc/self/status",ERR=999)
DO
READ(99,"(a)",ERR=999,END=999) line
WRITE(6,*) TRIM(line)
ENDDO
999 CLOSE(99,IOSTAT=err)
ELSE
WRITE(6,"(a,i0,a,a)") "Rank:",irank," used ",memory_usage_string()
END IF
END SUBROUTINE print_memory_info
!Read mstat to find out current memory usage
......
......@@ -19,6 +19,7 @@ MODULE m_juDFT_time
INTEGER,PARAMETER :: max_subtimer=5 ! blocks of subtimers are allocated in this size
REAL :: min_time=0.02 ! minimal time to display in output (part of total)
LOGICAL :: l_debug !write out each start& stop of timer
REAL :: debugtimestart=-1.0
TYPE t_p
TYPE(t_timer),POINTER:: p
END TYPE t_p
......@@ -156,11 +157,12 @@ CONTAINS
INCLUDE 'mpif.h'
#endif
IF (.NOT.l_debug) RETURN
if (debugtimestart<0) debugtimestart=cputime()
#ifdef CPP_MPI
CALL MPI_COMM_RANK(MPI_COMM_WORLD,irank,ierr)
WRITE(*,"(i3,3a,f20.2,5x,a)") irank,startstop,name," at:",cputime(),memory_usage_string()
WRITE(*,"(i3,3a,f20.2,5x,a)") irank,startstop,name," at:",cputime()-debugtimestart,memory_usage_string()
#else
WRITE(*,"(3a,f20.2,5x,a)") startstop,name," at:",cputime(),memory_usage_string()
WRITE(*,"(3a,f20.2,5x,a)") startstop,name," at:",cputime()-debugtimestart,memory_usage_string()
#endif
END SUBROUTINE priv_debug_output
......
......@@ -25,42 +25,47 @@ CONTAINS
WRITE(*,'(a)')"------------------------------------------------------"
WRITE(*,'(a)')"Usage info:"
WRITE(*,'(a)')"The following command line options are known:"
WRITE(*,'(a)')"-da,-mem,-mpi,-hdf: choose a storage for the eigenvalues"
WRITE(*,'(a)')" and eigenvectors. The default will depend"
WRITE(*,'(a)')" be -mem for serial and -mpi for parallel builds"
WRITE(*,'(a)')""
WRITE(*,'(a)')"-lapack,-lapack2,"
WRITE(*,'(a)')"-elpa,-scalapack,"
WRITE(*,'(a)')"-elemental,-magma : choose diagonalization. Not all might be available"
WRITE(*,'(a)')""
WRITE(*,'(a)')"-debugtime : write out the start/stop of all timers to STDOUT"
WRITE(*,'(a)')""
WRITE(*,'(a)')"-genEnpara : write enpara file"
WRITE(*,'(a)')""
WRITE(*,'(a)')"Control the input:"
WRITE(*,'(a)')"-xmlInput or -xml : use inp.xml instead of inp"
WRITE(*,'(a)')"-toXML : convert inp file to XML input file (experimental)"
WRITE(*,'(a)')""
WRITE(*,'(a)')"-check : run in check mode, i.e. stop after init"
WRITE(*,'(a)')""
WRITE(*,'(a)')"-toXML : convert inp file to XML input file"
WRITE(*,'(a)')"-xmlXPath XXX=YYY : modify the xml-xpath of the inp.xml file"
WRITE(*,'(a)')"-n_min_size XXX : try to use at least XXX PE in Eigenvalue parallelization"
WRITE(*,'(a)')""
WRITE(*,'(a)')"-wtime XXXXX : run for XXXX minutes (used to estimate if another iteration is started"
WRITE(*,'(a)')"Output options:"
WRITE(*,'(a)')"-no_out : do not open out file but write to stdout"
WRITE(*,'(a)')"-genEnpara : write enpara file"
WRITE(*,'(a)')""
WRITE(*,'(a)')"Control FLEUR job:"
WRITE(*,'(a)')"-check : run in check mode, i.e. stop after init"
WRITE(*,'(a)')"-wtime XXXXX : run for XXXX minutes (used to estimate if another iteration is started)"
WRITE(*,'(a)')"-j #:DIR : run subjob in directory DIR using # PEs"
WRITE(*,'(a)')"-f FILENAME : obtain info on subjobs from file FILENAME"
WRITE(*,'(a)')""
WRITE(*,'(a)')"-info : Print out information on recommended parallelization and available charge densities"
WRITE(*,'(a)')""
WRITE(*,'(a)')"-h, --help : print this text :-)"
WRITE(*,'(a)')"Options useful for debugging:"
WRITE(*,'(a)')"-warn_only : Do not stop in case of warnings"
WRITE(*,'(a)')"-trace : Try to generate stacktrace in case of an error"
WRITE(*,'(a)')"-debugtime : write out the start/stop of all timers to STDOUT"
WRITE(*,'(a)')""
WRITE(*,'(a)')"HDF density file relevant options:"
WRITE(*,'(a)')"Storage for eigenvalues:"
WRITE(*,'(a)')"-da,-mem,-mpi,-hdf: choose a storage for the eigenvalues"
WRITE(*,'(a)')" and eigenvectors. The default will"
WRITE(*,'(a)')" be -mem for serial and -mpi for parallel builds"
WRITE(*,'(a)')""
WRITE(*,'(a)')"Method used for diagonalization:"
WRITE(*,'(a)')"-lapack,-lapack2,"
WRITE(*,'(a)')"-elpa,-scalapack,"
WRITE(*,'(a)')"-elemental,-magma : choose diagonalization. Not all might be available"
WRITE(*,'(a)')""
WRITE(*,'(a)')"HDF density file relevant options:"
WRITE(*,'(a)')"-no_cdn_hdf : disable HDF charge density mode (activated by default if HDF5 is available)"
WRITE(*,'(a)')"-sd N : use starting density N, where N is the index of the density according to -info"
WRITE(*,'(a)')"-delden N-M : delete densities N to M"
WRITE(*,'(a)')"-delden N : delete density N"
WRITE(*,'(a)')"-delden allbutlast : delete all but the last density"
WRITE(*,'(a)')""
WRITE(*,'(a)')""
WRITE(*,'(a)')"-h, --help : print this text :-)"
WRITE(*,'(a)')"Please check the documentation on www.flapw.de for more details"
CALL juDFT_end("help was written",l_endXML=.FALSE.)
......
......@@ -121,16 +121,14 @@
!-t3e
IF (mpi%irank.EQ.0) THEN
CALL startXMLOutput()
#ifndef __TOS_BGQ__
!Do not open out-file on BlueGene
IF (judft_was_argument("-info")) THEN
CLOSE(6)
OPEN (6,status='SCRATCH')
ELSE
IF (.not.judft_was_argument("-no_out")) &
OPEN (6,file='out',form='formatted',status='unknown')
ENDIF
CALL writeOutHeader()
#endif
IF (judft_was_argument("-info")) THEN
OPEN (16,status='SCRATCH')
ELSE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment