<div dir="ltr"><div>Using m1qn3, and having made <a href="https://github.com/dorugeber/MITgcm/commit/0a236266f0bffdfabb55338c26bf07ed1b87eb30">these changes</a> to data.optim, is the attached file reasonable output for the first iteration?<br><br></div>In particular, I'm a bit concerned by line 132:<br><div><div><br>pathei: ff 5.3046703247717040E+180<br><br></div><div>Thanks,<br></div><div>Andrew<br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 24 April 2018 at 18:06, Matthew Mazloff <span dir="ltr"><<a href="mailto:mmazloff@ucsd.edu" target="_blank">mmazloff@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;line-break:after-white-space">
Hi Andrew
<div><br>
</div>
<div>I would make sure your data.optim is compatible with optim_m1qn3. I have pasted an example here:</div>
<div><br>
</div>
<div> more ../../SOCCOM/Optim/data.optim <br>
#<br>
# ******************************<wbr>**<br>
# Off-line optimization parameters<br>
# ******************************<wbr>**<br>
&OPTIM<br>
optimcycle=124,<br>
numiter=1000,<br>
nfunc=2,<br>
fmin= 2000000000.0,<br>
iprint=10,<br>
nupdate=3,<br>
/<br>
#<br>
&M1QN3<br>
coldstart = .FALSE.,<br>
/<br>
#</div>
<div><br>
</div>
<div>And then I wouldn’t use a script that takes many steps at once. Try stepping through one step at a time and see where it fails.</div>
<div><br>
</div>
<div>Matt</div>
<div><br>
</div>
<div><br>
<div><br>
<blockquote type="cite"><div><div class="h5">
<div>On Apr 24, 2018, at 2:22 AM, Andrew McRae <<a href="mailto:andrew.mcrae@physics.ox.ac.uk" target="_blank">andrew.mcrae@physics.ox.ac.uk</a><wbr>> wrote:</div>
<br class="m_8667387611434120834Apple-interchange-newline">
</div></div><div><div><div class="h5">
<div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<div>What changes do I need to make to get this working with, e.g., tutorial_global_oce_optim?<br>
<br>
</div>
<div></div>
I have added<br>
<br>
<div> &M1QN3<br>
&end<br>
</div>
<div><br>
to data.optim, and have updated the cycsh script as the filenames there seem outdated:<br>
<br>
11c10<br>
< cp -p OPTIM/ctrlhflux_tut_MITgcm.<wbr>opt0$ii .<br>
---<br>
> cp -p OPTIM/ecco_ctrl_MIT_CE_000.<wbr>opt0$ii .<br>
27,28c26,27<br>
< mv ctrlhflux_tut_MITgcm.opt0$ii $fich $direc<br>
< mv costhflux_tut_MITgcm.opt0$ii OPTIM/<br>
---<br>
> mv ecco_ctrl_MIT_CE_000.opt0$ii $fich $direc<br>
> mv ecco_cost_MIT_CE_000.opt0$ii OPTIM/<br>
<br>
</div>
<div>but, following the instructions from 3.18.5 of the .pdf manual, the optimisation seems to fail from the second iteration onwards:<br>
<br>
Beginning of iteration 001<br>
Running mitcgm_ad: iteration 001<br>
STOP NORMAL END<br>
Cleaning<br>
rm: No match.<br>
mkdir: cannot create directory ‘runtutorial001’: File exists<br>
Line-search: iteration 001<br>
optimcycle=1,<br>
Beginning of iteration 002<br>
Running mitcgm_ad: iteration 002<br>
STOP NORMAL END<br>
Cleaning<br>
rm: No match.<br>
mkdir: cannot create directory ‘runtutorial002’: File exists<br>
Line-search: iteration 002<br>
optimcycle=2,<br>
STOP ABNORMAL in S/R OPTIM_SUB<br>
Beginning of iteration 003<br>
Running mitcgm_ad: iteration 003<br>
</div>
<div>[Ctrl+C]<br>
</div>
<div><br>
</div>
<div>The file m1qn3_output.txt is attached. I'm suspicious that lines 28-29 and 49-50 are the same; it looks like the step was never taken?<br>
<br>
</div>
<div>Thanks,<br>
</div>
<div>Andrew<br>
</div>
</div>
<div class="gmail_extra" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<br>
<div class="gmail_quote">On 16 April 2018 at 11:24, Andrew McRae<span class="m_8667387611434120834Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:andrew.mcrae@physics.ox.ac.uk" target="_blank">andrew.mcrae@physics.<wbr>ox.ac.uk</a>></span><span class="m_8667387611434120834Apple-converted-space"> </span>wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div>Thanks, this seems to work (at least, build, and the testbed files run).<br>
<br>
</div>
<div>Hopefully this 5-year old code replaces the 10-year old code in master at some point!<span class="m_8667387611434120834HOEnZb"><font color="#888888"><br>
</font></span></div>
<span class="m_8667387611434120834HOEnZb"><font color="#888888">
<div><br>
</div>
<div>Andrew<br>
</div>
</font></span>
<div>
<div class="m_8667387611434120834h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On 20 March 2018 at 19:37, Matthew Mazloff<span class="m_8667387611434120834Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:mmazloff@ucsd.edu" target="_blank">mmazloff@ucsd.edu</a>></span><span class="m_8667387611434120834Apple-converted-space"> </span>wr<wbr>ote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div style="word-wrap:break-word;line-break:after-white-space">Hello
<div><br>
</div>
<div>Lately I have been using:</div>
<div><a href="http://wwwcvs.mitgcm.org/viewvc/MITgcm/MITgcm_contrib/mlosch/optim_m1qn3/?pathrev=HEAD" target="_blank">http://wwwcvs.mitgcm.org/viewv<wbr>c/MITgcm/MITgcm_contrib/mlosch<wbr>/optim_m1qn3/?pathrev=HEAD</a></div>
<div><br>
</div>
<div>This is an alternative search algorithm code that I find easier to use (Thanks again Martin!). You may want to give it a try</div>
<div><br>
</div>
<div>-Matt</div>
<div><br>
</div>
<div>
<div><br>
<blockquote type="cite">
<div>
<div class="m_8667387611434120834m_-7698259057553865295m_1695860332011635034h5">
<div>On Mar 20, 2018, at 11:46 AM, Andrew McRae <<a href="mailto:andrew.mcrae@physics.ox.ac.uk" target="_blank">andrew.mcrae@physics.ox.ac.uk</a><wbr>> wrote:</div>
<br class="m_8667387611434120834m_-7698259057553865295m_1695860332011635034m_6005631553758179827Apple-interchange-newline">
</div>
</div>
<div>
<div>
<div class="m_8667387611434120834m_-7698259057553865295m_1695860332011635034h5">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div></div>
Are these run as part of the daily builds? I can't get it to build.<br>
<br>
Following part 3.18.4.2 of the .pdf manual (I don't think this section has been ported online yet)...<br>
<br>
</div>
In lsopt/, the supplied blas libraries are 10+ years old and my compiler says the Pentium 4 blas1 library is incompatible.<br>
<br>
</div>
<div>In optim/, "make depend" doesn't work (makedepend undefined).<br>
<br>
"make" obviously causes the compiler to complain about -lblas1 not existing.<br>
<br>
After changing the makefile to use -lblas instead of -lblas1, "make" gives the output<br>
<br>
f77 -o optim.x optim_main.o optim_sub.o optim_numbmod.o optim_initmod.o optim_readdata.o optim_writedata.o optim_write_control.o xerbla.o simul.o -L. -L../lsopt/ -llsopt_ecco -lblas<br>
/usr/lib/gcc/x86_64-linux-gnu/<wbr>4.9/../../../x86_64-linux-gnu/<wbr>crt1.o: In function `_start':<br>
(.text+0x20): undefined reference to `main'<br>
optim_numbmod.o: In function `optim_numbmod_':<br>
optim_numbmod.f:(.text+0x1ff1)<wbr>: undefined reference to `ilnblnk_'<br>
optim_numbmod.f:(.text+0x2478)<wbr>: undefined reference to `ilnblnk_'<br>
collect2: error: ld returned 1 exit status<br>
Makefile:78: recipe for target 'optim.x' failed<br>
make: *** [optim.x] Error 1<br>
<br>
</div>
<div>And this just looks like broken code rather than anything BLAS-related. An undefined reference to main, and two undefined references to ilnblnk.<br>
</div>
<br>
ilnblnk is defined with<br>
c == external ==<br>
<span class="m_8667387611434120834Apple-converted-space"> </span>integer ilnblnk<br>
<br>
</div>
Then used twice as<br>
il = max(ilnblnk(record),1)<br>
<br>
</div>
Any ideas?<br>
</div>
</div>
</div>
</div>
______________________________<wbr>_________________<br>
MITgcm-support mailing list<br>
<a href="mailto:MITgcm-support@mitgcm.org" target="_blank">MITgcm-support@mitgcm.org</a><br>
<a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" target="_blank">http://mailman.mitgcm.org/mail<wbr>man/listinfo/mitgcm-support</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div></div><span id="m_8667387611434120834cid:300853BA-08F5-48F3-A2CF-00B68CC26648@lan"><m1qn3_output.txt></span><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">____________<wbr>______________________________<wbr>_____</span><span class=""><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">MITgcm-support
mailing list</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<a href="mailto:MITgcm-support@mitgcm.org" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">MITgcm-support@mitgcm.org</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">http://mailman.mitgcm.org/<wbr>mailman/listinfo/mitgcm-<wbr>support</a></span></div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote></div><br></div>