Changeset 4635


Ignore:
Timestamp:
07/16/10 15:24:25 (15 years ago)
Author:
Eric.Larour
Message:

some headers were missing defines

Location:
issm/trunk/externalpackages/chaco
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/externalpackages/chaco/chaco.patch

    r4627 r4635  
    1 diff -rc src/code/assign/assign_out.c new/code/assign/assign_out.c
    2 *** src/code/assign/assign_out.c        1995-08-08 14:32:10.000000000 -0700
    3 --- new/code/assign/assign_out.c        2010-04-06 15:51:09.378194563 -0700
    4 ***************
    5 *** 3,8 ****
    6 --- 3,9 ----
     1diff -rc src/code/assign/assign_out.c old/code/assign/assign_out.c
     2*** src/code/assign/assign_out.c        2010-07-16 15:20:47.342501437 -0700
     3--- old/code/assign/assign_out.c        1995-08-08 14:32:10.000000000 -0700
     4***************
     5*** 3,9 ****
    76   * contract DE-AC04-76DP00789 and is copyrighted by Sandia Corporation. */
    87 
    98  #include      <stdio.h>
    10 + #include      "defs.h"
     9- #include      "defs.h"
    1110 
    1211  static void assign_out_normal(), assign_out_inv();
    1312 
    14 diff -rc src/code/eigen/get_extval.c new/code/eigen/get_extval.c
    15 *** src/code/eigen/get_extval.c 1995-08-08 14:32:20.000000000 -0700
    16 --- new/code/eigen/get_extval.c 2010-04-06 15:51:09.399194588 -0700
    17 ***************
    18 *** 4,9 ****
    19 --- 4,10 ----
     13--- 3,8 ----
     14diff -rc src/code/eigen/get_extval.c old/code/eigen/get_extval.c
     15*** src/code/eigen/get_extval.c 2010-07-16 15:20:47.344501453 -0700
     16--- old/code/eigen/get_extval.c 1995-08-08 14:32:20.000000000 -0700
     17***************
     18*** 4,10 ****
    2019 
    2120  #include <math.h>
    2221  #include <stdio.h>
    23 + #include "defs.h"
     22- #include "defs.h"
    2423 
    2524  /* Finds first extended eigenpair of system corresponding to
    2625     tridiagonal T using using Rafael's bisection technique. */
    27 diff -rc src/code/klvspiff/matching.c new/code/klvspiff/matching.c
    28 *** src/code/klvspiff/matching.c        1996-03-11 10:24:25.000000000 -0800
    29 --- new/code/klvspiff/matching.c        2010-04-06 15:51:09.424194619 -0700
    30 ***************
    31 *** 6,11 ****
    32 --- 6,12 ----
     26--- 4,9 ----
     27diff -rc src/code/klvspiff/matching.c old/code/klvspiff/matching.c
     28*** src/code/klvspiff/matching.c        2010-07-16 15:20:47.347501477 -0700
     29--- old/code/klvspiff/matching.c        1996-03-11 10:24:25.000000000 -0800
     30***************
     31*** 6,12 ****
    3332     code provided by Ed Rothberg at SGI. */
    3433 
    3534  #include <stdio.h>
    36 + #include "defs.h"
     35- #include "defs.h"
    3736 
    3837  #define  TRUE  1
    3938  #define  FALSE 0
    40 diff -rc src/code/main/defs.h new/code/main/defs.h
    41 *** src/code/main/defs.h        1995-08-08 14:32:41.000000000 -0700
    42 --- new/code/main/defs.h        2010-06-15 10:43:54.039227352 -0700
    43 ***************
    44 *** 9,11 ****
    45 --- 9,28 ----
     39--- 6,11 ----
     40diff -rc src/code/main/defs.h old/code/main/defs.h
     41*** src/code/main/defs.h        2010-07-16 15:22:43.944433523 -0700
     42--- old/code/main/defs.h        1995-08-08 14:32:41.000000000 -0700
     43***************
     44*** 1,6 ****
     45- #ifndef _CHACO_DEFS_H_
     46- #define _CHACO_DEFS_H_
     47-
     48  #define       max(A, B)       ((A) > (B) ? (A) : (B))
     49  #define       min(A, B)       ((A) < (B) ? (A) : (B))
     50  #define sign(A)               ((A) <  0  ? -1  :  1)
     51--- 1,3 ----
     52***************
     53*** 12,32 ****
    4654  #define       PI      3.141592653589793
    4755  #define       TWOPI   6.283185307179586
    4856  #define HALFPI  1.570796326794896
    49 +
    50 + #ifdef MATLAB
    51 +     #include "mat.h"
    52 +     #include "mex.h"
    53 +     #include "matrix.h"
    54 +   
    55 +     #define printf mexPrintf
    56 +     #define fprintf(file,...) (file == stdout || file == stderr ? mexPrintf(__VA_ARGS__) : fprintf(file,__VA_ARGS__))
    57 +     #define malloc mxMalloc
    58 +     #define calloc mxCalloc
    59 +     #define realloc mxRealloc
    60 +     #define free mxFree
    61 +       #define exit(status) mexErrMsgTxt("exit=" #status)
    62 +
    63 + #endif
    64 + #define check_graph chaco_check_graph
    65 +
    66 diff -rc src/code/Makefile new/code/Makefile
    67 *** src/code/Makefile   1997-10-02 10:23:22.000000000 -0700
    68 --- new/code/Makefile   2010-06-15 10:35:41.507925761 -0700
    69 ***************
    70 *** 2,9 ****
    71   DEST=         ${DEST_DIR}/chaco
    72   CC =          gcc
    73   IFLAG =               -Imain
    74 ! CFLAGS =      -O2
    75   OFLAGS =      -O2
    76  
    77   FILES.c=      main/user_params.c main/interface.c main/main.c \
    78                 submain/balance.c submain/divide.c submain/submain.c \
    79 --- 2,18 ----
     57-
     58- #ifdef MATLAB
     59-     #include "mat.h"
     60-     #include "mex.h"
     61-     #include "matrix.h"
     62-   
     63-     #define printf mexPrintf
     64-     #define fprintf(file,...) (file == stdout || file == stderr ? mexPrintf(__VA_ARGS__) : fprintf(file,__VA_ARGS__))
     65-     #define malloc mxMalloc
     66-     #define calloc mxCalloc
     67-     #define realloc mxRealloc
     68-     #define free mxFree
     69-       #define exit(status) mexErrMsgTxt("exit=" #status)
     70-
     71- #endif
     72- #define check_graph chaco_check_graph
     73-
     74- #endif //ifndef _CHACO_DEFS_H_
     75--- 9,11 ----
     76diff -rc src/code/main/params.h old/code/main/params.h
     77*** src/code/main/params.h      2010-07-16 15:23:11.519653477 -0700
     78--- old/code/main/params.h      1995-08-08 14:32:43.000000000 -0700
     79***************
     80*** 1,12 ****
     81- #ifndef _CHACO_PARAMS_H_
     82- #define _CHACO_PARAMS_H_
     83-
     84-
     85  #define NAME_LENGTH   80      /* Maximum length of file name */
     86  #define LINE_LENGTH   200     /* Length of input files read at once */
     87 
     88  #define MAXDIMS               3       /* Most cuts allowed at one time */
     89  #define MAXSETS               8       /* 2^MAXDIMS */
     90-
     91-
     92- #endif //ifndef _CHACO_PARAMS_H_
     93--- 1,5 ----
     94diff -rc src/code/Makefile old/code/Makefile
     95*** src/code/Makefile   2010-07-16 15:20:47.351501509 -0700
     96--- old/code/Makefile   1997-10-02 10:23:22.000000000 -0700
     97***************
     98*** 2,18 ****
    8099  DEST=         ${DEST_DIR}/chaco
    81100  CC =          gcc
     
    88107! #CFLAGS =     -fPIC -fno-omit-frame-pointer -pthread -fexceptions -DMATLAB
    89108  OFLAGS =      -O2
    90 + #AR =             /usr/ccs/bin/ar rcv   # for solaris 2
    91 + AR =             /usr/bin/ar rcv
    92 + #RANLIB =         /usr/ccs/bin/ranlib   # for solaris 2
    93 + RANLIB =         /usr/bin/ranlib
     109- #AR =             /usr/ccs/bin/ar rcv   # for solaris 2
     110- AR =             /usr/bin/ar rcv
     111- #RANLIB =         /usr/ccs/bin/ranlib   # for solaris 2
     112- RANLIB =         /usr/bin/ranlib
    94113 
    95114  FILES.c=      main/user_params.c main/interface.c main/main.c \
    96115                submain/balance.c submain/divide.c submain/submain.c \
    97 ***************
    98 *** 90,97 ****
    99   FILES.o=      $(FILES.c:.c=.o)
    100  
    101  
    102 ! ${DEST}:      ${FILES.o} Makefile
    103 !               ${CC} ${OFLAGS} ${FILES.o} -lm -o ${DEST}
    104  
    105   lint:
    106                 lint ${IFLAG} ${FILES.c} -lm
    107 --- 99,109 ----
     116--- 2,9 ----
     117  DEST=         ${DEST_DIR}/chaco
     118  CC =          gcc
     119  IFLAG =               -Imain
     120! CFLAGS =      -O2
     121  OFLAGS =      -O2
     122 
     123  FILES.c=      main/user_params.c main/interface.c main/main.c \
     124                submain/balance.c submain/divide.c submain/submain.c \
     125***************
     126*** 99,109 ****
    108127  FILES.o=      $(FILES.c:.c=.o)
    109128 
     
    117136  lint:
    118137                lint ${IFLAG} ${FILES.c} -lm
    119 ***************
    120 *** 100,106 ****
    121                 alint ${IFLAG} ${FILES.c} -lm
    122  
    123   clean:
    124 !               rm -f */*.o ${DEST_DIR}/core
    125  
    126   .c.o:
    127                 ${CC} -c ${IFLAG} ${CFLAGS} -o $*.o $*.c
    128 --- 112,118 ----
    129                 alint ${IFLAG} ${FILES.c} -lm
    130  
    131   clean:
    132 !               rm -f */*.o ${DEST_DIR}/core
    133  
    134   .c.o:
    135                 ${CC} -c ${IFLAG} ${CFLAGS} -o $*.o $*.c
    136 diff -rc src/code/misc/timing.c new/code/misc/timing.c
    137 *** src/code/misc/timing.c      1997-01-03 09:10:52.000000000 -0800
    138 --- new/code/misc/timing.c      2010-04-06 15:51:09.480194687 -0700
    139 ***************
    140 *** 3,8 ****
    141 --- 3,9 ----
     138--- 90,97 ----
     139  FILES.o=      $(FILES.c:.c=.o)
     140 
     141 
     142! ${DEST}:      ${FILES.o} Makefile
     143!               ${CC} ${OFLAGS} ${FILES.o} -lm -o ${DEST}
     144 
     145  lint:
     146                lint ${IFLAG} ${FILES.c} -lm
     147diff -rc src/code/misc/timing.c old/code/misc/timing.c
     148*** src/code/misc/timing.c      2010-07-16 15:20:47.354501533 -0700
     149--- old/code/misc/timing.c      1997-01-03 09:10:52.000000000 -0800
     150***************
     151*** 3,9 ****
    142152   * contract DE-AC04-76DP00789 and is copyrighted by Sandia Corporation. */
    143153 
    144154  #include   <stdio.h>
    145 + #include   "defs.h"
     155- #include   "defs.h"
    146156 
    147157  /* Timing parameters. */
    148158 
    149 diff -rc src/code/util/bail.c new/code/util/bail.c
    150 *** src/code/util/bail.c        1995-08-08 14:33:01.000000000 -0700
    151 --- new/code/util/bail.c        2010-05-27 10:29:34.698534832 -0700
    152 ***************
    153 *** 4,9 ****
    154 --- 4,10 ----
     159--- 3,8 ----
     160diff -rc src/code/util/bail.c old/code/util/bail.c
     161*** src/code/util/bail.c        2010-07-16 15:20:47.356501549 -0700
     162--- old/code/util/bail.c        1995-08-08 14:33:01.000000000 -0700
     163***************
     164*** 4,10 ****
    155165 
    156166  #include      <stdio.h>
    157167  #include      <string.h>
    158 + #include      "defs.h"
     168- #include      "defs.h"
    159169 
    160170  /* Wrapper for exit() - print message and exit with status code. Exit code
    161171     of 0 indicates normal termination. Exit code of 1 indicates early
    162 ***************
    163 *** 14,20 ****
     172--- 4,9 ----
     173***************
     174*** 15,20 ****
     175--- 14,20 ----
    164176  int       status;
    165177  {
    166178      extern FILE *Output_File;         /* Output file or NULL */
    167 -     void      exit();
     179+     void      exit();
    168180 
    169181      if (msg != NULL && (int) strlen(msg) > 0) {
    170182          printf("%s\n", msg);
    171 --- 15,20 ----
    172 Only in new/code/util: bail_old.c
    173 diff -rc src/code/util/checkpnt.c new/code/util/checkpnt.c
    174 *** src/code/util/checkpnt.c    1995-08-08 14:33:01.000000000 -0700
    175 --- new/code/util/checkpnt.c    2010-04-06 15:51:09.513194728 -0700
    176 ***************
    177 *** 4,9 ****
    178 --- 4,10 ----
     183diff -rc src/code/util/checkpnt.c old/code/util/checkpnt.c
     184*** src/code/util/checkpnt.c    2010-07-16 15:20:47.358501565 -0700
     185--- old/code/util/checkpnt.c    1995-08-08 14:33:01.000000000 -0700
     186***************
     187*** 4,10 ****
    179188 
    180189  #include      <stdio.h>
    181190  #include      <string.h>
    182 + #include      "defs.h"
     191- #include      "defs.h"
    183192 
    184193  /* Debug break point. */
    185194  void      checkpnt(tag)
    186 diff -rc src/code/util/doubleout.c new/code/util/doubleout.c
    187 *** src/code/util/doubleout.c   1995-08-08 14:33:02.000000000 -0700
    188 --- new/code/util/doubleout.c   2010-04-06 15:51:09.527194745 -0700
    189 ***************
    190 *** 3,8 ****
    191 --- 3,9 ----
     195--- 4,9 ----
     196diff -rc src/code/util/doubleout.c old/code/util/doubleout.c
     197*** src/code/util/doubleout.c   2010-07-16 15:20:47.360501581 -0700
     198--- old/code/util/doubleout.c   1995-08-08 14:33:02.000000000 -0700
     199***************
     200*** 3,9 ****
    192201   * contract DE-AC04-76DP00789 and is copyrighted by Sandia Corporation. */
    193202 
    194203  #include  <stdio.h>
    195 + #include  "defs.h"
     204- #include  "defs.h"
    196205 
    197206  /* Print a double precision number with filtering format to screen. */
    198207  void      doubleout(number, mode)
    199 diff -rc src/code/util/smalloc.c new/code/util/smalloc.c
    200 *** src/code/util/smalloc.c     1996-03-11 10:44:07.000000000 -0800
    201 --- new/code/util/smalloc.c     2010-04-06 15:51:09.542194763 -0700
    202 ***************
    203 *** 4,9 ****
    204 --- 4,10 ----
     208--- 3,8 ----
     209diff -rc src/code/util/smalloc.c old/code/util/smalloc.c
     210*** src/code/util/smalloc.c     2010-07-16 15:20:47.363501605 -0700
     211--- old/code/util/smalloc.c     1996-03-11 10:44:07.000000000 -0800
     212***************
     213*** 4,10 ****
    205214 
    206215  #include <stdio.h>
    207216  #include <malloc.h>
    208 + #include "defs.h"
     217- #include "defs.h"
    209218 
    210219  static int nmalloc = 0;               /* number of calls to malloc */
    211220  static int nfree = 0;         /* number of calls to free */
    212 diff -rc src/code/util/strout.c new/code/util/strout.c
    213 *** src/code/util/strout.c      1995-08-08 14:33:05.000000000 -0700
    214 --- new/code/util/strout.c      2010-04-06 15:51:09.549194772 -0700
    215 ***************
    216 *** 4,9 ****
    217 --- 4,10 ----
     221--- 4,9 ----
     222diff -rc src/code/util/strout.c old/code/util/strout.c
     223*** src/code/util/strout.c      2010-07-16 15:20:47.365501621 -0700
     224--- old/code/util/strout.c      1995-08-08 14:33:05.000000000 -0700
     225***************
     226*** 4,10 ****
    218227 
    219228  #include      <stdio.h>
    220229  #include      <string.h>
    221 + #include      "defs.h"
     230- #include      "defs.h"
    222231 
    223232  /* Wrapper for a printf statement with a string as only arg.
    224233     Prints to screen and to output file if there is one. */
    225 Only in new/exec: chaco
     234--- 4,9 ----
  • issm/trunk/externalpackages/chaco/install.sh

    r4632 r4635  
    11#!/bin/bash
     2
     3#get number of CPUS
     4NUMCPUS=$1;
    25
    36# Some cleanup
     
    1821# Apply patches (all at once)
    1922# (written by diff -rc src ~/Libs/Chaco-2.2 > chaco.patch)
    20 patch -p0 < chaco.patch
     23patch -R -p0 < chaco.patch
    2124
    2225# Build chaco
    2326cd src/code
    24 make
     27make -j $NUMCPUS
     28
    2529# Clean up objects (but not library or executable)
    2630make clean
     
    3337cp -p src/exec/*.graph install
    3438mkdir install/include
    35 cp -p src/code/main/defs.h install/include
    36 cp -p src/code/main/params.h install/include
     39cp -p src/code/main/defs.h install/include/chaco_defs.h
     40cp -p src/code/main/params.h install/include/chaco_params.h
    3741mkdir install/lib
    38 mv src/code/chaco.a install/lib
     42mv src/code/chaco.a install/lib/libchaco.a
    3943mkdir install/exec
    4044mv src/exec/chaco install/exec
    41 
Note: See TracChangeset for help on using the changeset viewer.