forum.alglib.net

ALGLIB forum
It is currently Tue Apr 16, 2024 6:44 am

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: mpfr
PostPosted: Sun Jul 20, 2014 10:20 pm 
Offline

Joined: Sun Jul 20, 2014 10:11 pm
Posts: 2
Hi,

I'd be grateful to obtain information on how to build ALGLIB mpfr. It appears the last version (2.6.0) does not build straightforwardly using the latest gcc.
Can anyone help please?

Cheers,
h


Top
 Profile  
 
 Post subject: Re: mpfr
PostPosted: Mon Jul 21, 2014 8:45 am 
Offline

Joined: Sun Jul 20, 2014 10:11 pm
Posts: 2
Solved my own problem while no one had yet replied. Here is my solution, for anyone who might find it useful:
For information about my particular linux distribution, see below (I do not have administrative rights on it).

1. Apparently gcc 4.7.0 is already based on gmp and mpfr, so copy static library file libmpfr.so.1 (and related files) from /usr/lib64 to the mpfr/mpfr/ subdirectory of the ALGLIB.MPFR root directory.
2. Execute in the mpfr/mpfr subdirectory the following command:
link libmpfr.so.1 libmpfr.so
3. Also remove the gcc option -lmpn from the compile command near the end of the script-files mpfr/check and mpfr/example.
(Apparently, libmpn.so* is no longer needed with this version of gcc.)
4. In the same compile command of the two script-files above, replace the gcc option '-L.' with '-L../mpfr -L../out' to enable the linker to locate the libmpfr.so and libmpalglib.a files.
5. You might also need to add the line:
#!/bin/sh
at the very beginning of the script-files mpfr/build, mpfr/check, and mpfr/example. Also don't forget to ensure these script-files are executable by yourself (eg., chmod a+x build, etc.)
6. You may now execute the script-files:
./build gcc
./check gcc all
./example gcc minlbfgs_1
Hope it works for you!

My system information:
uname -a
Linux gwdu101 2.6.32-431.20.3.el6.x86_64 #1 SMP Thu Jun 19 14:01:59 CDT 2014 x86_64 x86_64 x86_64 GNU/Linux

GCC version:
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/cm/shared/apps/gcc/4.7.0/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.7.0/configure --prefix=/cm/shared/apps/gcc/4.7.0 --enable-languages=c,c++,fortran --with-gmp-include=/usr/src/redhat/BUILD/gcc-4.7.0-obj/../gcc-4.7.0/our-gmp --with-gmp-lib=/usr/src/redhat/BUILD/gcc-4.7.0-obj/../gcc-4.7.0/our-gmp --with-mpc-include=/usr/src/redhat/BUILD/gcc-4.7.0-obj/../gcc-4.7.0/our-mpc/src --with-mpc-lib=/usr/src/redhat/BUILD/gcc-4.7.0-obj/../gcc-4.7.0/our-mpc/src/.libs --with-mpfr-include=/usr/src/redhat/BUILD/gcc-4.7.0-obj/../gcc-4.7.0/our-mpfr/src --with-mpfr-lib=/usr/src/redhat/BUILD/gcc-4.7.0-obj/../gcc-4.7.0/our-mpfr/src/.libs
Thread model: posix
gcc version 4.7.0 (GCC)


Cheers,
h


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group