fortran77 - Reading a file with 1024^3 data points -


i trying read file 1024^3 single precision data points. code looks this

  real, allocatable :: stored_data(:)    character(255):: in_file   integer n   integer*8 length, length4    length = n*n*n            ! number of data points   length4 = 4*length   in_file = "filename.dat"    allocate(stored_data(length))    open(10,file=trim(in_file),access="direct",  &     form="unformatted",recl=length4)   read(10,rec=1) stored_data   close(10)    deallocate(stored_data) 

but when running code, following error:

fortran runtime error: recl parameter non-positive in open statement 

i guess because of large value of variable "length4". workarounds?


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -