public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* i have got a problem in using GSL random under BCB6!
@ 2003-03-28 18:26 zhuyan
  2003-03-30 15:54 ` Brian Gough
  2003-03-31 18:06 ` Using gsl_fft_halfcomplex_unpack Manoj Warrier
  0 siblings, 2 replies; 5+ messages in thread
From: zhuyan @ 2003-03-28 18:26 UTC (permalink / raw)
  To: Gsl-Discuss

here is my program
//---------------------------------------------------------------------------

#pragma hdrstop

//---------------------------------------------------------------------------
#include "stdio.h"
#include "conio.h"
#include "gsl/gsl_rng.h"
#include "gsl/gsl_randist.h"
#pragma argsused
int main(int argc, char* argv[])
{
    double* out=new double[100];
    const gsl_rng_type * T;
    gsl_rng *r;
    int i,j;
    gsl_rng_env_setup();
    T=gsl_rng_default;
    r=gsl_rng_alloc(T);
    for(i=0;i<100;i++){
        out[i]=gsl_ran_gaussian(r,1);
    }
    gsl_rng_free(r);
}
//--------------------------------------------------------------------------
it can pass the compiling but when run it ,following problem occurs:
"Project project1.exe raised exception class EAccessViolatoin with message 'Access violation at address 10061FF6. Read of address 5070260B. Process stopped."

somthing seems wrong when i trace into the gsl_rng_alloc(T); 

who can help me?is this is a bug?

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

* Re: i have got a problem in using GSL random under BCB6!
  2003-03-28 18:26 i have got a problem in using GSL random under BCB6! zhuyan
@ 2003-03-30 15:54 ` Brian Gough
  2003-03-31  8:10   ` zhuyan
  2003-03-31 18:06 ` Using gsl_fft_halfcomplex_unpack Manoj Warrier
  1 sibling, 1 reply; 5+ messages in thread
From: Brian Gough @ 2003-03-30 15:54 UTC (permalink / raw)
  To: zhuyan; +Cc: Gsl-Discuss

> From: "zhuyan" <mite98@mails.tsinghua.edu.cn>
> To: "Gsl-Discuss" <gsl-discuss@sources.redhat.com>
> Subject: i have got a problem in using GSL random under BCB6!
> Date: Thu, 27 Mar 2003 23:19:24 +0800
> 
> aGVyZSBpcyBteSBwcm9ncmFtDQovLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
> LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KDQojcHJhZ21hIGhkcnN0

I couldn't read this character set -  can you resend it in ascii. Thanks.

-- 
Brian Gough

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

* re: i have got a problem in using GSL random under BCB6!
  2003-03-30 15:54 ` Brian Gough
@ 2003-03-31  8:10   ` zhuyan
  0 siblings, 0 replies; 5+ messages in thread
From: zhuyan @ 2003-03-31  8:10 UTC (permalink / raw)
  To: Brian Gough; +Cc: Gsl-Discuss

my problem has been solved by the help of Bolek Vrany. thank you any way

> From: "zhuyan" <mite98@mails.tsinghua.edu.cn>
> To: "Gsl-Discuss" <gsl-discuss@sources.redhat.com>
> Subject: i have got a problem in using GSL random under BCB6!
> Date: Thu, 27 Mar 2003 23:19:24 +0800
> 
> aGVyZSBpcyBteSBwcm9ncmFtDQovLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
> LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KDQojcHJhZ21hIGhkcnN0

I couldn't read this character set -  can you resend it in ascii. Thanks.

-- 
Brian Gough

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

* Using gsl_fft_halfcomplex_unpack
  2003-03-28 18:26 i have got a problem in using GSL random under BCB6! zhuyan
  2003-03-30 15:54 ` Brian Gough
@ 2003-03-31 18:06 ` Manoj Warrier
  2003-04-02 21:00   ` Brian Gough
  1 sibling, 1 reply; 5+ messages in thread
From: Manoj Warrier @ 2003-03-31 18:06 UTC (permalink / raw)
  To: Gsl-Discuss

Hi.

When I use gsl_fft_halfcomplex_unpack,

The GSL Ref. Manual (first edition) and also
http://sources.redhat.com/gsl/ref/gsl-ref_15.html#SEC240,
describes it as

int gsl_fft_halfcomplex_unpack (const double halfcomplex_coefficient[],
gsl_complex_packed_array complex_coefficient[], size_t stride, size_t n)

When I use it based on the above description, I get the following
warning when I compile it (on a Linux PC, with gsl-1.2.90 compiled from
sources)
Compilation command:
gcc -c -Wall -g -I. -I/usr/include -I/home/mow/soft/include analyse_freq.c
Warning:
analyse_freq.c:190: warning: passing arg 2 of `gsl_fft_halfcomplex_unpack'
from incompatible pointer type

This warning disappears when I use "double" to define the "arg 2" instead
of gsl_complex_packed_array and I get decent (hopefully) results.

I use the following include files at the begining of my program:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_fft_real.h>
#include <gsl/gsl_fft_halfcomplex.h>
#include <gsl/gsl_complex.h>
#include <gsl/gsl_complex_math.h>
I must confess to being a recent convert to C (gcc) and to not being
able to understand the constructs in the relevant header files.

Cheers!
Manoj

Stellaratortheorie, Max-Planck Institut Fur Plasmaphysik
TeilInstitut Greifswald Wendelsteinstrasse 1
D-17491 Greifswald Germany Tel: +49-3834-882434

--------- History of Computing 10-11-3003 ---------------
Then there used to be this great user friendly OS which
overwrote your MBR whenever you installed it.
---------------------------------------------------------

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

* Re: Using gsl_fft_halfcomplex_unpack
  2003-03-31 18:06 ` Using gsl_fft_halfcomplex_unpack Manoj Warrier
@ 2003-04-02 21:00   ` Brian Gough
  0 siblings, 0 replies; 5+ messages in thread
From: Brian Gough @ 2003-04-02 21:00 UTC (permalink / raw)
  To: Manoj Warrier; +Cc: Gsl-Discuss

Manoj Warrier writes:
 > When I use gsl_fft_halfcomplex_unpack, The GSL Ref. Manual (first
 > edition) and also
 > http://sources.redhat.com/gsl/ref/gsl-ref_15.html#SEC240, describes
 > it as int gsl_fft_halfcomplex_unpack (const double
 > halfcomplex_coefficient[], gsl_complex_packed_array
 > complex_coefficient[], size_t stride, size_t n)
 > 
 > When I use it based on the above description, I get the following
 > warning when I compile it (on a Linux PC, with gsl-1.2.90 compiled
 > from sources) Compilation command: gcc -c -Wall -g
 > -I. -I/usr/include -I/home/mow/soft/include analyse_freq.c Warning:
 > analyse_freq.c:190: warning: passing arg 2 of
 > `gsl_fft_halfcomplex_unpack' from incompatible pointer type

Can you send an example program which reproduces this problem to
bug-gsl@gnu.org, with the output of gcc -v on your system. Thanks.

-- 
Brian Gough

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

end of thread, other threads:[~2003-04-02 21:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-28 18:26 i have got a problem in using GSL random under BCB6! zhuyan
2003-03-30 15:54 ` Brian Gough
2003-03-31  8:10   ` zhuyan
2003-03-31 18:06 ` Using gsl_fft_halfcomplex_unpack Manoj Warrier
2003-04-02 21:00   ` Brian Gough

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).