36
37
38
39#include "implicit_f.inc"
40
41
42
43#include "sphcom.inc"
44#include "tabsiz_c.inc"
45
46
47
48 INTEGER NUMSPH_L, PROC, LEN_AM,
49 . CEPSP(*),SSPHVELN_L, STAT
51 . spbuf(nspbuf,*),vsphio(*)
52
53 my_real,
DIMENSION(:),
ALLOCATABLE :: sphveln_l
54
55
56
57 INTEGER I, J, IE_L
58 my_real,
DIMENSION(:,:),
ALLOCATABLE :: spbuf_l
59
60
61
62
63 ALLOCATE( spbuf_l(nspbuf,numsph_l) )
64
65 ie_l = 0
66
67 DO i = 1, numsph
68 IF(cepsp(i)==proc) THEN
69 ie_l = ie_l + 1
70 DO j = 1, nspbuf
71 spbuf_l(j,ie_l) = spbuf(j,i)
72 END DO
73 END IF
74 END DO
75
76 CALL write_db(spbuf_l,numsph_l*nspbuf)
77 len_am = len_am + numsph_l*nspbuf
78
79 IF(nsphio > 0) THEN
80 ALLOCATE(sphveln_l(ssphveln_l) ,stat=stat)
81 IF (stat /= 0)
CALL ancmsg(msgid=268,anmode=aninfo,
82 . msgtype=msgerror)
83 sphveln_l(1:ssphveln_l)=zero
84
87 len_am = len_am + svsphio + ssphveln_l
88 DEALLOCATE(sphveln_l)
89 END IF
90
91
92
93 DEALLOCATE( spbuf_l )
94
95 RETURN
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
subroutine write_db(a, n)