1246 SUBROUTINE DMUMPS_SAVE_RESTORE_BLR_STRUC(BLR_STRUC
1248 & ,Local_SIZE_GEST,Local_SIZE_VARIABLES
1249 & ,SIZE_INT, SIZE_ARITH_DEP, SIZE_LOGICAL
1250 & ,TOTAL_FILE_SIZE,TOTAL_STRUC_SIZE
1251 & ,size_read,size_allocated,size_written
1254 TYPE(BLR_STRUC_T) :: BLR_STRUC
1255 INTEGER,intent(IN)::unit,MYID
1256 CHARACTER(len=*),intent(IN) :: mode
1257 INTEGER,INTENT(OUT) :: Local_SIZE_GEST
1258 INTEGER(8),intent(OUT) :: Local_SIZE_VARIABLES
1259 INTEGER,intent(INOUT):: INFO(2)
1260 INTEGER,intent(IN):: SIZE_INT, SIZE_ARITH_DEP, SIZE_LOGICAL
1261 INTEGER(8),intent(IN) :: TOTAL_FILE_SIZE,TOTAL_STRUC_SIZE
1262 INTEGER(8),intent(INOUT):: size_read,size_allocated,size_written
1263 INTEGER :: NBVARIABLES_BLR_STRUC_T
1264 PARAMETER (NBVARIABLES_BLR_STRUC_T = 15)
1265 CHARACTER(len=30), dimension(NBVARIABLES_BLR_STRUC_T)::
1266 & VARIABLES_BLR_STRUC_T
1267 CHARACTER(len=30) :: TMP_STRING
1268 INTEGER(8),dimension(NBVARIABLES_BLR_STRUC_T)::
1269 & SIZE_VARIABLES_BLR_STRUC_T
1270 INTEGER,dimension(NBVARIABLES_BLR_STRUC_T)::SIZE_GEST_BLR_STRUC_T
1271 INTEGER,dimension(NBVARIABLES_BLR_STRUC_T)::NbRecords_BLR_STRUC_T
1272 INTEGER:: size_array1,size_array2,dummy,allocok
1273 INTEGER:: err,i1,j1,j2,NbSubRecords,Local_NbRecords
1274 INTEGER::SIZE_GEST_PANELS_L,SIZE_GEST_PANELS_L_j1
1275 INTEGER(8)::SIZE_VARIABLES_PANELS_L,SIZE_VARIABLES_PANELS_L_j1
1276 INTEGER::SIZE_GEST_PANELS_U,SIZE_GEST_PANELS_U_j1
1277 INTEGER(8)::SIZE_VARIABLES_PANELS_U,SIZE_VARIABLES_PANELS_U_j1
1278 INTEGER::SIZE_GEST_CB_LRB,SIZE_GEST_CB_LRB_j1j2
1279 INTEGER(8)::SIZE_VARIABLES_CB_LRB,SIZE_VARIABLES_CB_LRB_j1j2
1280 INTEGER::SIZE_GEST_DIAG_BLOCKS,SIZE_GEST_DIAG_BLOCKS_j1
1281 INTEGER(8)::SIZE_VARIABLES_DIAG_BLOCKS
1282 INTEGER(8)::SIZE_VARIABLES_DIAG_BLOCKS_j1
1284 VARIABLES_BLR_STRUC_T(1)="issym
"
1285 VARIABLES_BLR_STRUC_T(2)="ist2
"
1286 VARIABLES_BLR_STRUC_T(3)="isslave
"
1287 VARIABLES_BLR_STRUC_T(4)="panels_l
"
1288 VARIABLES_BLR_STRUC_T(5)="panels_u
"
1289 VARIABLES_BLR_STRUC_T(6)="cb_lrb
"
1290 VARIABLES_BLR_STRUC_T(7)="begs_blr_static
"
1291 VARIABLES_BLR_STRUC_T(8)="begs_blr_dynamic
"
1292 VARIABLES_BLR_STRUC_T(9)="begs_blr_l
"
1293 VARIABLES_BLR_STRUC_T(10)="begs_blr_col
"
1294 VARIABLES_BLR_STRUC_T(11)="nb_accesses_init
"
1295 VARIABLES_BLR_STRUC_T(12)="nb_panels
"
1296 VARIABLES_BLR_STRUC_T(13)="diag_blocks
"
1297 VARIABLES_BLR_STRUC_T(14)="nfs4father
"
1298 VARIABLES_BLR_STRUC_T(15)="m_array
"
1299 SIZE_VARIABLES_BLR_STRUC_T(:)=0_8
1300 SIZE_GEST_BLR_STRUC_T(:)=0
1301 NbRecords_BLR_STRUC_T(:)=0
1302 SIZE_GEST_PANELS_L=0
1303 SIZE_GEST_PANELS_L_j1=0
1304 SIZE_VARIABLES_PANELS_L=0_8
1305 SIZE_VARIABLES_PANELS_L_j1=0_8
1306 SIZE_GEST_PANELS_U=0
1307 SIZE_GEST_PANELS_U_j1=0
1308 SIZE_VARIABLES_PANELS_U=0_8
1309 SIZE_VARIABLES_PANELS_U_j1=0_8
1311 SIZE_GEST_CB_LRB_j1j2=0
1312 SIZE_VARIABLES_CB_LRB=0_8
1313 SIZE_VARIABLES_CB_LRB_j1j2=0_8
1314 SIZE_GEST_DIAG_BLOCKS=0
1315 SIZE_GEST_DIAG_BLOCKS_j1=0
1316 SIZE_VARIABLES_DIAG_BLOCKS=0_8
1317 SIZE_VARIABLES_DIAG_BLOCKS_j1=0_8
1318 DO i1=1,NBVARIABLES_BLR_STRUC_T
1319 TMP_STRING = VARIABLES_BLR_STRUC_T(i1)
1320 SELECT CASE(TMP_STRING)
1322 NbRecords_BLR_STRUC_T(i1)=1
1323.EQ.
if(trim(mode)"memory_save
") then
1324 SIZE_VARIABLES_BLR_STRUC_T(i1)=SIZE_LOGICAL
1325.EQ.
elseif(trim(mode)"save") then
1326 SIZE_VARIABLES_BLR_STRUC_T(i1)=SIZE_LOGICAL
1327 write(unit,iostat=err) BLR_STRUC%IsSYM
1330 CALL MUMPS_SETI8TOI4(TOTAL_FILE_SIZE-size_written,
1333.LT.
IF ( INFO(1) 0 ) GOTO 100
1334.EQ.
elseif(trim(mode)"restore
") then
1335 SIZE_VARIABLES_BLR_STRUC_T(i1)=SIZE_LOGICAL
1336 read(unit,iostat=err) BLR_STRUC%IsSYM
1339 CALL MUMPS_SETI8TOI4(TOTAL_FILE_SIZE-size_read
1342.LT.
IF (INFO(1) 0 ) GOTO 100
1345 NbRecords_BLR_STRUC_T(i1)=1
1346.EQ.
if(trim(mode)"memory_save
") then
1347 SIZE_VARIABLES_BLR_STRUC_T(i1)=SIZE_LOGICAL
1348.EQ.
elseif(trim(mode)"save") then
1349 SIZE_VARIABLES_BLR_STRUC_T(i1)=SIZE_LOGICAL
1350 write(unit,iostat=err) BLR_STRUC%IsT2
1353 CALL MUMPS_SETI8TOI4(TOTAL_FILE_SIZE-size_written,
1356.LT.
IF ( INFO(1) 0 ) GOTO 100
1357.EQ.
elseif(trim(mode)"restore
") then
1358 SIZE_VARIABLES_BLR_STRUC_T(i1)=SIZE_LOGICAL
1359 read(unit,iostat=err) BLR_STRUC%IsT2
1362 CALL MUMPS_SETI8TOI4(TOTAL_FILE_SIZE-size_read
1365.LT.
IF (INFO(1) 0 ) GOTO 100
1368 NbRecords_BLR_STRUC_T(i1)=1
1369.EQ.
if(trim(mode)"memory_save
") then
1370 SIZE_VARIABLES_BLR_STRUC_T(i1)=SIZE_LOGICAL
1371.EQ.
elseif(trim(mode)"save") then
1372 SIZE_VARIABLES_BLR_STRUC_T(i1)=SIZE_LOGICAL
1373 write(unit,iostat=err) BLR_STRUC%IsSLAVE
1376 CALL MUMPS_SETI8TOI4(TOTAL_FILE_SIZE-size_written,
1379.LT.
IF ( INFO(1) 0 ) GOTO 100
1380.EQ.
elseif(trim(mode)"restore
") then
1381 SIZE_VARIABLES_BLR_STRUC_T(i1)=SIZE_LOGICAL
1382 read(unit,iostat=err) BLR_STRUC%IsSLAVE
1385 CALL MUMPS_SETI8TOI4(TOTAL_FILE_SIZE-size_read
1388.LT.
IF (INFO(1) 0 ) GOTO 100
1390 CASE("begs_blr_static")
1391 nbrecords_blr_struc_t(i1)=2
1392 if(trim(mode).EQ.
"memory_save")
then
1393 IF(
associated(blr_struc%BEGS_BLR_STATIC))
THEN
1394 size_gest_blr_struc_t(i1)=size_int
1395 size_variables_blr_struc_t(i1)=
1396 &
size(blr_struc%BEGS_BLR_STATIC,1)*size_int
1398 size_gest_blr_struc_t(i1)=size_int*2
1399 size_variables_blr_struc_t(i1)=0
1401 elseif(trim(mode).EQ.
"save")
then
1402 IF(
associated(blr_struc%BEGS_BLR_STATIC))
THEN
1403 size_gest_blr_struc_t(i1)=size_int
1404 size_variables_blr_struc_t(i1)=
1405 &
size(blr_struc%BEGS_BLR_STATIC,1)*size_int
1406 write(unit,iostat=err)
1407 &
size(blr_struc%BEGS_BLR_STATIC,1)
1413 IF ( info(1) .LT. 0 )
GOTO 100
1414 write(unit,iostat=err) blr_struc%BEGS_BLR_STATIC
1416 size_gest_blr_struc_t(i1)=size_int*2
1417 size_variables_blr_struc_t(i1)=0
1418 write(unit,iostat=err) -999
1424 IF ( info(1) .LT. 0 )
GOTO 100
1425 write(unit,iostat=err) -999
1432 IF ( info(1) .LT. 0 )
GOTO 100
1433 elseif(trim(mode).EQ."restore
") then
1434 nullify(BLR_STRUC%BEGS_BLR_STATIC)
1435 read(unit,iostat=err) size_array1
1438 CALL MUMPS_SETI8TOI4(TOTAL_FILE_SIZE-size_read
1441.LT.
IF ( INFO(1) 0 ) GOTO 100
1442.EQ.
if(size_array1-999) then
1443 SIZE_GEST_BLR_STRUC_T(i1)=SIZE_INT*2
1444 SIZE_VARIABLES_BLR_STRUC_T(i1)=0
1445 read(unit,iostat=err) dummy
1447 SIZE_GEST_BLR_STRUC_T(i1)=SIZE_INT
1448 SIZE_VARIABLES_BLR_STRUC_T(i1)=size_array1*SIZE_INT
1449 allocate(BLR_STRUC%BEGS_BLR_STATIC(size_array1)
1451.GT.
if (allocok 0) THEN
1453 CALL MUMPS_SETI8TOI4(
1454 & TOTAL_STRUC_SIZE-size_allocated
1457 read(unit,iostat=err) BLR_STRUC%BEGS_BLR_STATIC
1459.LT.
IF ( INFO(1) 0 ) GOTO 100
1462 CALL MUMPS_SETI8TOI4(TOTAL_FILE_SIZE-size_read
1465.LT.
IF ( INFO(1) 0 ) GOTO 100
1467 CASE("begs_blr_dynamic")
1468 nbrecords_blr_struc_t(i1)=2
1469 if(trim(mode).EQ.
"memory_save")
then
1470 IF(
associated(blr_struc%BEGS_BLR_DYNAMIC))
THEN
1471 size_gest_blr_struc_t(i1)=size_int
1472 size_variables_blr_struc_t(i1)=
1473 &
size(blr_struc%BEGS_BLR_DYNAMIC,1)*size_int
1475 size_gest_blr_struc_t(i1)=size_int*2
1476 size_variables_blr_struc_t(i1)=0
1478 elseif(trim(mode).EQ.
"save")
then
1479 IF(
associated(blr_struc%BEGS_BLR_DYNAMIC))
THEN
1480 size_gest_blr_struc_t(i1)=size_int
1481 size_variables_blr_struc_t(i1)=
1482 &
size(blr_struc%BEGS_BLR_DYNAMIC,1)*size_int
1483 write(unit,iostat=err)
1484 &
size(blr_struc%BEGS_BLR_DYNAMIC,1)
1490 IF ( info(1) .LT. 0 )
GOTO 100
1491 write(unit,iostat=err) blr_struc%BEGS_BLR_DYNAMIC
1493 size_gest_blr_struc_t(i1)=size_int*2
1494 size_variables_blr_struc_t(i1)=0
1495 write(unit,iostat=err) -999
1501 IF ( info(1) .LT. 0 )
GOTO 100
1502 write(unit,iostat=err) -999
1509 IF ( info(1) .LT. 0 )
GOTO 100
1510 elseif(trim(mode).EQ.
"restore")
then
1511 nullify(blr_struc%BEGS_BLR_DYNAMIC)
1512 read(unit,iostat=err) size_array1
1518 IF ( info(1) .LT. 0 )
GOTO 100
1519 if(size_array1.EQ.-999)
then
1520 size_gest_blr_struc_t(i1)=size_int*2
1521 size_variables_blr_struc_t(i1)=0
1522 read(unit,iostat=err) dummy
1524 size_gest_blr_struc_t(i1)=size_int
1525 size_variables_blr_struc_t(i1)=size_array1*size_int
1526 allocate(blr_struc%BEGS_BLR_DYNAMIC(size_array1)
1528 if (allocok .GT. 0)
THEN
1531 & total_struc_size-size_allocated
1534 read(unit,iostat=err) blr_struc%BEGS_BLR_DYNAMIC
1536 IF ( info(1) .LT. 0 )
GOTO 100
1542 IF ( info(1) .LT. 0 )
GOTO 100
1545 nbrecords_blr_struc_t(i1)=2
1546 if(trim(mode).EQ.
"memory_save")
then
1547 IF(
associated(blr_struc%BEGS_BLR_L))
THEN
1548 size_gest_blr_struc_t(i1)=size_int
1549 size_variables_blr_struc_t(i1)=
1550 &
size(blr_struc%BEGS_BLR_L,1)*size_int
1552 size_gest_blr_struc_t(i1)=size_int*2
1553 size_variables_blr_struc_t(i1)=0
1555 elseif(trim(mode).EQ.
"save")
then
1556 IF(
associated(blr_struc%BEGS_BLR_L))
THEN
1557 size_gest_blr_struc_t(i1)=size_int
1558 size_variables_blr_struc_t(i1)=
1559 &
size(blr_struc%BEGS_BLR_L,1)*size_int
1560 write(unit,iostat=err)
1561 &
size(blr_struc%BEGS_BLR_L,1)
1567 IF ( info(1) .LT. 0 )
GOTO 100
1568 write(unit,iostat=err) blr_struc%BEGS_BLR_L
1570 size_gest_blr_struc_t(i1)=size_int*2
1571 size_variables_blr_struc_t(i1)=0
1572 write(unit,iostat=err) -999
1578 IF ( info(1) .LT. 0 )
GOTO 100
1579 write(unit,iostat=err) -999
1586 IF ( info(1) .LT. 0 )
GOTO 100
1587 elseif(trim(mode).EQ.
"restore")
then
1588 nullify(blr_struc%BEGS_BLR_L)
1589 read(unit,iostat=err) size_array1
1595 IF ( info(1) .LT. 0 )
GOTO 100
1596 if(size_array1.EQ.-999)
then
1597 size_gest_blr_struc_t(i1)=size_int*2
1598 size_variables_blr_struc_t(i1)=0
1599 read(unit,iostat=err) dummy
1601 size_gest_blr_struc_t(i1)=size_int
1602 size_variables_blr_struc_t(i1)=size_array1*size_int
1603 allocate(blr_struc%BEGS_BLR_L(size_array1)
1605 if (allocok .GT. 0)
THEN
1608 & total_struc_size-size_allocated
1611 read(unit,iostat=err) blr_struc%BEGS_BLR_L
1613 IF ( info(1) .LT. 0 )
GOTO 100
1619 IF ( info(1) .LT. 0 )
GOTO 100
1621 CASE(
"BEGS_BLR_COL")
1622 nbrecords_blr_struc_t(i1)=2
1623 if(trim(mode).EQ.
"memory_save")
then
1624 IF(
associated(blr_struc%BEGS_BLR_COL
THEN
1625 size_gest_blr_struc_t(i1)=size_int
1626 size_variables_blr_struc_t(i1)=
1627 &
size(blr_struc%BEGS_BLR_COL,1)*size_int
1629 size_gest_blr_struc_t(i1)=size_int*2
1630 size_variables_blr_struc_t(i1)=0
1632 elseif(trim(mode).EQ.
"save")
then
1633 IF(
associated(blr_struc%BEGS_BLR_COL))
THEN
1634 size_gest_blr_struc_t(i1)=size_int
1635 size_variables_blr_struc_t(i1)=
1636 &
size(blr_struc%BEGS_BLR_COL,1)*size_int
1637 write(unit,iostat=err)
1638 &
size(blr_struc%BEGS_BLR_COL,1)
1644 IF ( info(1) .LT. 0 )
GOTO 100
1645 write(unit,iostat=err) blr_struc%BEGS_BLR_COL
1647 size_gest_blr_struc_t(i1)=size_int*2
1648 size_variables_blr_struc_t(i1)=0
1649 write(unit,iostat=err) -999
1655 IF ( info(1) .LT. 0 )
GOTO 100
1656 write(unit,iostat=err) -999
1663 IF ( info(1) .LT. 0 )
GOTO 100
1664 elseif(trim(mode).EQ.
"restore")
then
1665 nullify(blr_struc%BEGS_BLR_COL)
1666 read(unit,iostat=err) size_array1
1672 IF ( info(1) .LT. 0 )
GOTO 100
1673 if(size_array1.EQ.-999)
then
1674 size_gest_blr_struc_t(i1)=size_int*2
1675 size_variables_blr_struc_t(i1)=0
1676 read(unit,iostat=err) dummy
1678 size_gest_blr_struc_t(i1)=size_int
1679 size_variables_blr_struc_t(i1)=size_array1*size_int
1680 allocate(blr_struc%BEGS_BLR_COL(size_array1)
1682 if (allocok .GT. 0)
THEN
1685 & total_struc_size-size_allocated
1688 read(unit,iostat=err) blr_struc%BEGS_BLR_COL
1690 IF ( info(1) .LT. 0 )
GOTO 100
1696 IF ( info(1) .LT. 0 )
GOTO 100
1698 CASE(
"NB_ACCESSES_INIT")
1699 nbrecords_blr_struc_t(i1)=1
1700 if(trim(mode).EQ.
"memory_save")
then
1701 size_variables_blr_struc_t(i1)=size_int
1702 elseif(trim(mode).EQ.
"save")
then
1703 size_variables_blr_struc_t(i1)=size_int
1704 write(unit,iostat=err) blr_struc%NB_ACCESSES_INIT
1710 IF ( info(1) .LT. 0 )
GOTO 100
1711 elseif(trim(mode).EQ.
"restore")
then
1712 size_variables_blr_struc_t(i1)=size_int
1713 read(unit,iostat=err) blr_struc%NB_ACCESSES_INIT
1719 IF (info(1) .LT. 0 )
GOTO 100
1722 nbrecords_blr_struc_t(i1)=1
1723 if(trim(mode).EQ.
"memory_save")
then
1724 size_variables_blr_struc_t(i1)=size_int
1725 elseif(trim(mode).EQ.
"save")
then
1726 size_variables_blr_struc_t(i1)=size_int
1727 write(unit,iostat=err) blr_struc%NB_PANELS
1733 IF ( info(1) .LT. 0 )
GOTO 100
1734 elseif(trim(mode).EQ.
"restore")
then
1735 size_variables_blr_struc_t(i1)=size_int
1736 read(unit,iostat=err) blr_struc%NB_PANELS
1742 IF (info(1) .LT. 0 )
GOTO 100
1745 if(trim(mode).EQ.
"memory_save")
then
1746 IF(
associated(blr_struc%PANELS_L))
THEN
1747 nbrecords_blr_struc_t(i1)=1
1748 size_gest_blr_struc_t(i1)=size_int
1749 size_variables_blr_struc_t(i1)=0
1750 DO j1=1,
size(blr_struc%PANELS_L,1)
1752 & blr_struc%PANELS_L(j1)
1753 & ,unit,myid,
"memory_save"
1754 & ,size_gest_panels_l_j1
1755 & ,size_variables_panels_l_j1
1756 & ,size_int, size_arith_dep, size_logical
1757 & ,total_file_size,total_struc_size
1758 & ,size_read,size_allocated,size_written
1760 size_gest_panels_l=size_gest_panels_l+
1761 & size_gest_panels_l_j1
1762 size_variables_panels_l=size_variables_panels_l+
1763 & size_variables_panels_l_j1
1766 nbrecords_blr_struc_t
1767 size_gest_blr_struc_t(i1)=size_int*2
1768 size_variables_blr_struc_t(i1)=0
1770 elseif(trim(mode).EQ.
"save")
then
1771 IF(
associated(blr_struc%PANELS_L))
THEN
1772 nbrecords_blr_struc_t(i1)=1
1773 size_gest_blr_struc_t(i1)=size_int
1774 size_variables_blr_struc_t
1775 write(unit,iostat=err)
1776 &
size(blr_struc%PANELS_L,1)
1782 DO j1=1,
size(blr_struc%PANELS_L,1)
1784 & blr_struc%PANELS_L(j1)
1786 & ,size_gest_panels_l_j1
1787 & ,size_variables_panels_l_j1
1788 & ,size_int, size_arith_dep, size_logical
1789 & ,total_file_size,total_struc_size
1792 IF ( info(1) .LT. 0 )
GOTO 100
1795 nbrecords_blr_struc_t(i1)=2
1796 size_gest_blr_struc_t(i1)=size_int*2
1797 size_variables_blr_struc_t(i1)=0
1798 write(unit,iostat=err) -999
1804 IF ( info(1) .LT. 0 )
GOTO 100
1805 write(unit,iostat=err) -999
1811 IF ( info(1) .LT. 0 )
GOTO 100
1813 elseif(trim(mode).EQ.
"restore")
then
1814 nullify(blr_struc%PANELS_L)
1815 read(unit,iostat=err) size_array1
1821 IF ( info(1) .LT. 0 )
GOTO 100
1822 if(size_array1.EQ.-999)
then
1823 nbrecords_blr_struc_t(i1)=2
1824 size_gest_blr_struc_t(i1)=size_int*2
1825 size_variables_blr_struc_t(i1)=0
1826 read(unit,iostat=err) dummy
1832 IF ( info(1) .LT. 0 )
GOTO 100
1834 nbrecords_blr_struc_t(i1)=1
1835 size_gest_blr_struc_t(i1)=size_int
1836 size_variables_blr_struc_t(i1)=0
1837 allocate(blr_struc%PANELS_L(size_array1)
1839 if (allocok .GT. 0)
THEN
1842 & total_struc_size-size_allocated
1847 & blr_struc%PANELS_L(j1)
1848 & ,unit,myid,
"restore"
1849 & ,size_gest_panels_l_j1
1850 & ,size_variables_panels_l_j1
1851 & ,size_int, size_arith_dep, size_logical
1852 & ,total_file_size,total_struc_size
1853 & ,size_read,size_allocated,size_written
1855 size_gest_panels_l=size_gest_panels_l+
1856 & size_gest_panels_l_j1
1857 size_variables_panels_l=size_variables_panels_l+
1858 & size_variables_panels_l_j1
1863 if(trim(mode).EQ.
"memory_save")
then
1864 IF(
associated(blr_struc%PANELS_U))
THEN
1865 nbrecords_blr_struc_t(i1)=1
1866 size_gest_blr_struc_t(i1)=size_int
1867 size_variables_blr_struc_t(i1)=0
1868 DO j1=1,
size(blr_struc%PANELS_U
1870 & blr_struc%PANELS_U(j1)
1871 & ,unit,myid,
"memory_save"
1872 & ,size_gest_panels_u_j1
1873 & ,size_variables_panels_u_j1
1874 & ,size_int, size_arith_dep, size_logical
1875 & ,total_file_size,total_struc_size
1876 & ,size_read,size_allocated,size_written
1878 size_gest_panels_u=size_gest_panels_u+
1879 & size_gest_panels_u_j1
1880 size_variables_panels_u=size_variables_panels_u+
1881 & size_variables_panels_u_j1
1884 nbrecords_blr_struc_t(i1)=2
1885 size_gest_blr_struc_t(i1
1886 size_variables_blr_struc_t(i1)=0
1888 elseif(trim(mode).EQ.
"save")
then
1889 IF(
associated(blr_struc%PANELS_U))
THEN
1890 nbrecords_blr_struc_t(i1)=1
1891 size_gest_blr_struc_t(i1)=size_int
1892 size_variables_blr_struc_t(i1)=0
1893 write(unit,iostat=err)
1894 &
size(blr_struc%PANELS_U,1)
1900 DO j1=1,
size(blr_struc%PANELS_U,1)
1902 & blr_struc%PANELS_U(j1)
1904 & ,size_gest_panels_u_j1
1905 & ,size_variables_panels_u_j1
1906 & ,size_int, size_arith_dep, size_logical
1907 & ,total_file_size,total_struc_size
1908 & ,size_read,size_allocated,size_written
1910 IF ( info(1) .LT. 0 )
GOTO 100
1913 nbrecords_blr_struc_t(i1)=2
1914 size_gest_blr_struc_t(i1)=size_int*2
1915 size_variables_blr_struc_t(i1)=0
1916 write(unit,iostat=err) -999
1922 IF ( info(1) .LT. 0 )
GOTO 100
1923 write(unit,iostat=err) -999
1929 IF ( info(1) .LT. 0 )
GOTO 100
1931 elseif(trim(mode).EQ.
"restore")
then
1932 nullify(blr_struc%PANELS_U)
1933 read(unit,iostat=err) size_array1
1939 IF ( info(1) .LT. 0 )
GOTO 100
1940 if(size_array1.EQ.-999)
then
1941 nbrecords_blr_struc_t(i1)=2
1942 size_gest_blr_struc_t(i1)=size_int*2
1943 size_variables_blr_struc_t(i1)=0
1944 read(unit,iostat=err) dummy
1950 IF ( info(1) .LT. 0 )
GOTO 100
1952 nbrecords_blr_struc_t(i1)=1
1953 size_gest_blr_struc_t(i1)=size_int
1954 size_variables_blr_struc_t(i1)=0
1955 allocate(blr_struc%PANELS_U(size_array1)
1957 if (allocok .GT. 0)
THEN
1960 & total_struc_size-size_allocated
1965 & blr_struc%PANELS_U(j1)
1966 & ,unit,myid,
"restore"
1967 & ,size_gest_panels_u_j1
1968 & ,size_variables_panels_u_j1
1969 & ,size_int, size_arith_dep, size_logical
1970 & ,total_file_size,total_struc_size
1971 & ,size_read,size_allocated,size_written
1973 size_gest_panels_u=size_gest_panels_u+
1974 & size_gest_panels_u_j1
1975 size_variables_panels_u=size_variables_panels_u+
1976 & size_variables_panels_u_j1
1981 if(trim(mode).EQ.
"memory_save")
then
1982 IF(
associated(blr_struc%CB_LRB))
THEN
1983 nbrecords_blr_struc_t(i1)=1
1984 size_gest_blr_struc_t(i1)=size_int*2
1985 size_variables_blr_struc_t(i1)=0
1986 DO j1=1,
size(blr_struc%CB_LRB,1)
1987 DO j2=1,
size(blr_struc%CB_LRB,2)
1989 & blr_struc%CB_LRB(j1,j2)
1990 & ,unit,myid,
"memory_save"
1991 & ,size_gest_cb_lrb_j1j2
1992 & ,size_variables_cb_lrb_j1j2
1993 & ,size_int, size_arith_dep, size_logical
1994 & ,total_file_size,total_struc_size
1995 & ,size_read,size_allocated,size_written
1997 size_gest_cb_lrb=size_gest_cb_lrb+
1998 & size_gest_cb_lrb_j1j2
1999 size_variables_cb_lrb=size_variables_cb_lrb+
2000 & size_variables_cb_lrb_j1j2
2004 nbrecords_blr_struc_t(i1)=2
2005 size_gest_blr_struc_t(i1)=size_int*3
2006 size_variables_blr_struc_t(i1)=0
2008 elseif(trim(mode).EQ.
"save")
then
2009 IF(
associated(blr_struc%CB_LRB))
THEN
2010 nbrecords_blr_struc_t(i1)=1
2011 size_gest_blr_struc_t(i1)=size_int*2
2012 size_variables_blr_struc_t(i1)=0
2013 write(unit,iostat=err)
2014 &
size(blr_struc%CB_LRB,1),
size(blr_struc%CB_LRB,2)
2020 DO j1=1,
size(blr_struc%CB_LRB,1)
2021 DO j2=1,
size(blr_struc%CB_LRB,2)
2023 & blr_struc%CB_LRB(j1,j2)
2025 & ,size_gest_cb_lrb_j1j2
2026 & ,size_variables_cb_lrb_j1j2
2027 & ,size_int, size_arith_dep, size_logical
2028 & ,total_file_size,total_struc_size
2029 & ,size_read,size_allocated,size_written
2031 IF ( info(1) .LT. 0 )
GOTO 100
2035 nbrecords_blr_struc_t(i1)=2
2036 size_gest_blr_struc_t(i1)=size_int*3
2037 size_variables_blr_struc_t(i1)=0
2038 write(unit,iostat=err) -999,-998
2044 IF ( info(1) .LT. 0 )
GOTO 100
2045 write(unit,iostat=err) -999
2051 IF ( info(1) .LT. 0 )
GOTO 100
2053 elseif(trim(mode).EQ.
"restore")
then
2054 nullify(blr_struc%CB_LRB)
2055 read(unit,iostat=err) size_array1,size_array2
2061 IF ( info(1) .LT. 0 )
GOTO 100
2062 if(size_array1.EQ.-999)
then
2063 nbrecords_blr_struc_t(i1)=2
2064 size_gest_blr_struc_t(i1)=size_int*3
2065 size_variables_blr_struc_t(i1)=0
2066 read(unit,iostat=err) dummy
2072 IF ( info(1) .LT. 0 )
GOTO 100
2074 nbrecords_blr_struc_t(i1)=1
2075 size_gest_blr_struc_t(i1)=size_int*2
2076 size_variables_blr_struc_t(i1)=0
2077 allocate(blr_struc%CB_LRB(size_array1,size_array2)
2079 if (allocok .GT. 0)
THEN
2082 & total_struc_size-size_allocated
2088 & blr_struc%CB_LRB(j1,j2)
2089 & ,unit,myid,
"restore"
2090 & ,size_gest_cb_lrb_j1j2
2091 & ,size_variables_cb_lrb_j1j2
2092 & ,size_int, size_arith_dep, size_logical
2093 & ,total_file_size,total_struc_size
2094 & ,size_read,size_allocated,size_written
2096 size_gest_cb_lrb=size_gest_cb_lrb+
2097 & size_gest_cb_lrb_j1j2
2098 size_variables_cb_lrb=size_variables_cb_lrb+
2099 & size_variables_cb_lrb_j1j2
2105 if(trim(mode).EQ.
"memory_save")
then
2106 IF(
associated(blr_struc%DIAG_BLOCKS))
THEN
2107 nbrecords_blr_struc_t(i1)=1
2108 size_gest_blr_struc_t(i1)=size_int
2109 size_variables_blr_struc_t(i1)=0
2110 DO j1=1,
size(blr_struc%DIAG_BLOCKS,1)
2112 & blr_struc%DIAG_BLOCKS(j1)
2113 & ,unit,myid,
"memory_save"
2114 & ,size_gest_diag_blocks_j1
2115 & ,size_variables_diag_blocks_j1
2116 & ,size_int, size_arith_dep
2117 & ,total_file_size,total_struc_size
2118 & ,size_read,size_allocated,size_written
2120 size_gest_diag_blocks=size_gest_diag_blocks+
2121 & size_gest_diag_blocks_j1
2122 size_variables_diag_blocks=
2123 & size_variables_diag_blocks+
2124 & size_variables_diag_blocks_j1
2127 nbrecords_blr_struc_t(i1)=2
2128 size_gest_blr_struc_t(i1)=size_int*2
2129 size_variables_blr_struc_t(i1)=0
2131 elseif(trim(mode).EQ.
"save")
then
2132 IF(
associated(blr_struc%DIAG_BLOCKS))
THEN
2133 nbrecords_blr_struc_t(i1)=1
2134 size_gest_blr_struc_t(i1)=size_int
2135 size_variables_blr_struc_t(i1)=0
2136 write(unit,iostat=err)
2137 &
size(blr_struc%DIAG_BLOCKS,1)
2143 DO j1=1,
size(blr_struc%DIAG_BLOCKS,1)
2145 & blr_struc%DIAG_BLOCKS(j1)
2147 & ,size_gest_diag_blocks_j1
2148 & ,size_variables_diag_blocks_j1
2149 & ,size_int, size_arith_dep
2150 & ,total_file_size,total_struc_size
2151 & ,size_read,size_allocated,size_written
2153 IF ( info(1) .LT. 0 )
GOTO 100
2156 nbrecords_blr_struc_t(i1)=2
2157 size_gest_blr_struc_t(i1)=size_int*2
2158 size_variables_blr_struc_t(i1)=0
2159 write(unit,iostat=err) -999
2165 IF ( info(1) .LT. 0 )
GOTO 100
2166 write(unit,iostat=err) -999
2172 IF ( info(1) .LT. 0 )
GOTO 100
2174 elseif(trim(mode).EQ.
"restore")
then
2175 nullify(blr_struc%DIAG_BLOCKS)
2176 read(unit,iostat=err) size_array1
2182 IF ( info(1) .LT. 0 )
GOTO 100
2183 if(size_array1.EQ.-999)
then
2184 nbrecords_blr_struc_t(i1)=2
2185 size_gest_blr_struc_t(i1)=size_int*2
2186 size_variables_blr_struc_t(i1)=0
2187 read(unit,iostat=err) dummy
2193 IF ( info(1) .LT. 0 )
GOTO 100
2195 nbrecords_blr_struc_t(i1)=1
2196 size_gest_blr_struc_t(i1)=size_int
2197 size_variables_blr_struc_t(i1)=0
2198 allocate(blr_struc%DIAG_BLOCKS(size_array1)
2200 if (allocok .GT. 0)
THEN
2203 & total_struc_size-size_allocated
2208 & blr_struc%DIAG_BLOCKS(j1)
2209 & ,unit,myid,
"restore"
2210 & ,size_gest_diag_blocks_j1
2211 & ,size_variables_diag_blocks_j1
2212 & ,size_int, size_arith_dep
2213 & ,total_file_size,total_struc_size
2214 & ,size_read,size_allocated,size_written
2216 size_gest_diag_blocks=size_gest_diag_blocks+
2217 & size_gest_diag_blocks_j1
2218 size_variables_diag_blocks=
2219 & size_variables_diag_blocks+
2220 & size_variables_diag_blocks_j1
2225 nbrecords_blr_struc_t(i1)=1
2226 if(trim(mode).EQ.
"memory_save")
then
2227 size_variables_blr_struc_t(i1)=size_int
2228 elseif(trim(mode).EQ.
"save")
then
2229 size_variables_blr_struc_t(i1)=size_int
2230 write(unit,iostat=err) blr_struc%NFS4FATHER
2236 IF ( info(1) .LT. 0 )
GOTO 100
2237 elseif(trim(mode).EQ.
"restore")
then
2238 size_variables_blr_struc_t(i1)=size_int
2239 read(unit,iostat=err) blr_struc%NFS4FATHER
2245 IF (info(1) .LT. 0 )
GOTO 100
2248 if(trim(mode).EQ.
"restore")
then
2249 nullify(blr_struc%M_ARRAY)
2253 if(trim(mode).EQ.
"memory_save")
then
2254 nbsubrecords=int(size_variables_blr_struc_t(i1)/huge(i4))
2255 IF(nbsubrecords.GT.0)
then
2256 nbrecords_blr_struc_t(i1)=nbrecords_blr_struc_t
2259 elseif(trim(mode).EQ.
"save")
then
2260 size_written=size_written+size_variables_blr_struc_t(i1)
2261 & +int(size_gest_blr_struc_t(i1),kind=8)
2262#if !defined(MUMPS_F2003)
2263 size_written=size_written
2264 & +int(2*size_int*nbrecords_blr_struc_t(i1),kind=8)
2266 elseif(trim(mode).EQ.
"restore")
then
2267 size_allocated=size_allocated+
2268 & size_variables_blr_struc_t(i1)
2269 size_read=size_read+size_variables_blr_struc_t(i1)
2270 & +int(size_gest_blr_struc_t(i1),kind=8)
2271#if !defined(MUMPS_F2003)
2273 & +int(2*size_int*nbrecords_blr_struc_t(i1),kind=8)
2277 if(trim(mode).EQ.
"memory_save")
then
2278 local_size_variables=sum(size_variables_blr_struc_t
2279 & +size_variables_panels_l
2280 & +size_variables_panels_u
2281 & +size_variables_cb_lrb
2282 & +size_variables_diag_blocks
2283 local_size_gest=sum(size_gest_blr_struc_t)
2284 & +size_gest_panels_l
2285 & +size_gest_panels_u
2287 & +size_gest_diag_blocks
2288#if !defined(MUMPS_F2003)
2289 local_nbrecords=sum(nbrecords_blr_struc_t)
2290 local_size_gest=local_size_gest+2*size_int*local_nbrecords
2298 & ,Local_SIZE_GEST,Local_SIZE_VARIABLES
2299 & ,SIZE_INT, SIZE_ARITH_DEP, SIZE_LOGICAL
2300 & ,TOTAL_FILE_SIZE,TOTAL_STRUC_SIZE
2301 & ,size_read,size_allocated,size_written
2305 INTEGER,
intent(IN)::unit,MYID
2306 CHARACTER(len=*),
intent(IN) :: mode
2307 INTEGER,
INTENT(OUT) :: Local_SIZE_GEST
2308 INTEGER(8),
intent(OUT) :: Local_SIZE_VARIABLES
2309 INTEGER,
intent(INOUT):: INFO(2)
2310 INTEGER,
intent(IN):: SIZE_INT, SIZE_ARITH_DEP, SIZE_LOGICAL
2311 INTEGER(8),
intent(IN) :: TOTAL_FILE_SIZE,TOTAL_STRUC_SIZE
2312 INTEGER(8),
intent(INOUT):: size_read,size_allocated,size_written
2313 INTEGER :: NBVARIABLES_LRB_TYPE
2314 parameter(nbvariables_lrb_type = 6)
2315 CHARACTER(len=30),
dimension(NBVARIABLES_LRB_TYPE)::
2316 & variables_lrb_type
2317 CHARACTER(len=30) :: TMP_STRING
2318 INTEGER(8),
dimension(NBVARIABLES_LRB_TYPE)::
2319 & SIZE_VARIABLES_LRB_TYPE
2320 INTEGER,
dimension(NBVARIABLES_LRB_TYPE)::
2322 INTEGER,
dimension(NBVARIABLES_LRB_TYPE)::
2323 & NbRecords_LRB_TYPE
2324 INTEGER:: size_array1,size_array2,dummy,allocok
2325 INTEGER:: err,i1,NbSubRecords,Local_NbRecords
2327 variables_lrb_type(1)=
"Q"
2328 variables_lrb_type(2)=
"R"
2329 variables_lrb_type(3)=
"K"
2330 variables_lrb_type(4)=
"M"
2331 variables_lrb_type(5)=
"N"
2332 variables_lrb_type(6)=
"ISLR"
2333 size_variables_lrb_type(:)=0_8
2334 size_gest_lrb_type(:)=0
2335 nbrecords_lrb_type(:)=0
2336 DO i1=1,nbvariables_lrb_type
2337 tmp_string = variables_lrb_type(i1)
2338 SELECT CASE(tmp_string)
2340 nbrecords_lrb_type(i1)=2
2341 if(trim(mode).EQ.
"memory_save")
then
2342 IF(
associated(lrb_t%Q))
THEN
2343 size_gest_lrb_type(i1)=size_int*2
2344 size_variables_lrb_type(i1)=
2345 &
size(lrb_t%Q,1)*
size(lrb_t%Q,2)
2348 size_gest_lrb_type(i1)=size_int*3
2349 size_variables_lrb_type(i1)=0
2351 elseif(trim(mode).EQ.
"save")
then
2352 IF(
associated(lrb_t%Q))
THEN
2353 size_gest_lrb_type(i1)=size_int*2
2354 size_variables_lrb_type(i1)=
2355 &
size(lrb_t%Q,1)*
size(lrb_t%Q,2)
2357 write(unit,iostat=err)
size(lrb_t%Q,1),
size(lrb_t%Q,2)
2363 IF ( info(1) .LT. 0 )
GOTO 300
2364 write(unit,iostat=err) lrb_t%Q
2366 size_gest_lrb_type(i1)=size_int*3
2367 size_variables_lrb_type(i1)=0
2368 write(unit,iostat=err) -999,-998
2374 IF ( info(1) .LT. 0 )
GOTO 300
2375 write(unit,iostat=err) -999
2382 IF ( info(1) .LT. 0 )
GOTO 300
2383 elseif(trim(mode).EQ.
"restore")
then
2385 read(unit,iostat=err) size_array1,size_array2
2391 IF ( info(1) .LT. 0 )
GOTO 300
2392 if(size_array1.EQ.-999)
then
2393 size_gest_lrb_type(i1)=size_int*3
2394 size_variables_lrb_type(i1)=0
2395 read(unit,iostat=err) dummy
2397 size_gest_lrb_type(i1)=size_int*2
2398 size_variables_lrb_type(i1)=
2399 & size_array1*size_array2*size_arith_dep
2400 allocate(lrb_t%Q(size_array1,size_array2),
2402 if (allocok .GT. 0)
THEN
2405 & total_struc_size-size_allocated
2408 read(unit,iostat=err) lrb_t%Q
2410 IF ( info(1) .LT. 0 )
GOTO 300
2416 IF ( info(1) .LT. 0 )
GOTO 300
2419 nbrecords_lrb_type(i1)=2
2420 if(trim(mode).EQ.
"memory_save")
then
2421 IF(
associated(lrb_t%R))
THEN
2422 size_gest_lrb_type(i1)=size_int*2
2423 size_variables_lrb_type(i1)=
2424 &
size(lrb_t%R,1)*
size(lrb_t%R,2)
2427 size_gest_lrb_type(i1)=size_int*3
2428 size_variables_lrb_type(i1)=0
2430 elseif(trim(mode).EQ.
"save")
then
2431 IF(
associated(lrb_t%R))
THEN
2432 size_gest_lrb_type(i1)=size_int*2
2433 size_variables_lrb_type(i1)=
2434 &
size(lrb_t%R,1)*
size(lrb_t%R,2)
2436 write(unit,iostat=err)
size(lrb_t%R,1),
size(lrb_t%R,2)
2442 IF ( info(1) .LT. 0 )
GOTO 300
2443 write(unit,iostat=err) lrb_t%R
2445 size_gest_lrb_type(i1)=size_int*3
2446 size_variables_lrb_type(i1)=0
2447 write(unit,iostat=err) -999,-998
2453 IF ( info(1) .LT. 0 )
GOTO 300
2454 write(unit,iostat=err) -999
2461 IF ( info(1) .LT. 0 )
GOTO 300
2462 elseif(trim(mode).EQ.
"restore")
then
2464 read(unit,iostat=err) size_array1,size_array2
2470 IF ( info(1) .LT. 0 )
GOTO 300
2471 if(size_array1.EQ.-999)
then
2472 size_gest_lrb_type(i1)=size_int*3
2473 size_variables_lrb_type(i1)=0
2474 read(unit,iostat=err) dummy
2476 size_gest_lrb_type(i1)=size_int*2
2477 size_variables_lrb_type(i1)=
2478 & size_array1*size_array2*size_arith_dep
2479 allocate(lrb_t%R(size_array1,size_array2),
2481 if (allocok .GT. 0)
THEN
2484 & total_struc_size-size_allocated
2487 read(unit,iostat=err) lrb_t%R
2489 IF ( info(1) .LT. 0 )
GOTO 300
2495 IF ( info(1) .LT. 0 )
GOTO 300
2498 nbrecords_lrb_type(i1)=1
2499 if(trim(mode).EQ.
"memory_save")
then
2500 size_variables_lrb_type(i1)=size_int
2501 elseif(trim(mode).EQ.
"save")
then
2502 size_variables_lrb_type(i1)=size_int
2503 write(unit,iostat=err) lrb_t%K
2509 IF ( info(1) .LT. 0 )
GOTO 300
2510 elseif(trim(mode).EQ.
"restore")
then
2511 size_variables_lrb_type(i1)=size_int
2512 read(unit,iostat=err) lrb_t%K
2518 IF ( info(1) .LT. 0 )
GOTO 300
2521 nbrecords_lrb_type(i1)=1
2522 if(trim(mode).EQ.
"memory_save")
then
2523 size_variables_lrb_type(i1)=size_int
2524 elseif(trim(mode).EQ.
"save")
then
2525 size_variables_lrb_type(i1)=size_int
2526 write(unit,iostat=err) lrb_t%M
2532 IF ( info(1) .LT. 0 )
GOTO 300
2533 elseif(trim(mode).EQ.
"restore")
then
2534 size_variables_lrb_type(i1)=size_int
2535 read(unit,iostat=err) lrb_t%M
2541 IF ( info(1) .LT. 0 )
GOTO 300
2544 nbrecords_lrb_type(i1)=1
2545 if(trim(mode).EQ.
"memory_save")
then
2546 size_variables_lrb_type(i1)=size_int
2547 elseif(trim(mode).EQ.
"save")
then
2548 size_variables_lrb_type(i1)=size_int
2549 write(unit,iostat=err) lrb_t%N
2555 IF ( info(1) .LT. 0 )
GOTO 300
2556 elseif(trim(mode).EQ.
"restore")
then
2557 size_variables_lrb_type(i1)=size_int
2558 read(unit,iostat=err) lrb_t%N
2564 IF ( info(1) .LT. 0 )
GOTO 300
2567 nbrecords_lrb_type(i1)=1
2568 if(trim(mode).EQ.
"memory_save")
then
2569 size_variables_lrb_type(i1)=size_logical
2570 elseif(trim(mode).EQ.
"save")
then
2571 size_variables_lrb_type(i1)=size_logical
2572 write(unit,iostat=err) lrb_t%ISLR
2578 IF ( info(1) .LT. 0 )
GOTO 300
2579 elseif(trim(mode).EQ.
"restore")
then
2580 size_variables_lrb_type(i1)=size_logical
2581 read(unit,iostat=err) lrb_t%ISLR
2587 IF ( info(1) .LT. 0 )
GOTO 300
2591 if(trim(mode).EQ.
"memory_save")
then
2592 nbsubrecords=int(size_variables_lrb_type(i1)/huge(i4))
2593 IF(nbsubrecords.GT.0)
then
2594 nbrecords_lrb_type(i1)=
2595 & nbrecords_lrb_type(i1)
2598 elseif(trim(mode).EQ.
"save")
then
2599 size_written=size_written+size_variables_lrb_type(i1)
2600 & +int(size_gest_lrb_type(i1),kind=8)
2601#if !defined(MUMPS_F2003)
2602 size_written=size_written
2603 & +int(2*size_int*nbrecords_lrb_type(i1),kind=8)
2605 elseif(trim(mode).EQ.
"restore")
then
2606 size_allocated=size_allocated+
2607 & size_variables_lrb_type(i1)
2608 size_read=size_read+size_variables_lrb_type(i1)
2609 & +int(size_gest_lrb_type(i1),kind=8)
2610#if !defined(MUMPS_F2003)
2612 & +int(2*size_int*nbrecords_lrb_type(i1),kind=8)
2616 if(trim(mode).EQ.
"memory_save")
then
2617 local_size_variables=sum(size_variables_lrb_type)
2618 local_size_gest=sum(size_gest_lrb_type)
2619#if !defined(MUMPS_F2003)
2620 local_nbrecords=sum(nbrecords_lrb_type)
2621 local_size_gest=local_size_gest+2*size_int*local_nbrecords
2629 & ,Local_SIZE_GEST,Local_SIZE_VARIABLES
2630 & ,SIZE_INT, SIZE_ARITH_DEP, SIZE_LOGICAL
2631 & ,TOTAL_FILE_SIZE,TOTAL_STRUC_SIZE
2632 & ,size_read,size_allocated,size_written
2636 INTEGER,
intent(IN)::unit,MYID
2637 CHARACTER(len=*),
intent(IN) :: mode
2638 INTEGER,
INTENT(OUT) :: Local_SIZE_GEST
2639 INTEGER(8),
intent(OUT) :: Local_SIZE_VARIABLES
2640 INTEGER,
intent(INOUT):: INFO(2)
2641 INTEGER,
intent(IN):: SIZE_INT, SIZE_ARITH_DEP, SIZE_LOGICAL
2642 INTEGER(8),
intent(IN) :: TOTAL_FILE_SIZE,TOTAL_STRUC_SIZE
2643 INTEGER(8),
intent(INOUT):: size_read,size_allocated,size_written
2644 INTEGER :: NBVARIABLES_BLR_PANEL_TYPE
2645 parameter(nbvariables_blr_panel_type = 2)
2646 CHARACTER(len=30),
dimension(NBVARIABLES_BLR_PANEL_TYPE)::
2647 & variables_blr_panel_type
2648 CHARACTER(len=30) :: TMP_STRING
2649 INTEGER(8),
dimension(NBVARIABLES_BLR_PANEL_TYPE)::
2650 & size_variables_blr_panel_type
2651 INTEGER,
dimension(NBVARIABLES_BLR_PANEL_TYPE)::
2652 & size_gest_blr_panel_type
2653 INTEGER,
dimension(NBVARIABLES_BLR_PANEL_TYPE)::
2654 & nbrecords_blr_panel_type
2655 INTEGER:: size_array1,dummy,allocok
2656 INTEGER:: err,i1,j1,NbSubRecords,Local_NbRecords
2657 INTEGER:: SIZE_GEST_LRB_PANEL_j1,SIZE_GEST_LRB_PANEL
2658 INTEGER(8)::SIZE_VARIABLES_LRB_PANEL_j1,SIZE_VARIABLES_LRB_PANEL
2660 VARIABLES_BLR_PANEL_TYPE(1)=
"NB_ACCESSES_LEFT"
2661 variables_blr_panel_type(2)=
"LRB_PANEL"
2662 size_variables_blr_panel_type(:)=0_8
2663 size_gest_blr_panel_type(:)=0
2664 nbrecords_blr_panel_type(:)=0
2665 size_gest_lrb_panel_j1=0
2666 size_gest_lrb_panel=0
2667 size_variables_lrb_panel_j1=0_8
2668 size_variables_lrb_panel=0_8
2669 DO i1=1,nbvariables_blr_panel_type
2670 tmp_string = variables_blr_panel_type(i1)
2671 SELECT CASE(tmp_string)
2672 CASE(
"NB_ACCESSES_LEFT")
2673 nbrecords_blr_panel_type(i1)=1
2674 if(trim(mode).EQ.
"memory_save")
then
2675 size_variables_blr_panel_type(i1)=size_int
2676 elseif(trim(mode).EQ.
"save")
then
2677 size_variables_blr_panel_type(i1)=size_int
2678 write(unit,iostat=err) blr_panel_t%NB_ACCESSES_LEFT
2684 IF ( info(1) .LT. 0 )
GOTO 400
2685 elseif(trim(mode).EQ.
"restore")
then
2686 size_variables_blr_panel_type(i1)=size_int
2687 read(unit,iostat=err) blr_panel_t%NB_ACCESSES_LEFT
2693 IF ( info(1) .LT. 0 )
GOTO 400
2696 if(trim(mode).EQ.
"memory_save")
then
2697 IF(
associated(blr_panel_t%LRB_PANEL))
THEN
2698 nbrecords_blr_panel_type(i1)=1
2699 size_gest_blr_panel_type(i1)=size_int
2700 size_variables_blr_panel_type(i1
2701 DO j1=1,
size(blr_panel_t%LRB_PANEL,1)
2703 & blr_panel_t%LRB_PANEL(j1)
2704 & ,unit,myid,
"memory_save"
2705 & ,size_gest_lrb_panel_j1
2706 & ,size_variables_lrb_panel_j1
2707 & ,size_int, size_arith_dep, size_logical
2708 & ,total_file_size,total_struc_size
2709 & ,size_read,size_allocated,size_written
2711 size_gest_lrb_panel=size_gest_lrb_panel+
2712 & size_gest_lrb_panel_j1
2713 size_variables_lrb_panel=size_variables_lrb_panel+
2714 & size_variables_lrb_panel_j1
2717 nbrecords_blr_panel_type(i1)=2
2718 size_gest_blr_panel_type(i1)=size_int*2
2719 size_variables_blr_panel_type(i1)=0
2721 elseif(trim(mode).EQ.
"save")
then
2722 IF(
associated(blr_panel_t%LRB_PANEL))
THEN
2723 nbrecords_blr_panel_type(i1)=1
2724 size_gest_blr_panel_type(i1)=size_int
2725 size_variables_blr_panel_type(i1)=0
2726 write(unit,iostat=err)
size(blr_panel_t%LRB_PANEL,1)
2732 IF ( info(1) .LT. 0 )
GOTO 400
2733 DO j1=1,
size(blr_panel_t%LRB_PANEL,1)
2735 & blr_panel_t%LRB_PANEL(j1)
2737 & ,size_gest_lrb_panel_j1
2738 & ,size_variables_lrb_panel_j1
2739 & ,size_int, size_arith_dep, size_logical
2740 & ,total_file_size,total_struc_size
2741 & ,size_read,size_allocated,size_written
2743 IF ( info(1) .LT. 0 )
GOTO 400
2746 nbrecords_blr_panel_type(i1)=2
2747 size_gest_blr_panel_type(i1)=size_int*2
2748 size_variables_blr_panel_type(i1)=0
2749 write(unit,iostat=err) -999
2755 IF ( info(1) .LT. 0 )
GOTO 400
2756 write(unit,iostat=err) -999
2762 IF ( info(1) .LT. 0 )
GOTO 400
2764 elseif(trim(mode).EQ.
"restore")
then
2765 nullify(blr_panel_t%LRB_PANEL)
2766 read(unit,iostat=err) size_array1
2772 IF ( info(1) .LT. 0 )
GOTO 400
2773 if(size_array1.EQ.-999)
then
2774 nbrecords_blr_panel_type(i1)=2
2775 size_gest_blr_panel_type(i1)=size_int*2
2776 size_variables_blr_panel_type(i1)=0
2777 read(unit,iostat=err) dummy
2783 IF ( info(1) .LT. 0 )
GOTO 400
2785 nbrecords_blr_panel_type(i1)=1
2786 size_gest_blr_panel_type(i1)=size_int
2787 size_variables_blr_panel_type(i1)=0
2788 allocate(blr_panel_t%LRB_PANEL(size_array1)
2790 if (allocok .GT. 0)
THEN
2793 & total_struc_size-size_allocated
2798 & blr_panel_t%LRB_PANEL(j1)
2799 & ,unit,myid,
"restore"
2800 & ,size_gest_lrb_panel_j1
2801 & ,size_variables_lrb_panel_j1
2802 & ,size_int, size_arith_dep, size_logical
2803 & ,total_file_size,total_struc_size
2804 & ,size_read,size_allocated,size_written
2806 size_gest_lrb_panel=size_gest_lrb_panel+
2807 & size_gest_lrb_panel_j1
2808 size_variables_lrb_panel=size_variables_lrb_panel+
2809 & size_variables_lrb_panel_j1
2815 if(trim(mode).EQ.
"memory_save")
then
2816 nbsubrecords=int(size_variables_blr_panel_type(i1)/huge(i4))
2817 IF(nbsubrecords.GT.0)
then
2818 nbrecords_blr_panel_type(i1)=
2819 & nbrecords_blr_panel_type(i1)
2822 elseif(trim(mode).EQ.
"save")
then
2823 size_written=size_written+size_variables_blr_panel_type(i1)
2824 & +int(size_gest_blr_panel_type(i1),kind=8)
2825#if !defined(MUMPS_F2003)
2826 size_written=size_written
2827 & +int(2*size_int*nbrecords_blr_panel_type(i1),kind=8)
2829 elseif(trim(mode).EQ.
"restore")
then
2830 size_allocated=size_allocated+
2831 & size_variables_blr_panel_type(i1)
2832 size_read=size_read+size_variables_blr_panel_type(i1)
2833 & +int(size_gest_blr_panel_type(i1),kind=8)
2834#if !defined(MUMPS_F2003)
2836 & +int(2*size_int*nbrecords_blr_panel_type(i1),kind=8)
2840 if(trim(mode).EQ.
"memory_save")
then
2841 local_size_variables=sum(size_variables_blr_panel_type)+
2842 & size_variables_lrb_panel
2843 local_size_gest=sum(size_gest_blr_panel_type)+
2844 & size_gest_lrb_panel
2845#if !defined(MUMPS_F2003)
2846 local_nbrecords=sum(nbrecords_blr_panel_type)
2847 local_size_gest=local_size_gest+2*size_int*local_nbrecords
2855 & ,Local_SIZE_GEST,Local_SIZE_VARIABLES
2856 & ,SIZE_INT, SIZE_ARITH_DEP
2857 & ,TOTAL_FILE_SIZE,TOTAL_STRUC_SIZE
2858 & ,size_read,size_allocated,size_written
2862 INTEGER,
intent(IN)::unit,MYID
2863 CHARACTER(len=*),
intent(IN) :: mode
2864 INTEGER,
INTENT(OUT) :: Local_SIZE_GEST
2865 INTEGER(8),
intent(OUT) :: Local_SIZE_VARIABLES
2866 INTEGER,
intent(INOUT):: INFO(2)
2867 INTEGER,
intent(IN):: SIZE_INT, SIZE_ARITH_DEP
2868 INTEGER(8),
intent(IN) :: TOTAL_FILE_SIZE,TOTAL_STRUC_SIZE
2869 INTEGER(8),
intent(INOUT):: size_read,size_allocated,size_written
2870 INTEGER :: NBVARIABLES_DIAG_BLOCK_TYPE
2871 parameter(nbvariables_diag_block_type = 1)
2872 CHARACTER(len=30),
dimension(NBVARIABLES_DIAG_BLOCK_TYPE)::
2873 & variables_diag_block_type
2874 CHARACTER(len=30) :: TMP_STRING
2875 INTEGER(8),
dimension(NBVARIABLES_DIAG_BLOCK_TYPE)::
2876 & size_variables_diag_block_type
2877 INTEGER,
dimension(NBVARIABLES_DIAG_BLOCK_TYPE)::
2878 & SIZE_GEST_DIAG_BLOCK_TYPE
2879 INTEGER,
dimension(NBVARIABLES_DIAG_BLOCK_TYPE)::
2880 & nbrecords_diag_block_type
2881 INTEGER:: size_array1,dummy,allocok
2882 INTEGER:: err,i1,NbSubRecords,Local_NbRecords
2884 variables_diag_block_type(1)=
"DIAG_BLOCK"
2885 size_variables_diag_block_type(:)=0_8
2886 size_gest_diag_block_type(:)=0
2887 nbrecords_diag_block_type(:)=0
2888 DO i1=1,nbvariables_diag_block_type
2889 tmp_string = variables_diag_block_type(i1)
2890 SELECT CASE(tmp_string)
2892 nbrecords_diag_block_type(i1)=2
2893 if(trim(mode).EQ.
"memory_save")
then
2894 IF(
associated(diag_block_t%DIAG_BLOCK))
THEN
2895 size_gest_diag_block_type(i1)=size_int
2896 size_variables_diag_block_type(i1)=
2897 &
size(diag_block_t%DIAG_BLOCK,1)
2900 size_gest_diag_block_type(i1)=size_int*2
2901 size_variables_diag_block_type(i1)=0
2903 elseif(trim(mode).EQ.
"save")
then
2904 IF(
associated(diag_block_t%DIAG_BLOCK))
THEN
2905 size_gest_diag_block_type(i1)=size_int
2906 size_variables_diag_block_type(i1)=
2907 &
size(diag_block_t%DIAG_BLOCK,1)
2909 write(unit,iostat=err)
size(diag_block_t%DIAG_BLOCK,1)
2915 IF ( info(1) .LT. 0 )
GOTO 200
2916 write(unit,iostat=err) diag_block_t%DIAG_BLOCK
2918 size_gest_diag_block_type(i1)=size_int*2
2919 size_variables_diag_block_type(i1)=0
2920 write(unit,iostat=err) -999
2926 IF ( info(1) .LT. 0 )
GOTO 200
2927 write(unit,iostat=err) -999
2934 IF ( info(1) .LT. 0 )
GOTO 200
2935 elseif(trim(mode).EQ.
"restore")
then
2936 nullify(diag_block_t%DIAG_BLOCK)
2937 read(unit,iostat=err) size_array1
2943 IF ( info(1) .LT. 0 )
GOTO 200
2944 if(size_array1.EQ.-999)
then
2945 size_gest_diag_block_type(i1)=size_int*2
2946 size_variables_diag_block_type(i1)=0
2947 read(unit,iostat=err) dummy
2949 size_gest_diag_block_type(i1)=size_int
2950 size_variables_diag_block_type(i1)=
2951 & size_array1*size_arith_dep
2952 allocate(diag_block_t%DIAG_BLOCK(size_array1),
2954 if (allocok .GT. 0)
THEN
2957 & total_struc_size-size_allocated
2961 read(unit,iostat=err) diag_block_t%DIAG_BLOCK
2972 if(trim(mode).EQ.
"memory_save")
then
2973 nbsubrecords=int(size_variables_diag_block_type(i1)/
2975 IF(nbsubrecords.GT.0)
then
2976 nbrecords_diag_block_type(i1)=
2977 & nbrecords_diag_block_type(i1)
2980 elseif(trim(mode).EQ.
"save")
then
2981 size_written=size_written+size_variables_diag_block_type(i1)
2982 & +int(size_gest_diag_block_type(i1),kind=8)
2983#if !defined(MUMPS_F2003)
2984 size_written=size_written
2985 & +int(2*size_int*nbrecords_diag_block_type(i1),kind=8)
2987 elseif(trim(mode).EQ.
"restore")
then
2988 size_allocated=size_allocated+
2989 & size_variables_diag_block_type(i1)
2990 size_read=size_read+size_variables_diag_block_type(i1)
2991 & +int(size_gest_diag_block_type(i1),kind=8)
2992#if !defined(MUMPS_F2003)
2994 & +int(2*size_int*nbrecords_diag_block_type(i1),kind=8)
2998 if(trim(mode).EQ.
"memory_save")
then
2999 local_size_variables=sum(size_variables_diag_block_type)
3000 local_size_gest=sum(size_gest_diag_block_type)
3001#if !defined(MUMPS_F2003)
3002 local_nbrecords=sum(nbrecords_diag_block_type)
3003 local_size_gest=local_size_gest+2*size_int*local_nbrecords