LAPACK Archives

[Lapack] can not print output

Dear Madam/Sir,

I have installed clapack and try to test the following simple example 
program provided in clapack website: http://www.netlib.org/clapack/faq.html
The program can be compiled but there is no output printed in the 
screen after run the executable file. Also when I write the output into a 
file, the file can not be created. Can you please help me to figure this 
out? Thank you very much.

Best,
Hanwen Huang

/* Start of Listing */

#include "stdio.h"
#include "f2c.h"
#include "clapack.h"

#define SIZE 4

void MAIN_(){}
void MAIN__(){}
void _MAIN_(){}

main( )
{
   char JOBU;
   char JOBVT;

   int i;

   integer M = SIZE;
   integer N = SIZE;

   integer LDA = M;
   integer LDU = M;
   integer LDVT = N;
   integer LWORK;
   integer INFO;

   integer mn = min( M, N );

   integer MN = max( M, N );

   double a[SIZE*SIZE] = { 16.0, 5.0, 9.0 , 4.0, 2.0, 11.0, 7.0 , 14.0, 3.0, 
10.0, 6.0, 15.0, 13.0, 8.0, 12.0, 1.0};
   double s[SIZE];
   double wk[201];
   double uu[SIZE*SIZE];
   double vt[SIZE*SIZE];

   JOBU = 'A';

   JOBVT = 'A';

   LWORK =  201;

   /* Subroutine int dgesvd_(char *jobu, char *jobvt, integer *m, integer *n,
      doublereal *a, integer *lda, doublereal *s, doublereal *u, integer *
      ldu, doublereal *vt, integer *ldvt, doublereal *work, integer *lwork,
      integer *info)
   */


   dgesvd_( &JOBU, &JOBVT, &M, &N, a, &LDA, s, uu,
      &LDU, vt, &LDVT, wk, &LWORK, &INFO);

   printf("\n INFO=%d", INFO );

   for ( i= 0; i< SIZE; i++ ) {
     printf("\n s[ %d ] = %f", i, s[ i ] );
   }

   return 0;
}

/* End of Listing */


<Prev in Thread] Current Thread [Next in Thread>
  • [Lapack] can not print output, Hanwen Huang <=


For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or