1 |
subroutine instore( n, fc, gnorm0, is, m, jmin, jmax, |
2 |
& cold, sflag, tflag, ifunc, tact) |
3 |
c |
4 |
c arguments |
5 |
c |
6 |
integer n, is, m, jmin, jmax, ifail, ifunc |
7 |
double precision fc, gnorm0,tact |
8 |
logical cold |
9 |
logical sflag, tflag |
10 |
integer*8 rectmp, tmp1, tmp2 |
11 |
c---- |
12 |
c |
13 |
common /xxstore/ itape, ntape, isize |
14 |
integer itape, ntape, isize |
15 |
common /mpi_parm/ myid,nprocs,mystart,myend |
16 |
integer myid, nprocs,mystart,myend |
17 |
|
18 |
ifail = 0 |
19 |
itape = 91 |
20 |
ntape = 92 |
21 |
isize = is |
22 |
cold = .true. |
23 |
|
24 |
if (myid .eq. 0) print *, 'pathei: in instore ' |
25 |
|
26 |
cc one record = two arrays of real*(isize) |
27 |
|
28 |
open( itape |
29 |
$ , file = 'OPWARMI' |
30 |
$ , status = 'unknown' |
31 |
$ , form = 'formatted' |
32 |
$ , access = 'sequential' |
33 |
$ ) |
34 |
|
35 |
read( itape, *, end=800, err=900 ) n, fc, gnorm0, |
36 |
$ m, jmin, jmax, |
37 |
& sflag, tflag, ifunc, tact |
38 |
!Note: bnc read itape defaults to cold if OPWARMI has 0 size and |
39 |
! skips the next line, due to end condition |
40 |
|
41 |
cold = .false. |
42 |
|
43 |
800 continue |
44 |
close(itape) |
45 |
|
46 |
if( myid .eq. 0) then |
47 |
print* |
48 |
write(*,'(a,i10,a,i2)') |
49 |
$ ' opening direct access with recl = ',n,' * ',isize |
50 |
print* |
51 |
endif |
52 |
|
53 |
tmp1 = n |
54 |
tmp2 = isize |
55 |
rectmp = tmp1*tmp2 |
56 |
|
57 |
cph( |
58 |
if(myid .eq. 0) print *, 'pathei rectmp ', rectmp, n, isize |
59 |
cph) |
60 |
|
61 |
! open( ntape |
62 |
! $ , file = 'OPWARMD' |
63 |
! $ , status = 'unknown' |
64 |
! $ , form = 'unformatted' |
65 |
! $ , access = 'direct' |
66 |
! $ , recl = rectmp |
67 |
! $ ) |
68 |
|
69 |
return |
70 |
|
71 |
900 continue |
72 |
close(itape) |
73 |
ifail = 1 |
74 |
|
75 |
return |
76 |
end |