[CPMD-list] Memory usage
Axel Kohlmeyer
axel.kohlmeyer at theochem.ruhr-uni-bochum.de
Mon Dec 13 11:05:02 CET 2004
On Mon, 13 Dec 2004, Prof. Balasubramanian Sundaram wrote:
dear axel, dear bala,
this is a quite common observation when running CPMD serially
on a 32bit operating system close to its limits.
regardless of how much memory you have actually in your machine,
your address space is (usually) limited to about 2 gigabytes
PER PROCESS (with the standard distributions). i.e. you can
make use of more physical memory (up to 64GB in theory, but
as bala pointed out, you need a 'highmem/bigmem' kernel),
but you need to run more processes for that.
the fact, that only a small part of the memory is actually used,
stems from the strategy, how CPMD allocates the memory. CPMD does
try to estimate some 'worst case scenario' for a give configuration
and then allocates the memory, or to be more precise: the kernel
reserves the address space, due to a copy-on-write strategy, the
physical memory is only used, _if_ it is written to. once you
run out of address space, you're busted, even if you use only
a part of the available physical memory.
btw, this is one of the big advantages of running athlon64
machines in 64bit mode: even if you only use them with 1 or
2 GB of physical memory, you don't have worry about running
out of address space.
as a workaround, you could actually try to run in parallel (using
shared memory parallelization), which works nicely, even with
only one cpu (you have the extra overhead, but at least you
should not run out of address space as easily).
but finally, you'd probably want to run on a 64-bit or a real
parallel machine.
best regards,
axel.
BS> Dear Axel,
BS> I could run your input file here on 3-CPUs of our distributed
BS> memory
BS> cluster (each node is a Pentium 4 with 1GB RAM). At step 5 of the
BS> minimization
BS> run, the process was taking 219MB of memory on each processor. So, the
BS> total
BS> job on a single CPU should take around 600MB memory or so.
BS>
BS> Oops!
BS>
BS> As I was typing this mail, I tried running this job on a single
BS> node, and
BS> it failed memory allocation. So, it could be that the code requires more
BS> memory initially to set up things (grid etc..).
BS>
BS> Have you compiled your kernel for large memory support? The .config
BS> file for your kernel should contain a line like this:
BS>
BS> CONFIG_HIGHMEM4G=y
BS>
BS> If I understand it right, standard installations of any distribution may
BS> not have
BS> turned this feature ON. So, you may have to get the source and compile
BS> it.
BS>
BS> This could be one issue.
BS>
BS> (for the record: the machine I ran it on runs kernel 2.4.22, and is from
BS> a
BS> Mandrake distribution, with compiler IFORT 8.1.018, and Intel MKL 7.0)
BS>
BS> Good Luck,
BS> Bala
BS>
BS>
BS> Axel Klix wrote:
BS> >
BS> > Dear all,
BS> >
BS> > I just installed a new PC with a RedHat 9 Linux and apparently 3GB of
BS> > memory (the specs say it has 4GB, though...)
BS> > I'm trying to run the attached problem, however, I cannot increase the
BS> > cut-off above 55 without having cpmd terminate and complaining about not
BS> > enough memory. However, at a cutoff of 55 it uses only 30% of the
BS> > physical memory. Can anybody help me?
BS> > Thank you very much in advance.
BS> >
BS> > Axel
BS> >
BS> > --
BS> > Axel Klix
BS> > University of Tokyo, NERL Tokaimura
BS> > Phone: +81 - (0)29-287-8918
BS> > email: aklix at utnl.jp
BS> >
BS> > ------------------------------------------------------------------------
BS> > GENERATE ATOMIC BASIS SET
BS> > Li SLATER ORBITALS
BS> > 1S ALPHA= 2.6906 OCCUPATION= 2.00
BS> > 2S ALPHA= 0.6396 OCCUPATION= 1.00
BS> > F SLATER ORBITALS
BS> > 2S ALPHA= 2.5638 OCCUPATION= 2.00
BS> > 2P ALPHA= 2.5500 OCCUPATION= 5.00
BS> > Be SLATER ORBITALS
BS> > 1S ALPHA= 3.6848 OCCUPATION= 2.00
BS> > 2S ALPHA= 0.9560 OCCUPATION= 2.00
BS> >
BS> >
BS> > INITIALIZATION TIME: 0.47 SECONDS
BS> >
BS> > *** WFOPTS| THE NEW SIZE OF THE PROGRAM IS 80104/ 857492 kBYTES ***
BS> > *** PHFAC| THE NEW SIZE OF THE PROGRAM IS 80332/1000684 kBYTES ***
BS> >
BS> > ****************************************************************
BS> > PROCESSOR 0 ALLOCATION OF 30276 WORDS OF MEMORY FAILED
BS> > ****************************************************************
BS> >
BS> > *** MEMORY| THE NEW SIZE OF THE PROGRAM IS 110796/1097716 kBYTES ***
BS> >
BS> > ================================================================
BS> > BIG MEMORY ALLOCATIONS
BS> > PME 52548080 GDE 13137020
BS> > CATOM 12110400 SCR 10542318
BS> > C0 10509608 C2 10509608
BS> > SC0 10509600 EIGR 3828000
BS> > PSI 2590058 YF 2590058
BS> > ----------------------------------------------------------------
BS> > [PEAK NUMBER 72] PEAK MEMORY 138230473 = 1105.8 MBytes
BS> > ================================================================
BS> > STOPGM! STACK OF MAIN CALLS:
BS> > STOPGM! CALL ATOMWF
BS> >
BS> > PROGRAM STOPS IN SUBROUTINE MEMORY| ALLOCATION FAILED (XXMAT)
BS> >
BS> > ------------------------------------------------------------------------
BS> > ! $Id: cpmd-init-wave.in,v 1.3 2004/04/26 15:23:09 akohlmey Exp $
BS> > ! Wavefunction optimization template for bulk 32 Water.
BS> > ! Tested with CPMD v3.7 and v3.5.
BS> >
BS> > &CPMD
BS> > OPTIMIZE WAVEFUNCTION
BS> > CONVERGENCE
BS> > 1.0e-6 1.0e-6
BS> > SPLINE POINTS
BS> > 5001
BS> > SPLINE RANGE
BS> > 5
BS> > &END
BS> >
BS> > &DFT
BS> > NEWCODE
BS> > EXCHANGE CORRELATION TABLE NO
BS> > FUNCTIONAL BLYP
BS> > GC-CUTOFF
BS> > 5.0e-6
BS> > &END
BS> >
BS> > &SYSTEM
BS> > ANGSTROM
BS> > SYMMETRY
BS> > 14
BS> > CHARGE
BS> > 0.0
BS> > CELL
BS> > 10.9473 1.0 1.0 0.0 0.0 0.0
BS> > CUTOFF
BS> > 60.0
BS> > &END
BS> > &ATOMS
BS> > ATOMIC CHARGES
BS> > 1.0
BS> > -1.0
BS> > 2.0
BS> > ISOTOPE
BS> > 6.941
BS> > 18.9984
BS> > 9.012182
BS> > *Li_GO_BLYP.psp
BS> > LMAX=S
BS> > 15
BS> > 3.7395 4.7023 5.2880
BS> > -4.3007 0.6717 2.0325
BS> > 1.1204 -4.3142 0.7210
BS> > 0.1838 2.3598 5.1773
BS> > -2.8324 -3.6128 3.8552
BS> > -2.3896 4.2000 3.4894
BS> > -0.9055 -0.2143 -4.9493
BS> > 4.1490 -3.2333 1.8712
BS> > 4.0291 1.9823 0.5018
BS> > -2.1893 2.8040 -4.5917
BS> > 2.8607 1.0325 -4.4428
BS> > 3.8112 -0.0611 2.2648
BS> > 2.0426 1.9851 2.4187
BS> > 4.9511 -0.0490 4.6450
BS> > 1.6903 -0.2590 4.1438
BS> > 0.8453 0.8729 -0.6008
BS> > 3.9615 -1.5332 -4.3083
BS> > 4.3836 3.2792 -2.4894
BS> > -5.1797 -0.1693 -0.6988
BS> > -0.0564 -1.8924 -0.9392
BS> > 5.1907 -3.9327 -4.4099
BS> > -1.7330 -2.8380 0.9947
BS> > -1.6816 2.5830 1.2386
BS> > -4.3836 -0.3883 -3.7954
BS> > -1.6039 1.4682 3.7327
BS> > -4.4973 3.9892 1.0476
BS> > 2.2193 4.2035 -1.2648
BS> > -1.5312 -4.2008 -1.3721
BS> > -4.7671 4.3727 5.3217
BS> > 3.5581 -5.3220 3.0288
BS> > 0.8686 -3.3826 4.7887
BS> > 4.7688 -5.3548 -0.2231
BS> > *F_GO_BLYP.psp
BS> > LMAX=P
BS> > 32
BS> > 2.9384 -0.2707 5.3511
BS> > -1.7432 -3.1023 -2.9361
BS> > 3.7214 1.9451 2.7214
BS> > 5.1548 0.5147 0.7282
BS> > -2.4300 2.6759 2.6609
BS> > -4.8428 -0.6781 3.1658
BS> > 0.5830 -1.2629 -2.2130
BS> > -5.4489 -2.3707 2.0324
BS> > -5.3751 1.6461 3.5073
BS> > 0.0851 -1.4624 2.4509
BS> > -1.7958 -3.0936 -5.0332
BS> > 1.7942 -4.8234 -3.0577
BS> > -4.3735 -5.4508 1.1197
BS> > 5.2709 -0.1558 -4.5622
BS> > 5.0681 -2.9553 -2.6638
BS> > -0.3609 3.7521 1.4211
BS> > 3.0015 5.1046 -4.2047
BS> > 4.1222 -4.8556 1.6792
BS> > 2.3849 -2.6677 4.5004
BS> > 3.1210 2.1711 -3.3102
BS> > 0.3751 2.2973 -4.0789
BS> > 2.0600 -2.8427 1.5683
BS> > -1.6865 -2.6303 2.7875
BS> > -0.0230 3.9390 4.3636
BS> > -3.5983 2.3561 -3.7501
BS> > -5.3493 -5.3597 -4.8328
BS> > 3.8125 4.0766 -0.9907
BS> > -2.8764 -4.0534 0.9627
BS> > 1.1443 -1.3832 0.4135
BS> > 0.9853 1.1989 4.0599
BS> > -1.8414 -0.5073 2.1419
BS> > 0.3918 -0.9389 -4.0145
BS> > -1.5278 1.3995 -5.4038
BS> > 1.4184 4.6767 0.5674
BS> > 3.8039 -4.0137 3.7978
BS> > 1.3254 -4.7789 -4.9474
BS> > 0.9703 5.4520 3.2084
BS> > -0.6571 -3.3925 -0.2431
BS> > 5.2836 3.0096 2.0130
BS> > -3.1537 -5.2690 2.5502
BS> > 4.3082 -1.8197 3.7887
BS> > -5.3375 2.5581 -2.4338
BS> > -2.9167 4.0455 5.3434
BS> > -2.5595 -1.4329 -3.9835
BS> > 5.1593 -3.9573 -0.8089
BS> > -3.0875 3.5577 0.2043
BS> > -1.5613 -0.8838 -0.0816
BS> > 2.3694 -0.8417 2.0515
BS> > 1.9676 4.2222 4.3289
BS> > -4.4987 0.7791 -2.4264
BS> > -1.1776 -1.1100 4.0711
BS> > -2.8889 0.8196 0.7193
BS> > -2.5908 2.7651 -1.5524
BS> > 4.3971 -3.0579 -5.3476
BS> > 1.4114 3.4656 2.2127
BS> > 5.4100 -1.8369 -1.2698
BS> > -2.4570 4.7557 -1.3267
BS> > -0.8807 0.9486 0.4790
BS> > 4.9774 3.5330 4.1447
BS> > -4.1363 -2.7557 3.4922
BS> > 2.2423 1.5406 0.5172
BS> > 2.0714 -1.5105 -3.4625
BS> > 0.7822 3.5936 -2.2339
BS> > 0.8637 1.6415 -2.0876
BS> >
BS> > *Be_GO_BLYP.psp
BS> > LMAX=S
BS> > 8
BS> > 0.9563 4.5709 3.9580
BS> > 1.0470 -1.2410 -3.2703
BS> > -3.4718 -4.8077 1.6256
BS> > 1.9803 -5.2278 -3.9317
BS> > -4.9224 -1.9807 2.9500
BS> > -1.1090 -1.3482 2.9843
BS> > -2.5797 3.8152 -1.1281
BS> > -1.9988 -2.5636 -3.9203
BS> > 4.9575 2.4945 3.1614
BS> > 3.6329 -2.9165 4.3622
BS> > 0.8210 3.8894 1.4386
BS> > -4.3605 1.9944 -2.9000
BS> > -1.8576 0.2069 0.5785
BS> > 5.2037 -2.8769 -1.5371
BS> > 0.6754 2.4480 -2.7575
BS> > 1.6103 -1.5842 1.3610
BS> >
BS> > &END
BS> >
BS> > ------------------------------------------------------------------------
BS> > _______________________________________________
BS> > CPMD-list mailing list
BS> > CPMD-list at cpmd.org
BS> > http://cpmd.org/mailman/listinfo/cpmd-list
BS> _______________________________________________
BS> CPMD-list mailing list
BS> CPMD-list at cpmd.org
BS> http://cpmd.org/mailman/listinfo/cpmd-list
BS>
BS>
--
=======================================================================
Dr. Axel Kohlmeyer e-mail: axel.kohlmeyer at theochem.ruhr-uni-bochum.de
Lehrstuhl fuer Theoretische Chemie Phone: ++49 (0)234/32-26673
Ruhr-Universitaet Bochum - NC 03/53 Fax: ++49 (0)234/32-14045
D-44780 Bochum http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.
More information about the CPMD-list
mailing list