# Large amount of memory used, when dmrg runs on cluster

**URL:** <https://itensor.discourse.group/t/large-amount-of-memory-used-when-dmrg-runs-on-cluster/1045>\
**Category:** ITensor Julia Questions\
**Tags:** dmrg\
**Created:** [July 21, 2023, 10:07am UTC](https://itensor.discourse.group/t/large-amount-of-memory-used-when-dmrg-runs-on-cluster/1045 "2023-07-21T10:07:16Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![asing](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@asing](https://itensor.discourse.group/u/asing)\
**Post date:** [July 21, 2023, 10:07am UTC](https://itensor.discourse.group/t/large-amount-of-memory-used-when-dmrg-runs-on-cluster/1045/1 "2023-07-21T10:07:16Z")

</div>

I am performing a DMRG calculation for finite size cluster with OBC.  
I have finished various calculations using OpenMP and setting an approximate RAM requirement on my institute’s cluster.  
However, now I had to move to a different cluster and I am noticing the amount of RAM required there is much more than I observed previously.  
I am using an updated version of ITensor (v0.3.37) and Julia(1.9.2) on this new cluster.

I used the SizeObserver function to check the size of the projected operator and wave function on the new cluster.

```auto
After sweep 16, |psi| = 542.764 MiB, |PH| = 1.150 GiB
After sweep 16 energy=-29.729138431488366 maxlinkdim=1000 maxerr=1.44E-29 time=1019.273

```

My question is that If the memory used by a dmrg code is approximately 2Gb, then how much RAM would you expect the cpu to use?  
The reason I am asking this question is that when I finished this calculation on my old cluster it took a maximum of 14Gb (vmem) to finish the calculation with 8 cpus (the information I got from the resources used data). However, on the new cluster, the calculation took 80Gb (Max RSS) with 4 cpus.

I used the new functionality of julia “–heap-size-hint=x Gb”, it does help but compared to the older cluster memory used is still quite high.

The additional difference is the old cluster used PBS queue system and I asked for the following resources:  
#PBS -l select=1:ncpus=4:ompthreads=4:mem=35G:vmem=40G

and the new cluster uses slurm where for the same calculation I have to ask for :  
#SBATCH --mem-per-cpu=30G.

It will be helpful if you could help me understand this drastic difference.  
Thank you

---

_[View the full topic](https://itensor.discourse.group/t/large-amount-of-memory-used-when-dmrg-runs-on-cluster/1045)._
