Ignore:
Timestamp:
Jul 7, 2018, 7:48:18 PM (6 years ago)
Author:
jvatant
Message:

Minor follow-on of r1965 - to be able to call Fortran routines with gcc compiler
you need trailing underscores. Also add prototype for safety.
--JVO

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.TITAN/libf/chimtitan/solve_lapack.c

    r1965 r1968  
    1 /* Call to LAPACKE matrix inversion dgesv */
     1/* Call to LAPACK matrix inversion dgesv */
    22/* ~60 times quicker than the Numerical Recipes standard solver */
    33/* Author : Jan Vatant d'Ollone 2018 */
     
    55#include "titan.h"
    66
     7/* DGESV prototype */
     8extern void dgesv_(int* n, int* nrhs, double* a, int* lda, int* ipiv,
     9               double* b, int* ldb, int* info);
     10
     11/*Main*/
    712void solve_lapack( double ***aa, int m, int n0, int n1 )
    813{
     
    2227   }
    2328
    24    dgesv(&n,&n,a,&n,ipiv,b,&n,&ok); /* Lapack subroutine */
     29   dgesv_(&n,&n,a,&n,ipiv,b,&n,&ok); /* Lapack subroutine */
    2530   
    2631   if( ok > 0 ) {
Note: See TracChangeset for help on using the changeset viewer.