Commit e7b3768d authored by Claus Kleinwort's avatar Claus Kleinwort
Browse files

More debug information for problems with reading Cfiles

git-svn-id: http://svnsrv.desy.de/public/MillepedeII/trunk@157 3547b9b0-65b8-46d3-b95d-921b3f43af62
parent 5405768a
......@@ -52,7 +52,7 @@
!! 1. Download the software package from the DESY \c svn server to
!! \a target directory, e.g.:
!!
!! svn checkout http://svnsrv.desy.de/public/MillepedeII/tags/V04-03-07 target
!! svn checkout http://svnsrv.desy.de/public/MillepedeII/tags/V04-03-08 target
!!
!! 2. Create **Pede** executable (in \a target directory):
!!
......@@ -98,6 +98,8 @@
!! of the constraints matrix (solution by elemination).
!! This problem is usually caused by *empty* constraints (see \ref
!! cmd-skipemptycons).
!! * 170831: More debug information for problems with reading Cfiles. Don't stop
!! after read error for \ref cmd-checkinput mode.
!!
!! \section tools_sec Tools
!! The subdirectory \c tools contains some useful scripts:
......@@ -1537,6 +1539,7 @@ SUBROUTINE peread(more)
REAL(mpd) :: ds2
REAL(mpd) :: dw
!$ INTEGER(mpi) :: OMP_GET_THREAD_NUM
CHARACTER (LEN=7) :: cfile
SAVE
inder(i)=readBufferDataI(i)
......@@ -1581,7 +1584,7 @@ SUBROUTINE peread(more)
!$OMP DEFAULT(PRIVATE) &
!$OMP SHARED(readBufferInfo,readBufferPointer,readBufferDataI,readBufferDataD, &
!$OMP readBufferDataF,nPointer,nData,skippedRecords,ndimbuf,NTHR,NFILF,FLOOP, &
!$OMP IFD,KFD,IFILE,NFILB,WFD,XFD) &
!$OMP IFD,KFD,IFILE,NFILB,WFD,XFD,icheck) &
!$OMP NUM_THREADS(NTHR)
ithr=1
......@@ -1620,8 +1623,13 @@ SUBROUTINE peread(more)
#endif
eof=(ierrc <= 0.AND.ierrc /= -4) ! allow buffer overruns -> skip record
IF(eof.AND.ierrc < 0) THEN
CALL peend(18,'Aborted, read error(s) for binary files')
WRITE(*,*) 'Read error for binary Cfile', kfile, 'record', jrec+1, ':', ierrc
WRITE(8,*) 'Read error for binary Cfile', kfile, 'record', jrec+1, ':', ierrc
IF (icheck <= 0) THEN ! stop unless 'checkinput' mode
WRITE(cfile,'(I7)') kfile
CALL peend(18,'Aborted, read error(s) for binary file ' // cfile)
STOP 'PEREAD: stopping due to read errors'
ENDIF
END IF
END IF
IF(eof) EXIT records ! end-of-files or error
......
......@@ -23,7 +23,7 @@
#
# Hardcoded defaults can be replaced by command line arguments for
# - Name of binary file
# - Number of records to print (-1: all)
# - Number of records to print (-1: all; <-1: all, record headers only)
# - Number of records to skip (optional)
# - Mininum value to print derivative
#
......@@ -62,7 +62,7 @@ mrec = 10
## number of records (track) to skip before
skiprec = 0
## minimum value to print derivatives
minval = 0.
minval = None # allows for NaNs
#
# ## C. Kleinwort - DESY ########################
......@@ -116,6 +116,10 @@ try:
print " === NR ", nrec, length[0] / 2
# no details, only header
if (mrec < -1):
continue
i = 0
nh = 0
ja = 0
......@@ -149,8 +153,11 @@ try:
if (ja + 1 < jb):
lab = []
val = []
for k in range(ja+1, jb):
if abs(glder[k]) >= minval:
for k in range(ja + 1, jb):
if minval is None:
lab.append(inder[k])
val.append(glder[k])
elif abs(glder[k]) >= minval:
lab.append(inder[k])
val.append(glder[k])
print " local ", lab
......@@ -158,8 +165,11 @@ try:
if (jb + 1 < i + 1):
lab = []
val = []
for k in range(jb+1, i+1):
if abs(glder[k]) >= minval:
for k in range(jb + 1, i + 1):
if minval is None:
lab.append(inder[k])
val.append(glder[k])
elif abs(glder[k]) >= minval:
lab.append(inder[k])
val.append(glder[k])
print " global ", lab
......
Supports Markdown
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