ubermag / help

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

Error using mumax3 #255

Closed anastasiadriagina closed 1 year ago

anastasiadriagina commented 1 year ago

Hello, ubermag team!

I successfully installed ubermag on my computer (Windows 10 OS) and ran several simulations using oommfc. Next, I want to try simulations with mumax3, but I have same problems.

I checked CUDA and installed mumax3 in accordance with the manual on website, adding way to the PATH and added a folder with mumax3 in env. When I import mumax3 according to the installation guide, the following error is displayed.
Please help me with this errors, thanks a lot!

AttributeError                            Traceback (most recent call last)
Cell In[3], line 1
----> 1 import mumax3c
      2 mumax3c.runner.mumax3_exe = r'C:\ProgramData\miniconda3\envs\ubermag\Lib\site-packages\mumax3.10_windows_cuda11.0'

File C:\ProgramData\miniconda3\envs\ubermag\lib\site-packages\mumax3c\__init__.py:12
      9 from .delete import delete
     10 from .drivers import MinDriver, RelaxDriver, TimeDriver
---> 12 runner = **mumax3c.mumax3.**Runner()
     13 """Controls the default runner.
     14 
     15 ``runner`` gives access to the default mumax3 runner used by ``mumxa3c``. For
   (...)
     32 
     33 """
     36 def test():

AttributeError: partially initialized module 'mumax3c' has no attribute 'mumax3' (most likely due to a circular import)
lang-m commented 1 year ago

Hi @anastasiadriagina, we are not quite sure why you get this AttributeError. Here are some observations and suggestions:

  1. You should not put the mumax3 folder inside the miniconda environment.
  2. Have you modified anything in mumax3c that could cause a cyclic import? We could not reproduce the problem on Linux.
  3. You could try to create a new environment, install Ubermag in this environment and in a new clean notebook in an empty folder try import mumax3c. (The mumax3 executable does not have to be in the path when just testing the import.)

Additional note: due to a bug, your line 2 (mumax3c.runner.mumax3_exe = ...) would currently not have any effect. This will be fixed in the next release. This line is however only required if the mumax3 executable is not in your PATH variable and cannot cause the error we see here.

anastasiadriagina commented 1 year ago

Hello! Thank you for your observations and suggestions. I will try to reinstall Ubermag in a new environment and follow your suggestions.

I hope everything will work!

samjrholt commented 1 year ago

@anastasiadriagina did you manage to solve your issue at all?

github-actions[bot] commented 1 year ago

This issue has not been active in 1 month. If there is no further activity this issue will be closed in 2 weeks.