Checking the gigantic unformatted file generated in FORTRAN -
the output of fortran program gigantic (300gb) unformatted file. ( in fact, file includes time evolution of xyz coordinates of many many particles. so, data type real*8, if matters @ all)
the problem not sure if of data written correctly, because of transient issue in computational server. now, im left gigantic file, , looking way check if of content healthy!
is there way check weather of xyz's written correctly, , not corruptedly (say nan)?
in addition dwwork's method of checking nans, can check infinity. after that, simple matter of reading file , looping through every value. since wrote file, assume can read it.
program testinfnan implicit none real*8 :: x, y, z logical :: xnan, ynan, znan, xinf, yinf, zinf z = 1. x = z / 0. y = x / x print *, '' print *, 'x = ', x print *, 'y = ', y print *, 'z = ', z xnan = x /= x ynan = y /= y znan = z /= z print *, '' print *, 'xnan = ', xnan print *, 'ynan = ', ynan print *, 'znan = ', znan xinf = x == 1./0 yinf = y == 1./0 zinf = z == 1./0 print *, '' print *, 'xinf = ', xinf print *, 'yinf = ', yinf print *, 'zinf = ', zinf end program testinfnan
output:
x = infinity y = nan z = 1.00000000000000 xnan = f ynan = t znan = f xinf = t yinf = f zinf = f
Comments
Post a Comment