rainwoodman / fastpm-python

Python version of FastPM
GNU General Public License v3.0
12 stars 8 forks source link

Argument `s' of `Force` resolves to an undefined variable `s' #2

Closed nickhand closed 7 years ago

nickhand commented 7 years ago

I am running the demo.html file with the latest versions of the package from the bccp channel and get this error

/Users/nhand/anaconda/envs/py35/lib/python3.5/site-packages/fastpm/nbkit.py in __init__(self, linear, astart, aend, boost, Nsteps, cosmo)
     39
     40         # this is slow
---> 41         self._run()
     42
     43     @property

/Users/nhand/anaconda/envs/py35/lib/python3.5/site-packages/fastpm/nbkit.py in _run(self)
     46
     47     def _run(self):
---> 48         s, p = self.model.compute(['s', 'p'], init={'dlin_k': self.linear.to_field(mode='complex')})
     49         q = self.evolution.q
     50         self['Displacement'] = s

/Users/nhand/anaconda/envs/py35/lib/python3.5/site-packages/abopt/vmad.py in compute(self, vout, init, tape, monitor)
    537         for i, (microcode, kwargs) in enumerate(code):
    538             try:
--> 539                 r = microcode.invoke(self.vm, frontier, kwargs, tape, monitor)
    540             except Exception as e:
    541                 print("Failure in running `%s`" % microcode)

/Users/nhand/anaconda/envs/py35/lib/python3.5/site-packages/abopt/vmad.py in invoke(self, vm, frontier, kwargs, tape, monitor)
    111                 vn = kwargs.pop(an, an)
    112                 if vn not in frontier:
--> 113                     raise ValueError("Argument `%s' of `%s` resolves to an undefined varabile `%s'" % (an, self, vn))
    114                 data = frontier[vn]
    115

ValueError: Argument `s' of `Force` resolves to an undefined varabile `s'
rainwoodman commented 7 years ago

I am in the middle of porting over to the cleaner vmad2 computing engine, and must have broken things in the middle. I rolled back a few changes in the master branch --

Could you take a look of abopt 0.0.6 and fastpm-python 0.0.3 fixes this issue?

nickhand commented 7 years ago

KickDriftKick seems to be missing and fastpm/nbkit.py needs it

rainwoodman commented 7 years ago

I forgot -- It has been renamed.

I'll look at this when I get off the car. This nbkit stuff needs to be tested!

On Mon, Apr 3, 2017 at 10:10 AM, Nick Hand notifications@github.com wrote:

KickDriftKick seems to be missing and fastpm/nbkit.py needs it

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rainwoodman/fastpm-python/issues/2#issuecomment-291208670, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIbTH_6_r3m7q7JW5G1NeGH_qFzDcKcks5rsSfrgaJpZM4MwoV0 .

rainwoodman commented 7 years ago

I think it is fixed now on master. I added a test case, but it won't go through due to a bug in nbodykit which halts fof.find_features in tests.

rainwoodman commented 7 years ago

No longer relevant. the forward modelling has been moved to cosmo4d.