Arithmetic without limitations?
Paul Zimmermann
Paul.Zimmermann at loria.fr
Fri Feb 12 17:30:47 CET 2010
as promised, here are more experiments, still with GMP 5.0.1. I added a swap
file of 16GB to the computer I use (with 16GB of RAM and initially 4GB of swap)
thus I have now 16GB of RAM and 20GB of swap.
With GMP 5.0.1 I tried to multiply two numbers of 10G decimal digits, i.e.,
519051266 limbs. Each number occupies about 4GB.
After more than 6 hours of elapsed time, the computation is still running,
and top says (no other job is running on this machine):
Mem: 16475444k total, 16394992k used, 80452k free, 424k buffers
Swap: 20688996k total, 20688924k used, 72k free, 432k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3392 pzimmerm 20 0 38.7g 15g 128 D 9 96.2 101:19.42 a.out
In comparison, Bellard's "mptest" program multiplied two integers of 10G
decimal digits with only 4GB of swap and less than one hour of wall clock time:
griffon-92:~/tpi-0.9> time ./mptest.new -u -m 16G -p /tmp mul -n ntt_crt 10000M
Multiplication: limbs=519051266 size=3960.05 MB na/nb=1.000
Random a
time=2.952 s speed=1341.40 MB/s
Checksum a
time=7.368 s speed=537.43 MB/s
Random b
Checksum b
Multiplication
time=1430.053 s
tag cur local max global max (unit=4152.41 MB)
mpx 0.00 0.00 0.00 (0.00 MB)
mpt 0.00 0.00 0.00 (0.00 MB)
fft 0.00 0.00 0.00 (0.00 MB)
fftstate 0.00 0.00 0.00 (0.00 MB)
fac 0.00 0.00 0.00 (0.00 MB)
sieve 0.00 0.00 0.00 (0.00 MB)
ntt 0.00 0.00 0.00 (2.10 MB)
nttdisk 0.00 3.27 3.27 (13589.56 MB)
nttstate 0.00 0.00 0.00 (5.44 MB)
io_buf 0.00 0.06 0.06 (268.44 MB)
total 0.00 3.27 3.27 (13596.03 MB)
disk 2.00 6.37 6.37 (26447.76 MB)
disk I/O: read=23.10 write=21.11
FFT mul count=0, lost limbs=0.0%, init_count=0, remaining init=0.0%
NTT mul count=2, lost limbs=0.6%, max lost=6.089 MB
Checksum c
Cheksum OK [0x756d9cd71c874bb0]
1465.411u 574.399s 1:06:48.78 50.8% 0+0k 131423472+171221488io 44763pf+0w
Paul
More information about the gmp-devel
mailing list