Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* How to 'install' the CPML - and why?
@ 1999-06-05  4:00 Paavo Hartikainen
  1999-06-11  4:00 ` rsimpson
  0 siblings, 1 reply; 4+ messages in thread
From: Paavo Hartikainen @ 1999-06-05  4:00 UTC (permalink / raw)


I decided to post this message as I have not found any documentation about
getting CPML installed. Hopefully this helps someone. :)

To get Compaq Portable Math Library or general information about it, look
at 'http://www.unix.digital.com/linux/cpml.htm'.

After looking at various documents and asking around some, I managed to
get libcpml installed. It was not really all that difficult but I was not
even sure if 'ld' was the right tool for this. I have never used 'ld'
manually as 'gcc' or 'egcc' has done all that automatically. Another
completely new thing to me was 'ar'. If I did something wrong, please make
corrections. This is basically how I did it:

  mv cpml.0.1.tar.gz /usr/src/
  cd /usr/src/
  tar -xzvf cpml.0.1.tar.gz
  cd cpml.0.1/
  less README
  ar -x libcpml.a
  ld -shared -o libcpml.so *.o
  strip libcpml.so
  mv /lib/libm-2.0.7.so /lib/original_libm-2.0.7.so
  mv libcpml.so /bin/libm-2.0.7.so
  mv cpml.h /usr/include/


These are rough figures of performance increase that libcpml gives,
compared to libm performance. Test program was highly floating point
intensive (and it shows)... I wonder what this would look like if I had
256 KB of external cache installed, instead of none. CPU is DECchip 21066
at 166 MHz.

Performance of setiathome with libm:

 from 42.351471% to 43.795975% (=1.444504%)

  real    98m59.366s
  user    98m29.390s
  sys     0m8.154s

 from 46.461174% to 47.247684% (=0.78651%)

  real    54m49.109s
  user    53m53.102s
  sys     0m12.188s

Performance of setiathome with libcpml:

 from 43.795975% to 46.461174% (=2.665199%)

  real    87m50.483s
  user    86m36.263s
  sys     0m15.474s

 from 47.247684% to 48.941975% (=1.694291%)

  real    56m28.780s
  user    55m31.695s
  sys     0m12.246s


Ok, what does all this mean? Seti@home client was about twice as fast on
looking for data sent by someone out there, when libm was replaced by
libcpml.

--
 "pienena   /  Paavo "Rainbow Rat" Hartikainen
  minusta  /  E-mail: pahartik@sci.fi
  tulee   /  URL: http://www.sci.fi/~pahartik/
  rotta" /  EFnet: pahartik at #Atari and #LionKing






^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to 'install' the CPML - and why?
  1999-06-05  4:00 How to 'install' the CPML - and why? Paavo Hartikainen
@ 1999-06-11  4:00 ` rsimpson
  1999-06-12  4:00   ` Riku Anttila
  0 siblings, 1 reply; 4+ messages in thread
From: rsimpson @ 1999-06-11  4:00 UTC (permalink / raw)


Wow, this certainly works.  However I note the following.

1) On my system I "only" get about a 20% speed increase.

2) Completely replacing libm-6.1 with cpml doesn't work.  It breaks
various codes including gimp.  Creative use of LD_LIBRARY_PATH fixes
the problem.

Can anyone dream up a way of getting the improved cpml functions into
libm without removing whatever it is that gimp relies on?

-- 
Richard Simpson
Farnborough, Hants, Uk                 Fax: 01252 392118
rsimpson@ewrcsdra.Cut_This_Out.demon.co.uk
I am not aware of any views shared by myself and my employers.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to 'install' the CPML - and why?
  1999-06-11  4:00 ` rsimpson
@ 1999-06-12  4:00   ` Riku Anttila
  1999-06-15  4:00     ` rsimpson
  0 siblings, 1 reply; 4+ messages in thread
From: Riku Anttila @ 1999-06-12  4:00 UTC (permalink / raw)


> 2) Completely replacing libm-6.1 with cpml doesn't work.  It breaks
> various codes including gimp.  Creative use of LD_LIBRARY_PATH fixes
> the problem.

Many other applications are affected as well. What do you mean by creative
use of LD_LIBRARY_PATH? Did you figure a way to fix the problem for good?
I made a small script that links libm.so.6.1 to the desired math library,
but I have to use it manually every time I want to change.

-- 
Send e-mail to rixa at cc dot tut dot fi.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to 'install' the CPML - and why?
  1999-06-12  4:00   ` Riku Anttila
@ 1999-06-15  4:00     ` rsimpson
  0 siblings, 0 replies; 4+ messages in thread
From: rsimpson @ 1999-06-15  4:00 UTC (permalink / raw)


Riku Anttila <rixa@looksignatureforaddress.tut.fi> wrote:
:> 2) Completely replacing libm-6.1 with cpml doesn't work.  It breaks
:> various codes including gimp.  Creative use of LD_LIBRARY_PATH fixes
:> the problem.

: Many other applications are affected as well. What do you mean by creative
: use of LD_LIBRARY_PATH? Did you figure a way to fix the problem for good?
: I made a small script that links libm.so.6.1 to the desired math library,
: but I have to use it manually every time I want to change.

1) Create a directory containing the shared version of cpml renamed to be
(for example) /usr/local/lib/cpml/libm.so.6.1

2) setenv LD_LIBRARY_PATH /usr/local/lib/cpml:$LD_LIBRARY_PATH

3) setiathome

You could put staged 2 & 3 together in a simple script.  When an applications starts
it searches for shared libraries in the directories pointed to by LD_LIBRARY_PATH
before looking in the system defaults (e.g. /lib).

To check that it is working use strace to watch what files are being opened.

-- 
Richard Simpson
Farnborough, Hants, Uk                 Fax: 01252 392118
rsimpson@ewrcsdra.Cut_This_Out.demon.co.uk
I am not aware of any views shared by myself and my employers.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-06-15  4:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-06-05  4:00 How to 'install' the CPML - and why? Paavo Hartikainen
1999-06-11  4:00 ` rsimpson
1999-06-12  4:00   ` Riku Anttila
1999-06-15  4:00     ` rsimpson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox