Re: [Help-gsl] Linking error with GSL 1.15 and gsl_rng functions

2011-10-12 Thread Joseph Wakeling
Hello all, I wrote: > I'm having an unexpected linking error with code that has previously > built without problem against earlier GSL versions. This turns out to be a g++/autotools issue rather than GSL -- sorry for the noise. FWIW, the workaround I have found is to add CXXFLAGS="$CXXFLAGS -

[Help-gsl] Linking error with GSL 1.15 and gsl_rng functions

2011-10-10 Thread Joseph Wakeling
I'm having an unexpected linking error with code that has previously built without problem against earlier GSL versions. I'm using Kubuntu 11.10 with GSL 1.15, newly installed. The errors during build are as follows: /bin/b

Re: [Help-gsl] Compatibility with old and new inline functions in GSL

2010-06-04 Thread Joseph Wakeling
On 05/28/2010 08:16 PM, Peter Johansson wrote: > You could do > > AC_CHECK_HEADER([gsl/gsl_version.h], >[foo="#include "], >[foo="#define INLINE_FUN extern inline"]) > AC_SUBST(foo) > AC_CONFIG_FILES([config_public.h]) > > in configure.ac > > and have a config_pub

Re: [Help-gsl] Compatibility with old and new inline functions in GSL

2010-05-28 Thread Joseph Wakeling
On 05/28/2010 05:38 PM, Peter Johansson wrote: > It make sense as long as HAVE_GSL_INLINE is defined/undefined > accurately. If the header file is only used within your package there > should be no problem. If you install the header file it is a bit > trickier. Exactly my situation ... :-) > Then

Re: [Help-gsl] Compatibility with old and new inline functions in GSL

2010-05-28 Thread Joseph Wakeling
On 05/28/2010 04:50 AM, Peter Johansson wrote: > This is a pefect use case for autoconf. Rather than checking which GSL > version your client is using, you can implement a compilation test in > your configure checking if 'gsl/gsl_inline.h' exists. If it exists > define HAVE_GSL_INLINE and modify yo

Re: [Help-gsl] Compatibility with old and new inline functions in GSL

2010-05-27 Thread Joseph Wakeling
On 05/27/2010 07:42 PM, Rhys Ulerich wrote: > As of this particular commit > http://git.savannah.gnu.org/cgit/gsl.git/commit/?id=ffb8708d2cf636801de0b9f1f03c65a5ab0bcb13 > there's a GSL_MAJOR_VERSION and GSL_MINOR_VERSION macro defined within > gsl_version.h. I know this is in 1.14. Offhand I can

[Help-gsl] Compatibility with old and new inline functions in GSL

2010-05-27 Thread Joseph Wakeling
Hello all, A small problem I came up against while working on an extension I'm building to GSL. Later versions of GSL (1.13+ I think?) have the gsl_inline.h header, which defines various preprocessor macros with respect to inline functions -- in particular, INLINE_FUN. This allows code to be def

Re: [Help-gsl] fGSL: GSL binding for MySQL

2010-05-08 Thread Joseph Wakeling
On 05/07/2010 09:22 PM, Thomas Weber wrote: > mysql.h (and all of MySQL) is licensed under GPL2-only. > GSL (at least the latest version) is licensed under GPL3-or-later. Depends on what is being linked to -- isn't libmysql distributed under LGPL? That might(*) make things easier. Also, Sun (a

[Help-gsl] Random number generator maximum values (and 64-bit)

2010-05-05 Thread Joseph Wakeling
Hello all, A couple of days ago I installed a 64-bit Linux distro instead of a 32-bit one, and discovered an interesting bug in some C++ code I'd written. The bug comes down to this little bit of code: unsigned long int M_ul = floor(log2(ULONG_MAX-1))-1; unsigned long int M_rng = floor(l

Re: [Help-gsl] Random generator: linking problem

2009-05-11 Thread Joseph Wakeling
Marco Tului wrote: > I have read the GSL manual, and in my Makefile I wrote: > > ::: > # RANDOM_NUMBER_GENERATOR > random_generator.o: random_generator.hpp random_generator.cpp > g++ -c random_generator.cpp -lgsl -lgslcblas -lm >

Re: [Help-gsl] Re: Random number generator: compiling issue on a Mac (10.4.11)

2009-04-11 Thread Joseph Wakeling
Marco Tului wrote: > By the way, if I write instead by terminal simply "g++ -c > random_generator.cpp" I don't receive errors: it seems to be fine. How's > possible? The point is that if you use g++ -c then you are compiling the code to object form -- not linking it together to form an executable.

Re: [Help-gsl] Gsl-1.12

2009-01-27 Thread Joseph Wakeling
jan dithmer wrote: > i have problems to install gsl. I want tu use a software > that requires gsl to be installed before, but unfortunately I am > not able to install it properly on linux (ubuntu). I downloaded and unzipped > gsl-1.12 from your webpage, but if i try to configure the software prog

Re: [Help-gsl] Array sorting queries

2008-10-22 Thread Joseph Wakeling
Will Farr wrote: > There is a gsl_heapsort function (see section 11.1 of the manual) > which allows the caller to pass an arbitrary comparison function. I'll give that a go. Thanks for the suggestion! :-) ___ Help-gsl mailing list Help-gsl@gnu.org htt

[Help-gsl] Array sorting queries

2008-10-22 Thread Joseph Wakeling
Hello, A few queries about the sorting functions in GSL. I have a few different arrays which I need to sort, depending on what they are, into either ascending or descending order. Later on in the program, I will need to perform index-sorts on the same arrays -- again, respectively in either asce

[Help-gsl] Array sorting queries

2008-10-22 Thread Joseph Wakeling
Hello, A few queries about the sorting functions in GSL. I have a few different arrays which I need to sort, depending on what they are, into either ascending or descending order. Later on in the program, I will need to perform index-sorts on the same arrays -- again, respectively in either asce

Re: [Help-gsl] Building a shared library that links with GSL

2007-05-03 Thread Joseph Wakeling
Fantastic, thank you to all who replied! John D Lamb wrote: >> Secondly, do I need to reference -lgsl -lgslcblas when compiling my >> library, or can I leave this in the hands of the person compiling a >> program that makes use of it? I have created an appropriate .pc file >> for pkg-config. > >

[Help-gsl] Building a shared library that links with GSL

2007-05-02 Thread Joseph Wakeling
I'm building a small simulation library that makes use of some GSL functions. However, I'm a novice with autotools and I'm having some trouble working out how to check that GSL is installed and its header files are in place. What lines do I need to add to configure.ac to make sure that GSL is pre

Re: [Help-gsl] Linking problems with gsl

2007-04-23 Thread Joseph Wakeling
Jordi Gutierrez Hermoso wrote: > I don't understand one thing. Why are you compiling, instead of using > apt-get? The Ubuntu apt repositories only contain 1.8, I wanted to use 1.9. I'm not aware of other repositories for GSL ... ? In any case having started I wanted to understand why what I was

Re: [Help-gsl] Linking problems with gsl

2007-04-23 Thread Joseph Wakeling
Patrick Alken wrote: > Put /usr/local/lib in /etc/ld.so.conf and run "ldconfig". Then type > "ldconfig -v | grep gsl" and make sure its got an entry for libgsl - > if it does, gcc ... -lgsl -lgslcblas should work fine from any shell. Thank you very much---exactly what I was looking for! A big tha

Re: [Help-gsl] Linking problems with gsl

2007-04-23 Thread Joseph Wakeling
John Pye wrote: > That works, but it's very naughty. You should only install to /usr > indirectly, eg by creating an packaged installation such as an RPM or > DEB file. Yes, true. There's a nice explanation of why it's a bad idea here: http://hivelogic.com/narrative/articles/using_usr_local > A

Re: [Help-gsl] Linking problems with gsl

2007-04-23 Thread Joseph Wakeling
John Pye wrote: > Did you try typing > > export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib > > then running again? Damn! I knew there was something I'd forgotten. I tried an alternative route, also with success: when preparing for the install, typing, ./configure --prefix=/usr make sudo make ins

[Help-gsl] Linking problems with gsl

2007-04-23 Thread Joseph Wakeling
I've installed gsl 1.9 from source on Ubuntu 7.04 and am having trouble linking programs with the library. My Makefile includes the use of C flags -I/usr/local/include and -L/usr/local/lib along with the library calls -lgsl, -lgslcblas and -lm. However, when I attempt to run the program I still g

Re: [Help-gsl] Random number generators and Pthreads

2007-03-21 Thread Joseph Wakeling
Joseph Wakeling wrote: > Of course, in many cases it's fine to do this in a serial program and I > often do. I was wondering about the scenario outlined in the discussion > below, of using one random number generator (or an incremented sequence) > to generate seeds for the

Re: [Help-gsl] Random number generators and Pthreads

2007-03-20 Thread Joseph Wakeling
ould it be worth doing this in a _serial_ program, generating different seeds for the individual runs? Or is it better to stick with one rng for a serial program? Thanks in advance for any suggestions, -- Joe > Martin Jansche wrote: >> On 11/12/06, Joseph Wakeling <[EMAIL PROTECT

Re: [Help-gsl] Re: Random number generators and Pthreads

2006-11-16 Thread Joseph Wakeling
Rodney Sparapani wrote: > Here's my 2 cents. Independent parallel streams is a tricky problem. > I'm not an expert in this area so rather than my advice, > take a look at JE Gentle's Random Number Generation and Monte Carlo > Methods, 2nd Ed. He mentions several possible solutions and a free > so

Re: [Help-gsl] Random number generators and Pthreads

2006-11-14 Thread Joseph Wakeling
Whoops, that earlier email was meant to go to the list as well. Let's get it back on track. Martin Jansche wrote: > On 11/12/06, Joseph Wakeling <[EMAIL PROTECTED]> wrote: > >> Can you advise on appropriately seeding the rng's for different threads, >> so a

[Help-gsl] Random number generators and Pthreads

2006-11-06 Thread Joseph Wakeling
Hello all, I'm curious about the random number generators and how they can be effectively used in different situations. I'm not particularly experienced with large-scale or parallel programming, so bear with me if what follows seems stupid. My "typical" mode of use for the rng would be to create

[Help-gsl] ran2 and random walks

2006-07-07 Thread Joseph Wakeling
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm writing some code right now in which a parameter is meant to fluctuate as a random walk. I'm using ran2 as the rng. Suppose I write a simple piece of code of the form, { int i; double walk, increment; /* initialise variables */ for

Re: Fwd: [Help-gsl] random number distributions

2006-05-18 Thread Joseph Wakeling
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John D Lamb wrote: > There is nothing to stop you using two random number generators, though > you probably only need one. If you use two random number generators with > the same seed and call them equally often then the results will be > strongly corr

[Help-gsl] Uniformly distributed int in [0,n-1]

2005-12-17 Thread Joseph Wakeling
Hello all, As I mentioned in earlier emails I've been playing around a bit with the random number generators in the GSL. I'm wondering if someone can advise on appropriate ways to generate uniformly-distributed ints in the range [0,n-1]. My traditional way has always been to take a function

Re: [Help-gsl] Problems with #include options in GSL

2005-11-27 Thread Joseph Wakeling
Apologies to Martin who will be getting this mail twice. The first time I replied, I accidentally sent it to him only... Martin Jansche wrote: Note that I deliberately *don't* want to just compile to object form the whole GSL. Why not? Well, we could consider that to be merely part of my

[Help-gsl] Problems with #include options in GSL

2005-11-22 Thread Joseph Wakeling
Hello all, I recently downloaded the GSL but have been having trouble with the #include options in these files. Header include commands for GSL invariably take the form of, say, #include but the header file concerned is usually not actually located in the gsl/ directory, so the compiler fa