113 SUBROUTINE pack_gp(IC,NXY,IS523,MINPK,INC,MISSP,MISSS,
114 1 JMIN,JMAX,LBIT,NOV,NDG,LX,IBIT,JBIT,KBIT,
115 2 NOVREF,LBITREF,IER)
117 parameter(mallow=2**30+1)
123 dimension jmin(ndg),jmax(ndg),lbit(ndg),nov(ndg)
124 dimension misslx(ndg)
126 INTEGER,
PARAMETER :: IBXX2(0:30) = (/ 1, 2, 4, 8, 16, 32, 64, &
127 & 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, &
128 & 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608,
129 & 16777216, 33554432, 67108864, 134217728, 268435456,
130 & 536870912, 1073741824 /)
167 IF(is523.EQ.1)lmiss=1
168 IF(is523.EQ.2)lmiss=2
193 nenda=min(kstart+lminpk-1,nxy)
194 IF(nxy-nenda.LE.lminpk/2)nenda=nxy
209 IF(nenda.NE.nxy.AND.ic(kstart).EQ.ic(kstart+1))
THEN
215 DO 111 k=kstart+1,nxy
217 IF(ic(k).NE.ic(kstart))
THEN
227 ELSEIF(is523.EQ.1)
THEN
230 DO 112 k=kstart+1,nxy
232 IF(ic(k).NE.missp)
THEN
234 IF(ic(k).NE.ic(kstart))
THEN
249 DO 113 k=kstart+1,nxy
251 IF(ic(k).NE.missp.AND.ic(k).NE.misss)
THEN
253 IF(ic(k).NE.ic(kstart))
THEN
268 114
IF(is523.EQ.0)
THEN
270 DO 115 k=kstart,nenda
271 IF(ic(k).LT.mina)
THEN
275 IF(ic(k).GT.maxa)
THEN
281 ELSEIF(is523.EQ.1)
THEN
283 DO 117 k=kstart,nenda
284 IF(ic(k).EQ.missp)
GO TO 117
285 IF(ic(k).LT.mina)
THEN
289 IF(ic(k).GT.maxa)
THEN
297 DO 120 k=kstart,nenda
298 IF(ic(k).EQ.missp.OR.ic(k).EQ.misss)
GO TO 120
299 IF(ic(k).LT.mina)
THEN
303 IF(ic(k).GT.maxa)
THEN
311 kounta=nenda-kstart+1
317 IF(mina.NE.mallow)
GO TO 125
323 IF(is523.NE.2)
GO TO 130
328 125 itest=maxa-mina+lmiss
331 IF(itest.LT.ibxx2(ibita))
GO TO 130
348 133
IF(ktotal.GE.nxy)
GO TO 200
369 IF(mstart.LT.nxy)
THEN
374 DO 145 k=mstart+1,nxy
376 IF(ic(k).NE.ic(mstart))
THEN
390 150 nendb=max(nendb,min(ktotal+lminpk,nxy))
393 IF(nxy-nendb.LE.lminpk/2)nendb=nxy
404 DO 155 k=mstart,nendb
405 IF(ic(k).LE.minb)
THEN
413 IF(ic(k).GE.maxb)
THEN
419 ELSEIF(is523.EQ.1)
THEN
421 DO 157 k=mstart,nendb
422 IF(ic(k).EQ.missp)
GO TO 157
423 IF(ic(k).LE.minb)
THEN
427 IF(ic(k).GE.maxb)
THEN
435 DO 160 k=mstart,nendb
436 IF(ic(k).EQ.missp.OR.ic(k).EQ.misss)
GO TO 160
437 IF(ic(k).LE.minb)
THEN
441 IF(ic(k).GE.maxb)
THEN
451 IF(minb.NE.mallow)
GO TO 165
458 IF(is523.NE.2)
GO TO 170
463 165
DO 166 ibitb=ibitbs,30
464 IF(maxb-minb.LT.ibxx2(ibitb)-lmiss)
GO TO 170
486 IF(ibitb.GE.ibita)
GO TO 180
509 DO 1715 k=ktotal,kstart,-1
511 IF(ic(k).LT.minb)
THEN
514 ELSEIF(ic(k).GT.maxb)
THEN
518 IF(maxtst-mintst.GE.ibxx2(ibitb))
GO TO 174
528 ELSEIF(is523.EQ.1)
THEN
530 DO 1719 k=ktotal,kstart,-1
532 IF(ic(k).EQ.missp)
GO TO 1718
533 IF(ic(k).LT.minb)
THEN
536 ELSEIF(ic(k).GT.maxb)
THEN
540 IF(maxtst-mintst.GE.ibxx2(ibitb)-lmiss)
GO TO 174
554 DO 173 k=ktotal,kstart,-1
556 IF(ic(k).EQ.missp.OR.ic(k).EQ.misss)
GO TO 1729
557 IF(ic(k).LT.minb)
THEN
560 ELSEIF(ic(k).GT.maxb)
THEN
564 IF(maxtst-mintst.GE.ibxx2(ibitb)-lmiss)
GO TO 174
585 174
IF(kounta.EQ.kounts)
GO TO 200
597 IF(nenda-nouta.GT.minak.AND.nenda-nouta.GT.maxak)
GO TO 200
611 DO 1742 k=kstart,nenda-nouta
612 IF(ic(k).LT.mina)
THEN
615 IF(ic(k).GT.maxa)
THEN
620 ELSEIF(is523.EQ.1)
THEN
622 DO 1744 k=kstart,nenda-nouta
623 IF(ic(k).EQ.missp)
GO TO 1744
624 IF(ic(k).LT.mina)
THEN
627 IF(ic(k).GT.maxa)
THEN
634 DO 175 k=kstart,nenda-nouta
635 IF(ic(k).EQ.missp.OR.ic(k).EQ.misss)
GO TO 175
636 IF(ic(k).LT.mina)
THEN
639 IF(ic(k).GT.maxa)
THEN
647 IF(mina.NE.mallow)
GO TO 1750
652 IF(is523.NE.2)
GO TO 177
657 1750 itest=maxa-mina+lmiss
660 IF(itest.LT.ibxx2(ibita))
GO TO 177
682 180
IF(mislla.EQ.1)
THEN
695 IF(nxy-(ktotal+kinc).LE.lminpk/2)kinc=nxy-ktotal
707 DO 185 k=ktotal+1,min(ktotal+kinc,nxy)
708 IF(ic(k).LT.minc)
THEN
712 IF(ic(k).GT.maxc)
THEN
719 ELSEIF(is523.EQ.1)
THEN
721 DO 187 k=ktotal+1,min(ktotal+kinc,nxy)
722 IF(ic(k).EQ.missp)
GO TO 186
723 IF(ic(k).LT.minc)
THEN
727 IF(ic(k).GT.maxc)
THEN
736 DO 190 k=ktotal+1,min(ktotal+kinc,nxy)
737 IF(ic(k).EQ.missp.OR.ic(k).EQ.misss)
GO TO 189
738 IF(ic(k).LT.minc)
THEN
742 IF(ic(k).GT.maxc)
THEN
761 IF(minc.EQ.mallow)
THEN
775 IF(maxc-minc.GE.ibxx2(ibita)-lmiss)
GO TO 200
782 195 ktotal=ktotal+nount
790 IF(ktotal.GE.nxy)
GO TO 200
792 IF(minbk.GT.ktotal.AND.maxbk.GT.ktotal)
THEN
813 IF(lx.LE.ndg)
GO TO 205
814 lminpk=lminpk+lminpk/2
831 misslx(lx)=ic(ktotal)
842 IF(ktotal.GE.nxy)
GO TO 209
868 210
IF(jmin(l).LT.ibxx2(ibit))
GO TO 220
883 IF(misslx(l).EQ.missp)
THEN
884 jmin(l)=ibxx2(ibit)-1
911 IF(lbit(k).LT.lbitref)lbitref=lbit(k)
917 lbit(k)=lbit(k)-lbitref
933 310
IF(lbit(k).LT.ibxx2(jbit))
GO TO 320
956 IF(nov(k).LT.novref)novref=nov(k)
983 410
IF(nov(k).LT.ibxx2(kbit))
GO TO 420
992 CALL reduce(jmin,jmax,lbit,nov,lx,ndg,ibit,jbit,kbit,
995 IF(ier.EQ.714.OR.ier.EQ.715)
THEN
subroutine pack_gp(IC, NXY, IS523, MINPK, INC, MISSP, MISSS, JMIN, JMAX, LBIT, NOV, NDG, LX, IBIT, JBIT, KBIT, NOVREF, LBITREF, IER)
This subroutine determines groups of variable size, but at least of size minpk, the associated max(JM...
subroutine reduce(JMIN, JMAX, LBIT, NOV, LX, NDG, IBIT, JBIT, KBIT, NOVREF, IBXX2, IER)
This subroutine determines whether the number of groups should be increased in order to reduce the si...