[23390] | 1 | Index: ../trunk-jpl/src/c/modules/GetVectorFromControlInputsx/GetVectorFromControlInputsx.cpp
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/c/modules/GetVectorFromControlInputsx/GetVectorFromControlInputsx.cpp (revision 23251)
|
---|
| 4 | +++ ../trunk-jpl/src/c/modules/GetVectorFromControlInputsx/GetVectorFromControlInputsx.cpp (revision 23252)
|
---|
| 5 | @@ -93,7 +93,7 @@
|
---|
| 6 | }/*}}}*/
|
---|
| 7 |
|
---|
| 8 | /*For autodiff, we sometimes need to cast our vectors to passive*/
|
---|
| 9 | -#ifdef _HAVE_ADOLC_
|
---|
| 10 | +#ifdef _HAVE_AD_
|
---|
| 11 | void GetPassiveVectorFromControlInputsx(Vector<IssmPDouble>** pvector, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,const char* data){/*{{{*/
|
---|
| 12 |
|
---|
| 13 | /*Get active vector first*/
|
---|
| 14 | Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Autodiff/CreateParametersAutodiff.cpp
|
---|
| 15 | ===================================================================
|
---|
| 16 | --- ../trunk-jpl/src/c/modules/ModelProcessorx/Autodiff/CreateParametersAutodiff.cpp (revision 23251)
|
---|
| 17 | +++ ../trunk-jpl/src/c/modules/ModelProcessorx/Autodiff/CreateParametersAutodiff.cpp (revision 23252)
|
---|
| 18 | @@ -76,8 +76,9 @@
|
---|
| 19 | //fprintf(stderr, "*** Codipack CreateParametersAutodiff()\n");
|
---|
| 20 | /*initialize a placeholder to store solver pointers: {{{*/
|
---|
| 21 | /*Solver pointers depend on what type of solver we are implementing: */
|
---|
| 22 | - options=OptionsFromAnalysis(parameters,DefaultAnalysisEnum); //options database is not filled in yet, use default.
|
---|
| 23 | - ToolkitOptions::Init(options);
|
---|
| 24 | + options=OptionsFromAnalysis(&toolkit,parameters,DefaultAnalysisEnum);
|
---|
| 25 | + ToolkitOptions::Init(toolkit,options);
|
---|
| 26 | + xDelete<char>(toolkit);
|
---|
| 27 |
|
---|
| 28 | switch(IssmSolverTypeFromToolkitOptions()){
|
---|
| 29 | case MumpsEnum:{
|
---|
| 30 | Index: ../trunk-jpl/src/c/Makefile.am
|
---|
| 31 | ===================================================================
|
---|
| 32 | --- ../trunk-jpl/src/c/Makefile.am (revision 23251)
|
---|
| 33 | +++ ../trunk-jpl/src/c/Makefile.am (revision 23252)
|
---|
| 34 | @@ -50,12 +50,15 @@
|
---|
| 35 | ./modules/BamgConvertMeshx/BamgConvertMeshx.cpp\
|
---|
| 36 | ./modules/BamgTriangulatex/BamgTriangulatex.cpp
|
---|
| 37 |
|
---|
| 38 | -#do not include AmrBamg with ADOLC
|
---|
| 39 | +#do not include AmrBamg with AD
|
---|
| 40 | if ADOLC
|
---|
| 41 | else
|
---|
| 42 | +if CODIPACK
|
---|
| 43 | +else
|
---|
| 44 | issm_sources += ./classes/AmrBamg.cpp
|
---|
| 45 | endif
|
---|
| 46 | endif
|
---|
| 47 | +endif
|
---|
| 48 | #}}}
|
---|
| 49 | #Core sources{{{
|
---|
| 50 | issm_sources += ./datastructures/DataSet.cpp\
|
---|
| 51 | Index: ../trunk-jpl/src/c/cores/transient_core.cpp
|
---|
| 52 | ===================================================================
|
---|
| 53 | --- ../trunk-jpl/src/c/cores/transient_core.cpp (revision 23251)
|
---|
| 54 | +++ ../trunk-jpl/src/c/cores/transient_core.cpp (revision 23252)
|
---|
| 55 | @@ -69,7 +69,7 @@
|
---|
| 56 | femmodel->parameters->FindParam(&numoutputs,TransientNumRequestedOutputsEnum);
|
---|
| 57 | if(numoutputs) femmodel->parameters->FindParam(&requested_outputs,&numoutputs,TransientRequestedOutputsEnum);
|
---|
| 58 |
|
---|
| 59 | - #if defined(_HAVE_BAMG_) && !defined(_HAVE_ADOLC_)
|
---|
| 60 | + #if defined(_HAVE_BAMG_) && !defined(_HAVE_AD_)
|
---|
| 61 | if(amr_frequency){
|
---|
| 62 | femmodel->parameters->FindParam(&amr_restart,AmrRestartEnum);
|
---|
| 63 | if(amr_restart) femmodel->ReMesh();
|
---|
| 64 | @@ -77,7 +77,7 @@
|
---|
| 65 | #endif
|
---|
| 66 |
|
---|
| 67 | if(isoceancoupling){ /*{{{*/
|
---|
| 68 | - #ifndef _HAVE_ADOLC_
|
---|
| 69 | + #ifndef _HAVE_AD_
|
---|
| 70 | if(VerboseSolution()) _printf0_(" ocean coupling: initialization \n");
|
---|
| 71 | int my_rank;
|
---|
| 72 | ISSM_MPI_Comm tomitgcmcomm;
|
---|
| 73 | @@ -246,7 +246,7 @@
|
---|
| 74 |
|
---|
| 75 | if(isoceancoupling){ /*{{{*/
|
---|
| 76 |
|
---|
| 77 | - #ifndef _HAVE_ADOLC_
|
---|
| 78 | + #ifndef _HAVE_AD_
|
---|
| 79 | if(VerboseSolution()) _printf0_(" ocean coupling: exchanging information\n");
|
---|
| 80 | int my_rank;
|
---|
| 81 | ISSM_MPI_Comm tomitgcmcomm;
|
---|
| 82 | @@ -459,7 +459,7 @@
|
---|
| 83 | /*Adaptive mesh refinement*/
|
---|
| 84 | if(amr_frequency){
|
---|
| 85 |
|
---|
| 86 | - #if !defined(_HAVE_ADOLC_)
|
---|
| 87 | + #if !defined(_HAVE_AD_)
|
---|
| 88 | if(save_results) femmodel->WriteMeshInResults();
|
---|
| 89 | if(step%amr_frequency==0 && time<finaltime){
|
---|
| 90 | if(VerboseSolution()) _printf0_(" refining mesh\n");
|
---|
| 91 | @@ -467,7 +467,7 @@
|
---|
| 92 | }
|
---|
| 93 |
|
---|
| 94 | #else
|
---|
| 95 | - _error_("AMR not suppored with ADOLC");
|
---|
| 96 | + _error_("AMR not suppored with AD");
|
---|
| 97 | #endif
|
---|
| 98 | }
|
---|
| 99 |
|
---|
| 100 | Index: ../trunk-jpl/src/c/cores/controlm1qn3_core.cpp
|
---|
| 101 | ===================================================================
|
---|
| 102 | --- ../trunk-jpl/src/c/cores/controlm1qn3_core.cpp (revision 23251)
|
---|
| 103 | +++ ../trunk-jpl/src/c/cores/controlm1qn3_core.cpp (revision 23252)
|
---|
| 104 | @@ -10,7 +10,7 @@
|
---|
| 105 | #include "../modules/modules.h"
|
---|
| 106 | #include "../solutionsequences/solutionsequences.h"
|
---|
| 107 |
|
---|
| 108 | -#if defined (_HAVE_M1QN3_) && !defined(_HAVE_ADOLC_)
|
---|
| 109 | +#if defined (_HAVE_M1QN3_) && !defined(_HAVE_AD_)
|
---|
| 110 | /*m1qn3 prototypes*/
|
---|
| 111 | extern "C" void *ctonbe_; // DIS mode : Conversion
|
---|
| 112 | extern "C" void *ctcabe_; // DIS mode : Conversion
|
---|
| 113 | Index: ../trunk-jpl/src/c/classes/FemModel.cpp
|
---|
| 114 | ===================================================================
|
---|
| 115 | --- ../trunk-jpl/src/c/classes/FemModel.cpp (revision 23251)
|
---|
| 116 | +++ ../trunk-jpl/src/c/classes/FemModel.cpp (revision 23252)
|
---|
| 117 | @@ -2544,7 +2544,7 @@
|
---|
| 118 | /*}}}*/
|
---|
| 119 |
|
---|
| 120 | /*AMR*/
|
---|
| 121 | -#if !defined(_HAVE_ADOLC_)
|
---|
| 122 | +#ifndef _HAVE_AD_
|
---|
| 123 | void FemModel::ReMesh(void){/*{{{*/
|
---|
| 124 |
|
---|
| 125 | /*Intermediaries*/
|
---|
| 126 | Index: ../trunk-jpl/src/c/classes/IoModel.cpp
|
---|
| 127 | ===================================================================
|
---|
| 128 | --- ../trunk-jpl/src/c/classes/IoModel.cpp (revision 23251)
|
---|
| 129 | +++ ../trunk-jpl/src/c/classes/IoModel.cpp (revision 23252)
|
---|
| 130 | @@ -2634,7 +2634,7 @@
|
---|
| 131 | IssmDouble x_t(1.0), y_t(1.0);
|
---|
| 132 | tape_codi.registerInput(y_t);
|
---|
| 133 | int codi_allocn = 0;
|
---|
| 134 | - this->FetchData(&codi_allocn, AutodiffTapeAllocEnum);
|
---|
| 135 | + this->FetchData(&codi_allocn,"md.autodiff.tapeAlloc");
|
---|
| 136 | for(int i = 0;i < codi_allocn;++i) {
|
---|
| 137 | x_t = y_t * y_t;
|
---|
| 138 | }
|
---|