Ticket #57669: patch-taucs-build.2.diff

File patch-taucs-build.2.diff, 3.6 KB (added by mbrethen, 6 years ago)

Use vecLibFort for BLAS and LAPACK

  • config/darwin.mk

    old new  
    88PATHSEP=/
    99DEFFLG=-D
    1010
    11 #CC        = gcc
    12 CFLAGS    = -O3 -faltivec
     11CC        = @@CC@@
     12CFLAGS    = @@CFLAGS@@ -DBLAS_LIBRARIES=vecLibFort -DLAPACK_LIBRARIES=vecLibFort
    1313COUTFLG   = -o ./
    1414
    15 FC        = $(CC)
    16 FFLAGS    = $(CFLAGS)
     15FC        = @@FC@@
     16FFLAGS    = @@FFLAGS@@
    1717FOUTFLG   = $(COUTFLG)
    1818
    19 LD        = $(CC)
    20 LDFLAGS   = $(CFLAGS)
     19LD        = $(FC)
     20LDFLAGS   = @@LDFLAGS@@
    2121LOUTFLG   = $(COUTFLG)
    2222
    2323AR        = ar -cr
     
    2626RANLIB    = ranlib
    2727RM        = rm -rf
    2828
    29 LIBBLAS   = -framework vecLib
     29LIBBLAS   = -lvecLibFort
    3030LIBLAPACK =
    31 LIBMETIS  = -Lexternal/lib/darwin -lmetis
     31LIBMETIS  = -lmetis
    3232
    33 LIBF77 = -Lexternal/lib/darwin -lf2c
     33LIBF77 = -lf2c
    3434# crypto is for ftime, which is used by the timing routines
    3535# the documentation says its in libcompat, but on my system
    3636# there is no libcompat, but libcrypto provides it
    37 LIBC   = -lm -lcrypto
     37LIBC   =
    3838
    3939#########################################################
    4040
  • progs/taucs_blas_underscore_test.c

    old new  
    2626  dgemm_("N","N", &n,&n,&n, &alpha, &A,&ld, &B,&ld, &beta, &C,&ld);
    2727
    2828  printf("\n\n");
    29   printf("Linking with dgemm_ succedded\n");
     29  printf("Linking with dgemm_ succeeded\n");
    3030  printf("\n\n");
    3131
    3232  if (C == 97.0) {
  • progs/test_linsolve.c

    old new  
    8181  rc = taucs_linsolve(A,NULL,1, y,b,colamd,opt_arg);
    8282  if (rc == TAUCS_SUCCESS) return TAUCS_ERROR;
    8383
    84   printf("TESING SYMMETRIC ORDERINGS SUCCEDDED\n");
     84  printf("TESING SYMMETRIC ORDERINGS SUCCEEDED\n");
    8585
    8686  return TAUCS_SUCCESS;
    8787}
     
    116116  rc = taucs_linsolve(A,NULL,1, y,b,llmd,opt_arg);
    117117  if (rc == TAUCS_SUCCESS) return TAUCS_ERROR;
    118118
    119   printf("TESING SPD FACTORIZATIONS SUCCEDDED\n");
     119  printf("TESING SPD FACTORIZATIONS SUCCEEDED\n");
    120120
    121121  return TAUCS_SUCCESS;
    122122}
     
    176176  rc = taucs_linsolve(NULL,&F,0, NULL,NULL,factor,opt_arg);
    177177  if (rc != TAUCS_SUCCESS) return rc;
    178178
    179   printf("TESING SPD FACTORSOLVE SUCCEDDED\n");
     179  printf("TESING SPD FACTORSOLVE SUCCEEDED\n");
    180180
    181181  return TAUCS_SUCCESS;
    182182}
  • src/taucs_timer.c

    old new  
    245245#include <sys/time.h>
    246246#include <sys/resource.h>
    247247#include <sys/types.h>                                                 
    248 #include <sys/timeb.h>                                                 
    249248
    250249double taucs_wtime()
    251250{
    252   struct timeb T;
     251  struct timeval T;
    253252  /*static int first_time    = 1;*/
    254253  /*  static time_t start_time, time_diff;
    255       static time_t start_mill, mill_diff;
     254      static time_t start_micro, micro_diff;
    256255  */
    257256
    258257  static time_t time_diff;
    259   static time_t mill_diff;
     258  static time_t micro_diff;
    260259  /*int    rc;*/
    261260  double dt;
    262261 
    263   (void) ftime( &T );
     262  (void) gettimeofday( &T,NULL );
    264263  /*
    265264  if (first_time) {
    266265    first_time = 0;
    267     start_time = T.time;
    268     start_mill = T.millitm;
     266    start_time = T.tv_sec;
     267    start_micro = T.tv_usec;
    269268  }
    270269
    271   time_diff = T.time - start_time;
    272   mill_diff = T.millitm - start_mill;
     270  time_diff = T.tv_sec - start_time;
     271  micro_diff = T.tv_usec - start_micro;
    273272  */
    274   time_diff = T.time;
    275   mill_diff = T.millitm;
     273  time_diff = T.tv_sec;
     274  micro_diff = T.tv_usec;
    276275
    277   dt = ((double) time_diff) + (1e-3) * ((double) mill_diff);
     276  dt = ((double) time_diff) + (1e-6) * ((double) micro_diff);
    278277
    279278  return dt;
    280279}