| 1 |
C Copyright(C) 1999-2020 National Technology & Engineering Solutions |
| 2 |
C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 3 |
C NTESS, the U.S. Government retains certain rights in this software. |
| 4 |
C |
| 5 |
C See packages/seacas/LICENSE for details |
| 6 |
|
| 7 |
program testcpd |
| 8 |
|
| 9 |
c This is a test program for the Fortran binding of the EXODUS II |
| 10 |
c database copy function (excopy). |
| 11 |
|
| 12 |
implicit none |
| 13 |
|
| 14 |
include 'exodusII.inc' |
| 15 |
|
| 16 |
integer iin, iout, exoid, exoid1, ierr, cpu_ws, io_ws |
| 17 |
|
| 18 |
real vers |
| 19 |
|
| 20 |
data iin /5/, iout /6/ |
| 21 |
|
| 22 |
c open EXODUS II input file |
| 23 |
|
| 24 |
c the setting of cpu_ws isn't used for copying but will test the |
| 25 |
c conversion routines |
| 26 |
|
| 27 |
cpu_ws = 8 |
| 28 |
io_ws = 4 |
| 29 |
|
| 30 |
exoid = exopen ("test.exo", EXREAD, cpu_ws, io_ws, vers, ierr) |
| 31 |
write (iout, '(/"after exopen, error = ",i3)') |
| 32 |
1 ierr |
| 33 |
|
| 34 |
write (iout, '("test.exo is an EXODUSII file; version ", |
| 35 |
1 f4.2)') vers |
| 36 |
write (iout, '(" I/O word size: ",i4)') io_ws |
| 37 |
|
| 38 |
c create EXODUS II output file with default size reals |
| 39 |
|
| 40 |
c the setting of cpu_ws isn't used for copying but will test the |
| 41 |
c conversion routines |
| 42 |
|
| 43 |
cpu_ws = 8 |
| 44 |
io_ws = 0 |
| 45 |
|
| 46 |
exoid1 = excre ("testcp.exo", |
| 47 |
1 EXCLOB, cpu_ws, io_ws, ierr) |
| 48 |
write (iout,'("after excre, id = ", i6, ", error = ",i4)') |
| 49 |
1 exoid1, ierr |
| 50 |
write (iout,'(" I/O word size: ",i4)') io_ws |
| 51 |
|
| 52 |
write (iout,'("after excre, error = ", i4)') ierr |
| 53 |
|
| 54 |
call excopy (exoid, exoid1, ierr) |
| 55 |
write (iout, '(/"after excopy, error = ", i3)' ) ierr |
| 56 |
|
| 57 |
call exclos (exoid, ierr) |
| 58 |
write (iout, '(/"after exclos, error = ", i3)' ) ierr |
| 59 |
|
| 60 |
call exclos (exoid1, ierr) |
| 61 |
write (iout, '(/"after exclos, error = ", i3)' ) ierr |
| 62 |
|
| 63 |
stop |
| 64 |
end |