joommf-attic / icm2018-workshop

ICM2018 workshop in San Francisco, 15 July 2018
5 stars 0 forks source link

OOMMF exited abnormally in ubuntu 16.04 #1

Open qhapaq-49 opened 6 years ago

qhapaq-49 commented 6 years ago

OOMMF exited abnormally in 02-tutorial-hamiltonian with following message in ubuntu 16.04. I report what happened and my solution.

2018/07/16 07:46: Running OOMMF (zeeman/zeeman.mif) ... (0.4 s)
OOMMF error:
    command: /home/user_name/anaconda3/bin/oommf boxsi +fg zeeman/zeeman.mif -exitondone 1
    stdout: Boxsi run end.

    stderr: <4681> oommf.tcl 2.0a0  panic:
child process exited abnormally

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-3-11517d63282d> in <module>()
      1 md = oc.MinDriver()  # create energy minimisation driver
----> 2 md.drive(system)  # run energy minimisation
      3 
      4 system.m.plot_plane("y")

~/anaconda3/lib/python3.6/site-packages/oommfc/drivers/driver.py in drive(self, system, **kwargs)
     27         self._save_mif(system, **kwargs)
     28 
---> 29         self._run_simulator(system)
     30 
     31         if "derive" not in kwargs:

~/anaconda3/lib/python3.6/site-packages/oommfc/drivers/driver.py in _run_simulator(self, system)
     56         miffilename = self._filenames(system)["miffilename"]
     57         oommf = oc.oommf.get_oommf_runner()
---> 58         oommf.call(argstr=miffilename)
     59 
     60     def _update_system(self, system):

~/anaconda3/lib/python3.6/site-packages/oommfc/oommf/oommf.py in call(self, argstr, need_stderr)
     47                 print('\tstderr: {}'.format(stderr))
     48                 print('\n')
---> 49             raise RuntimeError('Error in OOMMF run.')
     50 
     51         return res

RuntimeError: Error in OOMMF run.

What I did

I installed joommf using conda in accordance with tutorial page

conda install --channel conda-forge joommf
conda upgrade joommf

I booted jupyter notebook,

jupyter notebook

and executed python code in 02-tutorial-hamiltonian

md = oc.MinDriver()  # create energy minimisation driver
md.drive(system)  # run energy minimisation

system.m.plot_plane("y")

My OS is ubuntu 16.04 64-bit (desktop) and CPU is Corei7 4710MQ

My solution

I solved the problem by compiling OOMMF by my own according with following movie ( https://www.youtube.com/watch?v=VeWip2L_1zs ) and substituting self-compiled oommf for /home/user_name/anaconda3/bin/oommf ( one might need to change environmental variable OOMMF_ROOT).

My expectation

Looks like conda install command automatically installs OOMMF binaries to anaconda3/opt/oommf/, however, automatically installed OOMMF does not work in ubuntu 16.04. I attach log from anaconda3/opt/oommf/boxsi.errors

[Boxsi<4965-Yukikaze> 07:55:56.394 2018-07-16] 2.0a0 infolog:
Start: "/home/user_name/physics/icm2018-workshop/notebooks/zeeman/zeeman.mif"
Options: -exitondone 1 -threads 4

[Boxsi<4965-Yukikaze-ub-shiku> 07:55:56.404 2018-07-16] 2.0a0 infolog:
End "zeeman.mif"

[Boxsi<4965-Yukikaze> 07:55:56.405 2018-07-16] 2.0a0 LoadProblem error:
Error loading /home/user_name/physics/icm2018-workshop/notebooks/zeeman/zeeman.mif:
    Error thrown from inside "Oxs_Director::ProbInit" --- Resource allocation failure --- ERROR 
   in file: /feedstock_root/build_artefacts/oommf_1530400325424/work/oommf-2.0a0_20170929a0/oommf/app/oxs/base/oxsthread.cc
   at line: 456
Thread creation failed.(Is the Tcl library thread enabled?)
-----------
Stack:
Error thrown from inside "Oxs_Director::ProbInit" --- Resource allocation failure --- ERROR
   in file: /feedstock_root/build_artefacts/oommf_1530400325424/work/oommf-2.0a0_20170929a0/oommf/app/oxs/base/oxsthread.cc
   at line: 456
Thread creation failed.(Is the Tcl library thread enabled?)
    while executing
"Oxs_ProbInit $f $MIF_params "
-----------
Additional info: OOMMF {} {Resource allocation failure} -1
qhapaq-49 commented 6 years ago

I found another problem. Self-compiled OOMMF does not work in 04-tutorial-current-induced-dw-motion. One needs to compile OOMMF in anaconda3/opt/oommf/.

cd path_to_anaconda/opt/oommf
tclsh oommf.tcl pimake distclean
tclsh oommf.tcl pimake upgrade
tclsh oommf.tcl pimake

I attach error log from my self-compiled OOMMF (boxsi.errors)

-----------
Stack:
Unrecognized Specify Block:
  Oxs_DMI_Cnv:
    invoked from within
"Oxs_ExtCreateAndRegister $key $init_str"
    ('Oxs_Mif' instance method 'ReadMif' line 130)
    invoked from within
"_Oxs_Mif0 ReadMif /home/shiku/physics/icm2018-workshop/notebooks/domain_wall_pair/domain_wall_pair.mif {}"
    invoked from within
"Oxs_ProbInit $f $MIF_params "
-----------