help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Re: GSL call for help


From: Mohamed Ali
Subject: Re: [Help-gsl] Re: GSL call for help
Date: Thu, 2 Jul 2009 14:25:59 +0100

I had something very similar on windows
the same code running on linux

---------------------------------

Hello,

I am using GSL on  CodeBlocks with Mingw. I have a program working in
debug mode but not release !!


gsl: ..\permutation\init.c:51: ERROR: failed to allocate space for
permutation data
Default GSL error handler invoked.

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.




void Snake::InitInternalEnergyMatrix()
{
   double a = 2 * Alpha + 6 * Beta;
   double b = - Alpha -4 * Beta;
   double c = Beta;
   try{
   gsl_matrix *InternalEnergyMatrix = gsl_matrix_calloc( Size , Size );
   for (int i=0;i<Size;i++)
   {
       gsl_matrix_set(InternalEnergyMatrix, i, i, a + 1); // May be 1 *
Gamma
       if (i<Size-1)gsl_matrix_set(InternalEnergyMatrix, i, i + 1, b);
       if (i<Size-2)gsl_matrix_set(InternalEnergyMatrix, i, i + 2, c);
       if (i>0)gsl_matrix_set(InternalEnergyMatrix, i, i - 1, b);
       if (i>1)gsl_matrix_set(InternalEnergyMatrix, i, i - 2, c);
   }
   gsl_matrix_set(InternalEnergyMatrix, 0, Size-1, b);
   gsl_matrix_set(InternalEnergyMatrix, 0, Size-2, c);
   gsl_matrix_set(InternalEnergyMatrix, 1, Size-1, c);
   gsl_matrix_set(InternalEnergyMatrix, Size-2, 0, c);
   gsl_matrix_set(InternalEnergyMatrix, Size-1, 0, b);
   gsl_matrix_set(InternalEnergyMatrix, Size-1, 1, c);
   InternalEnergyMatrixInv = gsl_matrix_calloc( Size , Size );
   gsl_permutation *p = gsl_permutation_calloc( Size );
   gsl_linalg_LU_invert ( InternalEnergyMatrix , p , InternalEnergyMatrixInv
);
   gsl_permutation_free( p );
   gsl_matrix_free( InternalEnergyMatrix );
   }
   catch(...){
       Log::Write("Snake::InitInternalEnergyMatrix",Config::FLog, 0);
   }
}


2009/7/2 Richard Henwood <address@hidden>

> Mengda Wu wrote:
>
> > You almost give nothing for people to help you. Why not
> > add some source code you are suspicious of ?
> >
>
> There was some source code attached to the (original) message I saw.
>
> I compiled this an it ran without problem on my Linux machine - so I would
> say that the problems is with the windows environment which Jiangxr is
> using
> - which is well out of my region of expertise.
>
> r,
>
> <deleted previous correspondence>
>
>
>
>
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
>



-- 
Mohamed Ali Charmi
R&D Engineer
OBMS Team
GLTrade Mena


reply via email to

[Prev in Thread] Current Thread [Next in Thread]