mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 12:23:43 +01:00
Fixes #353: allows more than 2 TB machines
This commit is contained in:
parent
ecd6471aae
commit
48b4a8d1e2
@ -54,9 +54,9 @@ You can also look over its [archives](https://groupes.renater.fr/sympa/arc/quant
|
|||||||
|
|
||||||
# Build status
|
# Build status
|
||||||
|
|
||||||
* Master [![master build status](https://github.com/QuantumPackage/qp2/actions/workflows/compilation.yml/badge.svg)](https://github.com/QuantumPackage/qp2/actions/workflows/compilation.yml/badge.svg)
|
* Master [![master build status](https://github.com/QuantumPackage/qp2/actions/workflows/compilation.yml/badge.svg)](https://github.com/QuantumPackage/qp2/actions/workflows/compilation.yml)
|
||||||
* Development [![dev build status](https://github.com/QuantumPackage/qp2/actions/workflows/compilation.yml/badge.svg?branch=dev-stable)](https://github.com/QuantumPackage/qp2/actions/workflows/compilation.yml/badge.svg?branch=dev-stable)
|
* Development [![dev build status](https://github.com/QuantumPackage/qp2/actions/workflows/compilation.yml/badge.svg?branch=dev-stable)](https://github.com/QuantumPackage/qp2/actions/workflows/compilation.yml)
|
||||||
* Documentation [![Documentation Status](https://readthedocs.org/projects/quantum-package/badge/?version=master)](https://quantum-package.readthedocs.io/en/master/?badge=master)
|
* Documentation [![Documentation Status](https://readthedocs.org/projects/quantum-package/badge/?version=master)](https://quantum-package.readthedocs.io/en/master)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -162,6 +162,7 @@ integer function get_total_available_memory() result(res)
|
|||||||
integer :: iunit
|
integer :: iunit
|
||||||
integer*8, parameter :: KB = 1024
|
integer*8, parameter :: KB = 1024
|
||||||
integer*8, parameter :: GiB = 1024**3
|
integer*8, parameter :: GiB = 1024**3
|
||||||
|
integer*8 :: kb_read
|
||||||
integer, external :: getUnitAndOpen
|
integer, external :: getUnitAndOpen
|
||||||
|
|
||||||
iunit = getUnitAndOpen('/proc/meminfo','r')
|
iunit = getUnitAndOpen('/proc/meminfo','r')
|
||||||
@ -170,8 +171,8 @@ integer function get_total_available_memory() result(res)
|
|||||||
do
|
do
|
||||||
read(iunit, '(A)', END=10) line
|
read(iunit, '(A)', END=10) line
|
||||||
if (line(1:10) == "MemTotal: ") then
|
if (line(1:10) == "MemTotal: ") then
|
||||||
read(line(11:), *, ERR=20) res
|
read(line(11:), *, ERR=20) kb_read
|
||||||
res = int((res*KB) / GiB,4)
|
res = int((kb_read*KB) / GiB,4)
|
||||||
exit
|
exit
|
||||||
20 continue
|
20 continue
|
||||||
end if
|
end if
|
||||||
|
Loading…
Reference in New Issue
Block a user