<div dir="ltr"><div><div><div>Just separating this from the <a href="http://mailman.mitgcm.org/pipermail/mitgcm-support/2018-April/011521.html">other thread</a>, I got the bundled MITgcm optim routine built (having made <a href="https://github.com/MITgcm/MITgcm/compare/master...dorugeber:optim_fix">these changes</a>, based on <a href="http://mailman.mitgcm.org/pipermail/mitgcm-support/2010-September/006825.html">this</a> thread from 2010 and <a href="http://mailman.mitgcm.org/pipermail/mitgcm-support/2016-July/010527.html">this</a> one from 2016).<br><br></div>I use OpenAD to create the adjoint.<br><br></div>My steps are:<br></div><div>1) in the build directory, run ../../../tools/genmake2 -oad -mods=../code_oad<br></div><div>2) run make depend and make adAll<br>3) copy input_oad/ into a new folder scratch/<br></div><div>4) within scratch/, run ./prepare_run<br></div><div>5) copy mitgcmuv_ad from build/ into scratch/, copy optim.x into scratch/OPTIM/<br></div><div>6) run ./mitgcmuv_ad<br></div><div>7) in scratch/OPTIM, create symlinks to ../data.optim and ../data.ctrl<br></div><div>8) copy the files ecco_cost_MIT_CE_000.opt0000 and ecco_ctrl_MIT_CE_000.opt0000 into the OPTIM subdirectory<br></div><div>9) run ./optim.x within the subdirectory<br><br></div><div>The full output is attached, but I assume the optimisation failed since the last lines are<br></div><div><div><div><br>  optimization stopped because :<br>  ifail =   4    the search direction is not a descent one<br><br></div><div>Any ideas?  (I guess this isn't something that is tested in the daily builds?)<br><br></div><div>In the meantime, I'll try the m1qn3 routine as in the other thread, which should help distinguish between a problem with the optimisation routine or the gradient generated by mitgcmuv_ad.<br><br></div><div>Andrew<br></div></div></div></div>