Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp =================================================================== --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp (revision 12577) +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/modules/Solverx/SolverxGsl.cpp (revision 12578) @@ -42,7 +42,12 @@ gsl_vector_view b; gsl_vector *x = NULL; gsl_permutation *p = NULL; - +#ifdef _HAVE_ADOLC_ + // if we use Adol-C then the IssmDouble will be an adouble + // and the calls to gsl_... will not work + // and we should call a suitable wrapped solve instead + _error2_("SolverxGsl: should not be here with Adol-C"); +#else /*A will be modified by LU decomposition. Use copy*/ IssmDouble* Acopy = xNew(n*n); xMemCpy(Acopy,A,n*n); @@ -69,4 +74,5 @@ gsl_permutation_free(p); gsl_vector_free(x); *pX=X; +#endif }/*}}}*/