From 691610e91a96fdfe2a752ee5f74b7fbd6814f5a7 Mon Sep 17 00:00:00 2001 From: Adam Moody Date: Mon, 8 Apr 2019 13:54:59 -0700 Subject: [PATCH] fortran: set writeunit before opening file --- examples/src/writeread.f90 | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/src/writeread.f90 b/examples/src/writeread.f90 index 9eea4fb97..fa8ecca6c 100644 --- a/examples/src/writeread.f90 +++ b/examples/src/writeread.f90 @@ -41,6 +41,7 @@ program write_read_F forall(i=1:ni,j=1:nj,k=1:nk) & W1(i,j,k) = nodeoff*mynod+i+ni*(j-1+nj*(k-1)) + writeunit = mynod open(unit=writeunit,file=fname,form='unformatted',action='write') write(writeunit,iostat=ios) W1