--- master_setup.fpp 2012-04-10 15:42:00.581855867 -0700 +++ master_setup.fpp 2012-04-10 15:42:24.375851843 -0700 @@ -694,14 +694,6 @@ call amopen(mden, mden_name, owrite, 'F', 'W') end if -! Open the restart file: - - if (ntxo .le. 0) then - call amopen(restrt, restrt_name, owrite, 'U', 'W') - else - call amopen(restrt, restrt_name, owrite, 'F', 'W') - end if - #ifdef MPI ! Open the mpi logfile: --- runfiles.fpp 2012-04-10 15:42:47.185976195 -0700 +++ runfiles.fpp 2012-04-10 15:45:04.652851827 -0700 @@ -269,9 +269,19 @@ ! Write/rewind the restrt: +!We actually open the restart file here and close it afterwards rather than +!using the original method of just rewinding in order to force newer 'broken?' +!linuxes to flush the write buffer. + + if (ntxo .le. 0) then + call amopen(restrt, restrt_name, owrite, 'U', 'W') + else + call amopen(restrt, restrt_name, owrite, 'F', 'W') + end if + call write_restart(restrt, atm_cnt, crd, vel, tt) - rewind(restrt) + close(restrt) ! Consider whether to save 2ndary restrt: