ubermag / help

Repository for raising issues and requesting help on Ubermag
BSD 2-Clause "Simplified" License
11 stars 3 forks source link

Issues with MinDriver #14

Closed JMackel closed 7 years ago

JMackel commented 7 years ago

Attended your workshop at Intermag 2017 and I'm now looking to use J-OOMMF for some simulations. Very new to Python so bear with me!

Running through the first OOMMFC notebook example, when running the lines md = oc.MinDriver() md.drive(system)

get this error:


ValueError Traceback (most recent call last)

in () 27 28 md = oc.MinDriver() ---> 29 md.drive(system) /anaconda/lib/python3.6/site-packages/oommfc/drivers/driver.py in drive(self, system, **kwargs) 30 31 if "derive" not in kwargs: ---> 32 self._update_system(system) 33 34 def _makedir(self, system): /anaconda/lib/python3.6/site-packages/oommfc/drivers/driver.py in _update_system(self, system) 61 def _update_system(self, system): 62 self._update_m(system) ---> 63 self._update_dt(system) 64 65 def _update_m(self, system): /anaconda/lib/python3.6/site-packages/oommfc/drivers/driver.py in _update_dt(self, system) 85 86 # Update system's datatable. ---> 87 system.dt = oommfodt.read(last_odt_file) 88 89 def _filenames(self, system): /anaconda/lib/python3.6/site-packages/oommfodt/oommfodt.py in read(filename, replace_columns) 96 else: 97 msg = "Entry {} not in lookup table.".format(part) ---> 98 raise ValueError(msg) 99 else: 100 columns.append(part) ValueError: Entry FixedZeeman:zeeman:Energy not in lookup table. Had a similar issue previously with the plot_plane function not being found, but was fixed by updating OOMMFC. Fully updated now and still getting nowhere with the MinDriver problem.
fangohr commented 7 years ago

Dear JMackel,

Great to hear you were at the workshop and want to explore this further. Sorry to learn you ran into an error. Thanks for the note reporting it!

You can help us by providing a minimal failing example and make it very explicit what this is in the issue you raise. Either point to the particular notebook with a URL, or the precise name and path of it, etc.

If you have the skills and can extract the relevant lines of code to be added to this issue (so we can copy and paste it and see the error), that would be best.

The reason for this is that it (i) reduces the time for us to reproduce your problem, and (ii) sometimes the problem you see just doesn’t occur on our systems [could be an installation issue], and in that case it is extra time consuming to try to reproduce it.

Best wishes,

Hans

On 11. Nov 2017, at 12:51, JMackel notifications@github.com<mailto:notifications@github.com> wrote:

Attended your workshop at Intermag 2017 and I'm now looking to use J-OOMMF for some simulations. Very new to Python so bear with me!

Running through the first OOMMFC notebook example, when running the lines md = oc.MinDriver() md.drive(system)

get this error:


ValueError Traceback (most recent call last) in () 27 28 md = oc.MinDriver() ---> 29 md.drive(system)

/anaconda/lib/python3.6/site-packages/oommfc/drivers/driver.py in drive(self, system, **kwargs) 30 31 if "derive" not in kwargs: ---> 32 self._update_system(system) 33 34 def _makedir(self, system):

/anaconda/lib/python3.6/site-packages/oommfc/drivers/driver.py in _update_system(self, system) 61 def _update_system(self, system): 62 self._update_m(system) ---> 63 self._update_dt(system) 64 65 def _update_m(self, system):

/anaconda/lib/python3.6/site-packages/oommfc/drivers/driver.py in _update_dt(self, system) 85 86 # Update system's datatable. ---> 87 system.dt = oommfodt.read(last_odt_file) 88 89 def _filenames(self, system):

/anaconda/lib/python3.6/site-packages/oommfodt/oommfodt.py in read(filename, replace_columns) 96 else: 97 msg = "Entry {} not in lookup table.".format(part) ---> 98 raise ValueError(msg) 99 else: 100 columns.append(part)

ValueError: Entry FixedZeeman:zeeman:Energy not in lookup table.

Had a similar issue previously with the plot_plane function not being found, but was fixed by updating OOMMFC. Fully updated now and still getting nowhere with the MinDriver problem.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/joommf/help/issues/14, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AER_n2PdSURBW6tl-mqiLnxk3l0iyLETks5s1YpcgaJpZM4Qadyr.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/joommf/help","title":"joommf/help","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/joommf/help"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Issues with MinDriver (#14)"}],"action":{"name":"View Issue","url":"https://github.com/joommf/help/issues/14"}}}

JMackel commented 7 years ago

Hi Hans,

Not sure how to link you to the particular Jupyter notebook I'm using, I can copy the code I'm using below. It's just the first OOMMFC notebook from the OOMMFC documentation, haven't changed it from the code given in that example.


import oommfc as oc import discretisedfield as df

system = oc.System(name = "first_notebook")

L = 100e-9 d = 10e-9 mesh = oc.Mesh(p1=(0, 0, 0), p2=(L, L, L), cell=(d, d, d))

A = 1e-12 H = (8e6, 0, 0) system.hamiltonian = oc.Exchange(A=A) + oc.Demag() + oc.Zeeman(H=H)

alpha = 0.2 system.dynamics = oc.Precession(gamma=oc.gamma0) + oc.Damping(alpha=alpha)

system.m = df.Field(mesh, value=(0, 1, 0), norm=8e6)

%matplotlib inline mesh

system.hamiltonian system.dynamics

fig = system.m.plot_plane("z")

md = oc.MinDriver() md.drive(system)


Running this code gives me the error that I mentioned above.

Hope this helps!

Jennifer

fangohr commented 7 years ago

Thank you, that is indeed useful.

If I run the above program on a OSX installation, it works fine.

Judging by the error message, you are running this on a Linux system? Can I ask how you installed the JOOMMF software? (to try to reproduce the problem).

JMackel commented 7 years ago

No, I'm running it on OSX, fully updated to 10.13.1 and still having the same error.

I installed JOOMMF using the method outlined in the OOMMFC documentation, namely by installing Docker, then Anaconda.

JMackel commented 7 years ago

Hi Hans,

So I just re-named the notebook from "first_notebook" to "test_notebook and now it's working fine - I must have had more than one file with that name and it was interfering with it? Whatever the issue was, seems to be working okay now!

Thanks for your help!

Jennifer

fangohr commented 7 years ago

Great, thanks for the update. So I can imagine that there could be some confusion if a subdirectory exists already that the the tool thinks it has written, but actually contains different data (and that would link to the error message you reported). If you can reproduce this (or if it happens again), please do report back. I'll close this for now.