Changeset 13501
- Timestamp:
- 10/02/12 14:15:21 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/IoModel.cpp
r13445 r13501 212 212 int numberofvertices; 213 213 int dummy; 214 char* driver=NULL; 214 215 215 216 … … 225 226 #ifdef _HAVE_ADOLC_ 226 227 227 /*Start the trace: */ 228 trace_on(1); 229 230 /*build dataset made of independent objects: */ 228 /*Start the trace: {{{ 229 * to do so, figure out what kind of driver we are running. Then, according to ADOLC documentation, 230 * we'll need to activate keep. 231 * 232 * From ADOLC userdoc: 233 * The optional integer argument keep of trace on determines whether the numerical values of all active variables are 234 * recorded in a buffered temporary array or file called the taylor stack. This option takes effect if keep = 1 and 235 * prepares the scene for an immediately following gradient evaluation by a call to a routine implementing the reverse 236 * mode as described in the Section 4 and Section 5. 237 * 238 */ 239 this->FetchData(&driver,AutodiffDriverEnum); 240 if (strlen(driver)<=3){ 241 /*there is no "_reverse" string within the driver string: */ 242 if(VerboseAutodiff())_pprintLine_(" trace activated with keep off"); 243 trace_on(1); 244 } 245 else{ 246 if (strcmp((const char*)(driver+3),"_reverse")==0){ 247 if(VerboseAutodiff())_pprintLine_(" trace activated with keep on"); 248 trace_on(1,1); 249 } 250 else{ 251 if(VerboseAutodiff())_pprintLine_(" trace activated with keep off"); 252 trace_on(1); 253 } 254 } 255 xDelete<char>(driver); 256 /*}}}*/ 257 /*build dataset made of independent objects: {{{*/ 231 258 this->independent_objects=new DataSet(); 232 259 this->FetchData(&num_independent_objects,AutodiffNumIndependentObjectsEnum); … … 250 277 xDelete<int>(names); 251 278 xDelete<int>(types); 252 } 279 } /*}}}*/ 280 253 281 #else 254 282 /*if we asked for AD computations, we have a problem!: */
Note:
See TracChangeset
for help on using the changeset viewer.