Test+Problem+data+output

=Test Problem: Writing data in raw binary format= Pages: Workshop, Overview, CADAC, Data Access, Work Area Setup, Path Setup, Utilities, Grid Data, SPH Data, Running, Reporting, LOG

Here is a code snippet from **io_grid.f90**, for producing a raw binary file **snapshot.dat**, and the accompanying text file **snapshot.dim**, as needed by the Test Problem Utilities. code real, dimension(mx,my,mz):: rho,ux,uy,uz ... namelist /dim/mx,my,mz,mv,offset ... open(10,file='snapshot.dim',form='formatted',status='unknown')   ; open a text file for namelist output mx=256; my=mx; mz=mx; mv=4; offset=0. ; minimum information needed write(10,dim)                                                    ; write namelist close(10) open(11,file='snapshot.dat',,status='unknown', &                 ; open file for direct access, raw binary     form='unformatted',access='direct',recl=mx*my*mz*4)          ; the "*4" may not be needed with some compilers write(11,rec=1) rho                                              ; write density, Ux, Uy, Uz write(11,rec=2) ux write(11,rec=3) uy write(11,rec=4) uz close(11) ...

code Recent versions of the **ifort** compiler counts **recl** in words, so no ***4** is needed (unless the compiler option **-assume byterecl** is used). The **xlf90_r** compiler on **datastar** uses bytes, so ***4** is needed.