GMP+MPFR to GPU?

Paul.Zimmermann at loria.fr Paul.Zimmermann at loria.fr
Wed Dec 8 17:34:08 CET 2010


after discussions with Marcelo Kaihara (thanks to him) I was able to reproduce
his results with openssl-1.0.0c on a 2-proc 3Ghz AMD Phenom(tm) II X2 B55:

I configured OpenSSL with GMP as follows:

$ ./Configure linux-generic64 enable-gmp -lgmp -L$GMP/lib  -I$GMP/include

then after "make depend" and "make":

   frite% apps/openssl speed rsa2048 -multi 4 -engine gmp
   WARNING: can't open config file: /usr/local/ssl/openssl.cnf
   engine "gmp" set.
   Forked child 0
   Forked child 1
   Forked child 2
   Forked child 3
   +DTP:2048:private:rsa:10
   +DTP:2048:private:rsa:10
   +DTP:2048:private:rsa:10
   +DTP:2048:private:rsa:10
   +R1:4252:2048:10.01
   +DTP:2048:public:rsa:10
   +R1:4130:2048:10.00
   +DTP:2048:public:rsa:10
   +R1:4136:2048:10.00
   +DTP:2048:public:rsa:10
   +R1:4129:2048:10.00
   +DTP:2048:public:rsa:10
   +R2:53300:2048:10.00
   +R2:54024:2048:10.01
   Got: +F2:2:2048:0.002354:0.000185 from 0
   +R2:53300:2048:10.00
   Got: +F2:2:2048:0.002418:0.000188 from 1
   +R2:55712:2048:10.00
   Got: +F2:2:2048:0.002422:0.000179 from 2
   Got: +F2:2:2048:0.002421:0.000188 from 3
   OpenSSL 1.0.0c 2 Dec 2010
   built on: Wed Dec  8 17:04:37 CET 2010
   options:bn(64,64) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(ptr) 
   compiler: gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/users/caramel/logiciels/gmp-5.0.1/x86_64/include -DTERMIO -O3 -Wall
		     sign    verify    sign/s verify/s
   rsa 2048 bits 0.000601s 0.000046s   1664.3  21630.3

and with -multi 2:

frite% apps/openssl speed rsa2048 -multi 2 -engine gmp
WARNING: can't open config file: /usr/local/ssl/openssl.cnf
engine "gmp" set.
Forked child 0
Forked child 1
+DTP:2048:private:rsa:10
+DTP:2048:private:rsa:10
+R1:8194:2048:10.00
+DTP:2048:public:rsa:10
+R1:8202:2048:10.00
+DTP:2048:public:rsa:10
+R2:107177:2048:10.00
Got: +F2:2:2048:0.001220:0.000093 from 0
+R2:105243:2048:10.00
Got: +F2:2:2048:0.001219:0.000095 from 1
OpenSSL 1.0.0c 2 Dec 2010
built on: Wed Dec  8 17:04:37 CET 2010
options:bn(64,64) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) idea(int) blowfish(ptr) 
compiler: gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -I/users/caramel/logiciels/gmp-5.0.1/x86_64/include -DTERMIO -O3 -Wall
                  sign    verify    sign/s verify/s
rsa 2048 bits 0.000610s 0.000047s   1640.0  21279.0

(with -multi 1 I get 835.4 sign/s)

The documentation says:

-multi n        run n benchmarks in parallel.

I hope this clarifies things.

Paul


More information about the gmp-devel mailing list