Skip to content

Commit

Permalink
Fixes #353: allows more than 2 TB machines
Browse files Browse the repository at this point in the history
  • Loading branch information
scemama committed Oct 16, 2024
1 parent ecd6471 commit 48b4a8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)



Expand Down
5 changes: 3 additions & 2 deletions src/utils/memory.irp.f
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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
Expand Down

0 comments on commit 48b4a8d

Please sign in to comment.