[11991] | 1 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install.sh
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install.sh (revision 11943)
|
---|
| 4 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install.sh (revision 11944)
|
---|
| 5 | @@ -1,18 +1,21 @@
|
---|
| 6 | #!/bin/bash
|
---|
| 7 | -#wget http://python.org/ftp/python/3.2.2/Python-3.2.2.tgz
|
---|
| 8 | +#wget http://python.org/ftp/python/version/Python-version.tgz
|
---|
| 9 |
|
---|
| 10 | +#version=3.2.2
|
---|
| 11 | +version=2.7.2
|
---|
| 12 | +
|
---|
| 13 | #Some cleanup
|
---|
| 14 | rm -rf install src
|
---|
| 15 | -rm -rf Python-3.2.2
|
---|
| 16 | +rm -rf Python-$version
|
---|
| 17 | mkdir install src
|
---|
| 18 |
|
---|
| 19 | #exports
|
---|
| 20 | export CC
|
---|
| 21 |
|
---|
| 22 | #Untar and move python into install directory
|
---|
| 23 | -tar -zxvf Python-3.2.2.tgz
|
---|
| 24 | -mv Python-3.2.2/* src
|
---|
| 25 | -rm -rf Python-3.2.2
|
---|
| 26 | +tar -zxvf Python-$version.tgz
|
---|
| 27 | +mv Python-$version/* src
|
---|
| 28 | +rm -rf Python-$version
|
---|
| 29 |
|
---|
| 30 | #Configure doxygen
|
---|
| 31 | cd src
|
---|
| 32 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx64.sh
|
---|
| 33 | ===================================================================
|
---|
| 34 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx64.sh (revision 11943)
|
---|
| 35 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx64.sh (revision 11944)
|
---|
| 36 | @@ -3,7 +3,7 @@
|
---|
| 37 | #1: install numpy
|
---|
| 38 | #2 install scipy
|
---|
| 39 | #3 erase
|
---|
| 40 | -install=1
|
---|
| 41 | +install=2
|
---|
| 42 |
|
---|
| 43 |
|
---|
| 44 | export CC=gcc
|
---|
| 45 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matlab/install.sh
|
---|
| 46 | ===================================================================
|
---|
| 47 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matlab/install.sh (revision 11943)
|
---|
| 48 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matlab/install.sh (revision 11944)
|
---|
| 49 | @@ -4,7 +4,7 @@
|
---|
| 50 | rm -rf install
|
---|
| 51 |
|
---|
| 52 | #Select or create a new simlink
|
---|
| 53 | -ln -s /usr/local/pkgs/matlab-7.6/ install
|
---|
| 54 | +#ln -s /usr/local/pkgs/matlab-7.6/ install
|
---|
| 55 | #ln -s /usr/local/matlab704/ install
|
---|
| 56 | #ln -s /usr/local/matlab711/ install
|
---|
| 57 | #ln -s /usr/local/matlab712/ install
|
---|
| 58 | @@ -14,5 +14,5 @@
|
---|
| 59 | #ln -s /Applications/MATLAB_R2008a/ install
|
---|
| 60 | #ln -s /Applications/MATLAB_R2009a.app/ install
|
---|
| 61 | #ln -s /Applications/MATLAB_R2010a.app/ install
|
---|
| 62 | -#ln -s /Applications/MATLAB_R2011b.app/ install
|
---|
| 63 | +ln -s /Applications/MATLAB_R2012a.app/ install
|
---|
| 64 | #ln -s /Applications/MATLAB*.app/ install
|
---|
| 65 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/install.sh
|
---|
| 66 | ===================================================================
|
---|
| 67 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/install.sh (revision 11943)
|
---|
| 68 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/install.sh (revision 11944)
|
---|
| 69 | @@ -1,5 +1,13 @@
|
---|
| 70 | #!/bin/bash
|
---|
| 71 |
|
---|
| 72 | +#Note of caution: stop after boostrap phase, and run
|
---|
| 73 | +#bjam --debug-configuration, to figure out which paths boost is using to include
|
---|
| 74 | +#python. make sure everyone of these paths is covered by python. If not, just make
|
---|
| 75 | +#symlinks in externalpackages/python to what boost is expecting. Ther is NO WAY
|
---|
| 76 | +#to get the boost library to include python support without doing that.
|
---|
| 77 | +
|
---|
| 78 | +
|
---|
| 79 | +
|
---|
| 80 | #Some cleanup
|
---|
| 81 | rm -rf install boost_1_49_0 src
|
---|
| 82 | mkdir install src
|
---|
| 83 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-macosx64.sh
|
---|
| 84 | ===================================================================
|
---|
| 85 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-macosx64.sh (revision 11943)
|
---|
| 86 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-macosx64.sh (revision 11944)
|
---|
| 87 | @@ -1,5 +1,9 @@
|
---|
| 88 | #!/bin/bash
|
---|
| 89 |
|
---|
| 90 | +#use matlab?
|
---|
| 91 | +matlab=0
|
---|
| 92 | +
|
---|
| 93 | +
|
---|
| 94 | #Some cleanup
|
---|
| 95 | rm -rf install triangle
|
---|
| 96 | mkdir install
|
---|
| 97 | @@ -14,7 +18,11 @@
|
---|
| 98 | cp ../makefile ./
|
---|
| 99 |
|
---|
| 100 | #Patch triangle.c
|
---|
| 101 | -patch triangle.c ../triangle.c.patch
|
---|
| 102 | +if [[ $matlab == "1" ]];then
|
---|
| 103 | + patch triangle.c ../triangle.c.patch.matlab
|
---|
| 104 | +else
|
---|
| 105 | + patch triangle.c ../triangle.c.patch.python
|
---|
| 106 | +fi
|
---|
| 107 |
|
---|
| 108 | #Compile triangle
|
---|
| 109 | make
|
---|
| 110 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.cpp
|
---|
| 111 | ===================================================================
|
---|
| 112 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.cpp (revision 11943)
|
---|
| 113 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.cpp (revision 11944)
|
---|
| 114 | @@ -42,7 +42,7 @@
|
---|
| 115 | for (i=istart; i<nrhs; i=i+2){
|
---|
| 116 | if (!mxIsClass(prhs[i],"char")) _error_("Argument %d must be name of option.",i+1);
|
---|
| 117 |
|
---|
| 118 | - FetchMatlabData(&name,prhs[i]);
|
---|
| 119 | + FetchData(&name,prhs[i]);
|
---|
| 120 | if (i+1 == nrhs) _error_("Argument %d must exist and be value of option \"%s\".",i+2,name);
|
---|
| 121 |
|
---|
| 122 | //_printf_(true," Processing option \"%s\" of class \"%s\".\n",name,mxGetClassName(prhs[i+1]));
|
---|
| 123 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/modules.h
|
---|
| 124 | ===================================================================
|
---|
| 125 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/modules.h (revision 11943)
|
---|
| 126 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/modules.h (revision 11944)
|
---|
| 127 | @@ -115,6 +115,7 @@
|
---|
| 128 | #endif
|
---|
| 129 | #include "./ThicknessAbsMisfitx/ThicknessAbsMisfitx.h"
|
---|
| 130 | #include "./ThicknessAbsGradientx/ThicknessAbsGradientx.h"
|
---|
| 131 | +#include "./TriMeshx/TriMeshx.h"
|
---|
| 132 | #include "./UpdateVertexPositionsx/UpdateVertexPositionsx.h"
|
---|
| 133 | #include "./UpdateConstraintsx/UpdateConstraintsx.h"
|
---|
| 134 | #include "./UpdateDynamicConstraintsx/UpdateDynamicConstraintsx.h"
|
---|
| 135 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp
|
---|
| 136 | ===================================================================
|
---|
| 137 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp (revision 11943)
|
---|
| 138 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp (revision 11944)
|
---|
| 139 | @@ -19,9 +19,11 @@
|
---|
| 140 |
|
---|
| 141 | /*output: */
|
---|
| 142 | double* index=NULL;
|
---|
| 143 | + Matrix* index_matrix=NULL;
|
---|
| 144 | double* x=NULL;
|
---|
| 145 | double* y=NULL;
|
---|
| 146 | double* segments=NULL;
|
---|
| 147 | + Matrix* segments_matrix=NULL;
|
---|
| 148 | double* segmentmarkerlist=NULL;
|
---|
| 149 |
|
---|
| 150 | /*intermediary: */
|
---|
| 151 | @@ -89,6 +91,7 @@
|
---|
| 152 | counter++;
|
---|
| 153 | backcounter=counter;
|
---|
| 154 | }
|
---|
| 155 | +
|
---|
| 156 |
|
---|
| 157 | /*Build regions: */
|
---|
| 158 | in.numberofregions = 0;
|
---|
| 159 | @@ -123,10 +126,13 @@
|
---|
| 160 | /* neighbor list (n). */
|
---|
| 161 |
|
---|
| 162 | sprintf(options,"%s%lf","pQzDq30ia",area); /*replace V by Q to quiet down the logging*/
|
---|
| 163 | +
|
---|
| 164 |
|
---|
| 165 | triangulate(options, &in, &out, NULL);
|
---|
| 166 | +
|
---|
| 167 | /*report(&out, 0, 1, 1, 1, 1, 0);*/
|
---|
| 168 |
|
---|
| 169 | +
|
---|
| 170 | /*Allocate index, x and y: */
|
---|
| 171 | index=(double*)xmalloc(3*out.numberoftriangles*sizeof(double));
|
---|
| 172 | x=(double*)xmalloc(out.numberofpoints*sizeof(double));
|
---|
| 173 | @@ -150,6 +156,8 @@
|
---|
| 174 | segmentmarkerlist[i]=(double)out.segmentmarkerlist[i];
|
---|
| 175 | }
|
---|
| 176 |
|
---|
| 177 | +
|
---|
| 178 | +
|
---|
| 179 | /*Associate elements with segments: */
|
---|
| 180 | AssociateSegmentToElement(&segments,out.numberofsegments,index,out.numberoftriangles);
|
---|
| 181 |
|
---|
| 182 | @@ -158,12 +166,17 @@
|
---|
| 183 | OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles);
|
---|
| 184 | }
|
---|
| 185 |
|
---|
| 186 | - printf("%i %i %i\n",out.numberoftriangles,out.numberofpoints,out.numberofsegments);
|
---|
| 187 |
|
---|
| 188 | /*Output : */
|
---|
| 189 | - *pindex=new Matrix(index,out.numberoftriangles,3,1);
|
---|
| 190 | + index_matrix=new Matrix(index,out.numberoftriangles,3,1);
|
---|
| 191 | + index_matrix->Convert(DENSE_SEQUENTIAL);
|
---|
| 192 | + *pindex=index_matrix;
|
---|
| 193 | +
|
---|
| 194 | + segments_matrix=new Matrix(segments,out.numberofsegments,3,1); segments_matrix->Convert(DENSE_SEQUENTIAL);
|
---|
| 195 | + *psegments=segments_matrix;
|
---|
| 196 | +
|
---|
| 197 | *px=new Vector(x,out.numberofpoints);
|
---|
| 198 | *py=new Vector(y,out.numberofpoints);
|
---|
| 199 | - *psegments=new Matrix(segments,out.numberofsegments,3,1);
|
---|
| 200 | *psegmentmarkerlist=new Vector(segmentmarkerlist,out.numberofsegments);
|
---|
| 201 | +
|
---|
| 202 | }
|
---|
| 203 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
|
---|
| 204 | ===================================================================
|
---|
| 205 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am (revision 11943)
|
---|
| 206 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am (revision 11944)
|
---|
| 207 | @@ -207,6 +207,9 @@
|
---|
| 208 | ./shared/Elements/GetGlobalDofList.cpp\
|
---|
| 209 | ./shared/Elements/GetNumberOfDofs.cpp\
|
---|
| 210 | ./shared/String/sharedstring.h\
|
---|
| 211 | + ./shared/Wrapper/wrappershared.h\
|
---|
| 212 | + ./shared/Wrapper/ModuleBoot.cpp\
|
---|
| 213 | + ./shared/Wrapper/ModuleEnd.cpp\
|
---|
| 214 | ./toolkits/mpi/mpiincludes.h\
|
---|
| 215 | ./toolkits/mpi/patches/mpipatches.h\
|
---|
| 216 | ./toolkits/mpi/patches/DetermineLocalSize.cpp\
|
---|
| 217 | @@ -252,6 +255,8 @@
|
---|
| 218 | ./modules/VerticesDofx/VerticesDofx.cpp\
|
---|
| 219 | ./modules/OutputResultsx/OutputResultsx.h\
|
---|
| 220 | ./modules/OutputResultsx/OutputResultsx.cpp\
|
---|
| 221 | + ./modules/TriMeshx/TriMeshx.h\
|
---|
| 222 | + ./modules/TriMeshx/TriMeshx.cpp\
|
---|
| 223 | ./modules/InputDuplicatex/InputDuplicatex.h\
|
---|
| 224 | ./modules/InputDuplicatex/InputDuplicatex.cpp\
|
---|
| 225 | ./modules/InputScalex/InputScalex.h\
|
---|
| 226 | @@ -692,10 +697,7 @@
|
---|
| 227 | #}}}
|
---|
| 228 | #Matlab sources {{{1
|
---|
| 229 | matlab_sources= ./shared/Matlab/matlabshared.h\
|
---|
| 230 | - ./shared/Matlab/ModuleBoot.cpp\
|
---|
| 231 | - ./shared/Matlab/ModuleEnd.cpp\
|
---|
| 232 | ./shared/Matlab/mxGetAssignedField.cpp\
|
---|
| 233 | - ./shared/Matlab/mxGetField.cpp\
|
---|
| 234 | ./shared/Matlab/CheckNumMatlabArguments.cpp\
|
---|
| 235 | ./toolkits/matlab/matlabincludes.h\
|
---|
| 236 | ./toolkits/matlab/MatlabNArrayToNArray.cpp\
|
---|
| 237 | @@ -707,6 +709,11 @@
|
---|
| 238 | ./io/Matlab/FetchMatlabData.cpp\
|
---|
| 239 | ./io/Matlab/OptionParse.cpp
|
---|
| 240 | #}}}
|
---|
| 241 | +#Python sources {{{1
|
---|
| 242 | +python_sources= ./io/Python/pythonio.h\
|
---|
| 243 | + ./io/Python/WritePythonData.cpp\
|
---|
| 244 | + ./io/Python/FetchPythonData.cpp
|
---|
| 245 | +#}}}
|
---|
| 246 | #Petsc sources {{{1
|
---|
| 247 | petsc_sources= ./toolkits/petsc\
|
---|
| 248 | ./toolkits/petsc/patches\
|
---|
| 249 | @@ -735,6 +742,7 @@
|
---|
| 250 | ./toolkits/petsc/patches/MatPartition.cpp\
|
---|
| 251 | ./toolkits/petsc/patches/MatInvert.cpp\
|
---|
| 252 | ./toolkits/petsc/patches/MatMultPatch.cpp\
|
---|
| 253 | + ./toolkits/petsc/patches/ISSMToPetscMatrixType.cpp\
|
---|
| 254 | ./toolkits/petsc/patches/ISSMToPetscInsertMode.cpp\
|
---|
| 255 | ./toolkits/petsc/patches/ISSMToPetscNormMode.cpp\
|
---|
| 256 | ./toolkits/petsc/petscincludes.h\
|
---|
| 257 | @@ -927,9 +935,17 @@
|
---|
| 258 | libISSM_a_SOURCES += $(serial_sources)
|
---|
| 259 | libISSM_a_SOURCES += $(bamg_sources)
|
---|
| 260 | libISSM_a_SOURCES += $(kml_sources)
|
---|
| 261 | +libISSM_a_CXXFLAGS = -fPIC -D_SERIAL_ -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_ $(CXXFLAGS) $(CXXOPTFLAGS)
|
---|
| 262 | +
|
---|
| 263 | +if PYTHON
|
---|
| 264 | +libISSM_a_CXXFLAGS+= -DNPY_NO_DEPRECATED_API
|
---|
| 265 | +libISSM_a_SOURCES += $(python_sources)
|
---|
| 266 | +endif
|
---|
| 267 | +
|
---|
| 268 | +if MATLAB
|
---|
| 269 | libISSM_a_SOURCES += $(matlab_sources)
|
---|
| 270 | +endif
|
---|
| 271 |
|
---|
| 272 | -libISSM_a_CXXFLAGS = -fPIC -DMATLAB -D_SERIAL_ -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_ $(CXXFLAGS) $(CXXOPTFLAGS)
|
---|
| 273 | endif
|
---|
| 274 | #}}}
|
---|
| 275 | #ISSM parallel library {{{1
|
---|
| 276 | Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model/petscversion.py
|
---|
| 277 | ===================================================================
|
---|
| 278 | --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model/petscversion.py (revision 11943)
|
---|
| 279 | +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model/petscversion.py (revision 11944)
|
---|
| 280 | @@ -29,7 +29,7 @@
|
---|
| 281 | break
|
---|
| 282 |
|
---|
| 283 | if tline[0:21]=="#define _PETSC_MAJOR_":
|
---|
| 284 | - PETSC_VERSION=int(tline[23])
|
---|
| 285 | + PETSC_VERSION=int(tline[22])
|
---|
| 286 | break
|
---|
| 287 |
|
---|
| 288 | tline=fid.readline()
|
---|