Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mogi example main program fails #7

Open
EJFielding opened this issue Nov 20, 2018 · 15 comments
Open

Mogi example main program fails #7

EJFielding opened this issue Nov 20, 2018 · 15 comments

Comments

@EJFielding
Copy link
Member

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'

@aivazis
Copy link
Member

aivazis commented Nov 20, 2018 via email

@EJFielding
Copy link
Member Author

EJFielding commented Nov 20, 2018 via email

@EJFielding
Copy link
Member Author

EJFielding commented Feb 23, 2019

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...

@aivazis
Copy link
Member

aivazis commented Feb 23, 2019 via email

@EJFielding
Copy link
Member Author

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.

@aivazis
Copy link
Member

aivazis commented Feb 23, 2019 via email

@EJFielding
Copy link
Member Author

Yes, MacBook with MacPorts.

@EJFielding
Copy link
Member Author

EJFielding commented May 3, 2019

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.

@lijun99
Copy link
Contributor

lijun99 commented May 3, 2019 via email

@EJFielding
Copy link
Member Author

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 ]]

@lijun99
Copy link
Contributor

lijun99 commented May 4, 2019 via email

@lijun99
Copy link
Contributor

lijun99 commented May 4, 2019 via email

@EJFielding
Copy link
Member Author

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

@lijun99
Copy link
Contributor

lijun99 commented May 6, 2019 via email

@EJFielding
Copy link
Member Author

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"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants