From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27316 invoked by alias); 19 Aug 2002 10:42:18 -0000 Mailing-List: contact gsl-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sources.redhat.com Received: (qmail 27306 invoked from network); 19 Aug 2002 10:42:17 -0000 Received: from unknown (HELO mbx.unige.ch) (129.194.8.72) by sources.redhat.com with SMTP; 19 Aug 2002 10:42:17 -0000 Received: from CONVERSION-DAEMON.mbx.unige.ch by mbx.unige.ch (PMDF V6.1-1 #38753) id <0H130000172GK9@mbx.unige.ch> for gsl-discuss@sources.redhat.com; Mon, 19 Aug 2002 12:42:16 +0200 (MEST) Received: from osiris ([129.194.40.126]) by mbx.unige.ch (PMDF V6.1-1 #38753) with ESMTP id <0H1300007727JS@mbx.unige.ch> for gsl-discuss@sources.redhat.com; Mon, 19 Aug 2002 12:42:16 +0200 (MEST) Date: Mon, 19 Aug 2002 03:42:00 -0000 From: Philippe Huber Subject: Problem with matrices bigger than 2x2 using gsl_linalg_LU_invert To: gsl-discuss@sources.redhat.com Message-id: <001101c2476d$18a7c250$7e28c281@osiris> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal X-Comment: This message was scanned against viruses by mbx.unige.ch. X-SW-Source: 2002-q3/txt/msg00149.txt.bz2 Hi all, First of all, thank you for having created such a great library. I have a small problem with gsl_linalg_LU_invert. I am using a 4x4 matrix which is not singular. I made a LU decomposition using gsl_linalg_LU_decomp. Then, I send it to gsl_linalg_LU_invert and it crashes. I tried with a 2x2 matrix and it works perfectly well. When debugging, I saw that at the third iteration (i=2) of for (i = 0; i < n; i++) { gsl_vector_view c = gsl_matrix_column (inverse, i); int status_i = gsl_linalg_LU_svx (LU, p, &(c.vector)); if (status_i) status = status_i; } inside decomp, c.vector.size=4 but, in invert, the side of x (which should be c.vector.size) is 1239492! I verified that the program also crashes with a 3x3 matrix. Is it a bug or did I make something wrong. Please apologize if I don't send my code, it is well too big. Thank you Philippe