mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-21 11:03:29 +01:00
Fixes #353: allows more than 2 TB machines
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
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
|
||||
|
||||
* 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)
|
||||
* 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)
|
||||
* Documentation [![Documentation Status](https://readthedocs.org/projects/quantum-package/badge/?version=master)](https://quantum-package.readthedocs.io/en/master/?badge=master)
|
||||
* 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)
|
||||
* 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*8, parameter :: KB = 1024
|
||||
integer*8, parameter :: GiB = 1024**3
|
||||
integer*8 :: kb_read
|
||||
integer, external :: getUnitAndOpen
|
||||
|
||||
iunit = getUnitAndOpen('/proc/meminfo','r')
|
||||
@ -170,8 +171,8 @@ integer function get_total_available_memory() result(res)
|
||||
do
|
||||
read(iunit, '(A)', END=10) line
|
||||
if (line(1:10) == "MemTotal: ") then
|
||||
read(line(11:), *, ERR=20) res
|
||||
res = int((res*KB) / GiB,4)
|
||||
read(line(11:), *, ERR=20) kb_read
|
||||
res = int((kb_read*KB) / GiB,4)
|
||||
exit
|
||||
20 continue
|
||||
end if
|
||||
|
Loading…
Reference in New Issue
Block a user