Mogi example main program fails
EJFielding opened this issue · 15 comments
I was also unable to run the main example code for the Mogi model:
models/mogi/examples] fielding% mogi altar: could not resolve 'mogi' into a component that implements protocol 'altar.models'
I am now getting a different error when I try to run the Mogi example main model:
models/mogi/examples] fielding% mogi
altar: unable to find support for <fast> mode
altar: file='/Users/fielding/Documents/progs/Caltech/AlTar-2.0/models/mogi/mogi/Mogi.py', line=146, function='initialize': firewall breached; aborting...
I am still using the old "make" method to build AlTar 2.0.
I changed the mogi.pfg file to mode "native" and it is running successfully now.
Yes, MacBook with MacPorts.
I have updated my Pyre and AlTar installations with git pull. They seem to install successfully. Now when I try to run "mogi" in the examples directory, I get a new error:
Traceback (most recent call last): File "/Users/fielding/Documents/progs/Caltech/AlTar-2.0/altar/builds/bin/mogi", line 32, in <module> status = app.run() File "/Users/fielding/Documents/progs/Caltech/extra_aivazis/pyre/products/packages/pyre/shells/Application.py", line 197, in run return self.shell.launch(self, *args, **kwds) File "/Users/fielding/Documents/progs/Caltech/extra_aivazis/pyre/products/packages/pyre/shells/Script.py", line 49, in launch status = application.main(*args, **kwds) File "/Users/fielding/Documents/progs/Caltech/AlTar-2.0/altar/altar/shells/Application.py", line 53, in main self.controller.initialize(application=self) File "/Users/fielding/Documents/progs/Caltech/AlTar-2.0/altar/altar/bayesian/Annealer.py", line 58, in initialize self.sampler.initialize(application=application) File "/Users/fielding/Documents/progs/Caltech/AlTar-2.0/altar/altar/bayesian/Metropolis.py", line 54, in initialize self.uniform = altar.pdf.uniform_pos(support=(0,1), rng=rng) File "/Users/fielding/Documents/progs/Caltech/extra_aivazis/pyre/products/packages/gsl/pdf.py", line 116, in __init__ super().__init__(**kwds) TypeError: object.__init__() takes exactly one argument (the instance to initialize)
I get the same error whether I have the mode "native" or "fast" in the mogi.pfg file.
Thanks Lijun.
It runs after I made that change, but the results are all "nan".
altar: step
β: 0
θ: (4096 samples) x (6 parameters)
Σ: 6 x 6
[[ +0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00
+0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00
+0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00
+0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00
+0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00
+0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00 +0.0000e+00 ]]
** ** ** GSL error: endpoints do not enclose a minimum
altar: step
β: 0.999999999850374
θ: (4096 samples) x (6 parameters)
Σ: 6 x 6
[[ +nan +nan +nan +nan +nan +nan
+nan +nan +nan +nan +nan +nan
+nan +nan +nan +nan +nan +nan
+nan +nan +nan +nan +nan +nan
+nan +nan +nan +nan +nan +nan
+nan +nan +nan +nan +nan +nan ]]
Hi Lijun,
The input data for the Mogi model is generated by the program in the directory below, so you can easily check whether the inversion is getting the synthetic model correct.
Best,
++Eric
Lijun,
The mogi version in your "pr" branch works for me and gives good results, but only in the slow "native" mode.
@aivazis Are you still planning to fix the AlTar2 build system to work with the old "mm" and "make" or do we all need to switch to the new "mm"?