Changeset 4635
- Timestamp:
- 07/16/10 15:24:25 (15 years ago)
- 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 ---- 1 diff -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 **** 7 6 * contract DE-AC04-76DP00789 and is copyrighted by Sandia Corporation. */ 8 7 9 8 #include <stdio.h> 10 +#include "defs.h"9 - #include "defs.h" 11 10 12 11 static void assign_out_normal(), assign_out_inv(); 13 12 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-070017 *************** 18 *** 4,9****19 --- 4,10 ---- 13 --- 3,8 ---- 14 diff -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 **** 20 19 21 20 #include <math.h> 22 21 #include <stdio.h> 23 +#include "defs.h"22 - #include "defs.h" 24 23 25 24 /* Finds first extended eigenpair of system corresponding to 26 25 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-070030 *************** 31 *** 6,11****32 --- 6,12 ---- 26 --- 4,9 ---- 27 diff -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 **** 33 32 code provided by Ed Rothberg at SGI. */ 34 33 35 34 #include <stdio.h> 36 +#include "defs.h"35 - #include "defs.h" 37 36 38 37 #define TRUE 1 39 38 #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 ---- 40 diff -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 **** 46 54 #define PI 3.141592653589793 47 55 #define TWOPI 6.283185307179586 48 56 #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 ---- 76 diff -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 ---- 94 diff -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 **** 80 99 DEST= ${DEST_DIR}/chaco 81 100 CC = gcc … … 88 107 ! #CFLAGS = -fPIC -fno-omit-frame-pointer -pthread -fexceptions -DMATLAB 89 108 OFLAGS = -O2 90 +#AR = /usr/ccs/bin/ar rcv # for solaris 291 +AR = /usr/bin/ar rcv92 +#RANLIB = /usr/ccs/bin/ranlib # for solaris 293 +RANLIB = /usr/bin/ranlib109 - #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 94 113 95 114 FILES.c= main/user_params.c main/interface.c main/main.c \ 96 115 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 **** 108 127 FILES.o= $(FILES.c:.c=.o) 109 128 … … 117 136 lint: 118 137 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 147 diff -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 **** 142 152 * contract DE-AC04-76DP00789 and is copyrighted by Sandia Corporation. */ 143 153 144 154 #include <stdio.h> 145 +#include "defs.h"155 - #include "defs.h" 146 156 147 157 /* Timing parameters. */ 148 158 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-0700152 *************** 153 *** 4,9****154 --- 4,10 ---- 159 --- 3,8 ---- 160 diff -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 **** 155 165 156 166 #include <stdio.h> 157 167 #include <string.h> 158 +#include "defs.h"168 - #include "defs.h" 159 169 160 170 /* Wrapper for exit() - print message and exit with status code. Exit code 161 171 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 ---- 164 176 int status; 165 177 { 166 178 extern FILE *Output_File; /* Output file or NULL */ 167 -void exit();179 + void exit(); 168 180 169 181 if (msg != NULL && (int) strlen(msg) > 0) { 170 182 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 ---- 183 diff -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 **** 179 188 180 189 #include <stdio.h> 181 190 #include <string.h> 182 +#include "defs.h"191 - #include "defs.h" 183 192 184 193 /* Debug break point. */ 185 194 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-0700189 *************** 190 *** 3,8****191 --- 3,9 ---- 195 --- 4,9 ---- 196 diff -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 **** 192 201 * contract DE-AC04-76DP00789 and is copyrighted by Sandia Corporation. */ 193 202 194 203 #include <stdio.h> 195 +#include "defs.h"204 - #include "defs.h" 196 205 197 206 /* Print a double precision number with filtering format to screen. */ 198 207 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-0700202 *************** 203 *** 4,9****204 --- 4,10 ---- 208 --- 3,8 ---- 209 diff -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 **** 205 214 206 215 #include <stdio.h> 207 216 #include <malloc.h> 208 +#include "defs.h"217 - #include "defs.h" 209 218 210 219 static int nmalloc = 0; /* number of calls to malloc */ 211 220 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-0700215 *************** 216 *** 4,9****217 --- 4,10 ---- 221 --- 4,9 ---- 222 diff -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 **** 218 227 219 228 #include <stdio.h> 220 229 #include <string.h> 221 +#include "defs.h"230 - #include "defs.h" 222 231 223 232 /* Wrapper for a printf statement with a string as only arg. 224 233 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 1 1 #!/bin/bash 2 3 #get number of CPUS 4 NUMCPUS=$1; 2 5 3 6 # Some cleanup … … 18 21 # Apply patches (all at once) 19 22 # (written by diff -rc src ~/Libs/Chaco-2.2 > chaco.patch) 20 patch - p0 < chaco.patch23 patch -R -p0 < chaco.patch 21 24 22 25 # Build chaco 23 26 cd src/code 24 make 27 make -j $NUMCPUS 28 25 29 # Clean up objects (but not library or executable) 26 30 make clean … … 33 37 cp -p src/exec/*.graph install 34 38 mkdir install/include 35 cp -p src/code/main/defs.h install/include 36 cp -p src/code/main/params.h install/include 39 cp -p src/code/main/defs.h install/include/chaco_defs.h 40 cp -p src/code/main/params.h install/include/chaco_params.h 37 41 mkdir install/lib 38 mv src/code/chaco.a install/lib 42 mv src/code/chaco.a install/lib/libchaco.a 39 43 mkdir install/exec 40 44 mv src/exec/chaco install/exec 41
Note:
See TracChangeset
for help on using the changeset viewer.