Debugging a TAUCS_ERROR_NOMEM

46 views
Skip to first unread message

Carl Taylor

unread,
Oct 5, 2010, 8:24:53 PM10/5/10
to matrixpr...@googlegroups.com
Hey fun people -

I'm trying to use TAUCS for my college senior project, a semi-Langrangian fluid simulator. I'm getting a TAUCS_ERROR_NOMEM and was wondering what I can do to debug this?

My project is in C++ so that's added an extra level of problems to all this...

Here are the two most important lines code:


   /* The options for TAUCS's unified linear solver */
   char* options[] = { "taucs.solve.cg=true", NULL };

   /* RUN the TAUCS unified linear solver */
   // "matrix" is a correct taucs_ccs_matrix*
   TAUCSCode = taucs_linsolve(

      matrix, NULL, 1, pressureCol, fieldDivColumn, options, NULL);

I can post a link to the whole files if that would be helpful, but just a warning... there's a lot of code... Here's the crazy stuff I had to do at the top of this file to get TAUCS to work right in C++:


/* TAUCS_CORE_DOUBLE must be defined to use "taucs_values" instead
 * of "values" */
#ifndef WIN32
//#include <unistd.h>
//#include <pthread.h>
#endif
#define TAUCS_CORE_DOUBLE

/* This is in an extern because it is pure C code and won't work right if
 * a C++ compiler tries to compile it */
extern "C" {
    #include <taucs.h>
}

I don't know anything about the inner workings of TAUCS... Can anyone point me in the right direction?

Thanks!!

-Carl

Evgenii Rudnyi

unread,
Oct 6, 2010, 2:52:18 PM10/6/10
to matrixprogramming
taucs_linsolve is buggy. The best is to call the low level routines
directly. Look at TAUCS examples

http://matrixprogramming.com/code

With

taucs_logfile("stdout");

you get enough information about the process. Do not forget to reorder
the matrix with METIS.
Reply all
Reply to author
Forward
0 new messages