You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fidimag solves finite-difference micromagnetic problems and supports atomistic simulations, using Python interface. The interface to both types of simulation is similar.
* Optimal LLG equation integration using modern [Sundial's v6](https://github.com/LLNL/sundials/) CVODE solver
21
24
* Offers LLG and LLG with spin torque terms (Zhang-Li and Sloncewski)
@@ -86,7 +89,6 @@ If you use Fidimag, please cite as:
86
89
Bisotti, M.-A., Cortés-Ortuño, D., Pepper, R., Wang, W., Beg, M., Kluyver, T. and Fangohr, H., 2018. Fidimag – A Finite Difference Atomistic and Micromagnetic Simulation Package. Journal of Open Research Software, 6(1), p.22. DOI: http://doi.org/10.5334/jors.223
87
90
88
91
89
-
90
92
### Acknowledgements
91
93
92
94
We acknowledge financial support from EPSRC’s Centre for Doctoral Training in Next Generation Computational Modelling (EP/L015382/1), EPSRC’s Doctoral Training Centre in Complex System Simulation (EP/G03690X/1), EPSRC Programme grant on Skyrmionics (EP/N032128/1) and OpenDreamKitHorizon 2020 European Research Infrastructure project (676541).
You will need a relatively recent installation of CMake (> version 3) to use the Sundials script. You may also need to install development versions of
27
+
Install FFTW and Sundials. You will need a relatively recent installation of (> version 3) to use the Sundials script. You may also need to install development versions of
46
28
47
29
* BLAS
48
30
* LAPACK
49
31
50
-
though many Linux distributions come with these.
32
+
though many Linux distributions come with these. Using the scripts provided in Fidimag:
51
33
52
-
Then, follow the instructions in 'All Systems' below.
34
+
.. code-block:: bash
35
+
36
+
cd bin
37
+
bash install-fftw.sh
38
+
bash install-sundials.sh
39
+
40
+
Python library dependencies are specified in the `pyproject.toml` file. We can install the `fidimag` library in editable mode, using `pip`:
41
+
42
+
.. code-block:: bash
43
+
44
+
pip install -e .
45
+
46
+
This will build the C/C++ modules and setup `fidimag` in our Python environment. We can make any changes to the Python code and not install the library again, unless we modified the C/C++ modules, which requires building again. Now we can simply call
47
+
48
+
.. code-block:: bash
49
+
50
+
python -c "import fidimag"
51
+
52
+
53
+
If you want to check everything has worked correctly, try the command 'make test' from the fidimag directory - if all tests pass, then you have a working installation!
54
+
55
+
Alternatively, for development, we can install the C/C++ modules
56
+
57
+
.. code-block:: bash
58
+
59
+
make
60
+
61
+
62
+
and link the Fidimag directory to the Python path
63
+
64
+
.. code-block:: bash
65
+
66
+
export PYTHONPATH=/path/to/fidimag:$PYTHONPATH
67
+
68
+
69
+
Any changes to the C/C++ modules will require building only the modified codes and not all of the modules using `make`.
53
70
54
71
55
72
OS X
56
73
----
57
74
58
75
OS X has not shipped with GCC since the release of OS X Mavericks. You therefore need to install this, as the version of clang which ships does not support OpenMP. We advise that you use the brew package manager, and install gcc5. We also strongly advise that you install the Anaconda Python distribution - we do not test against the version of Python that comes with OS X.
59
76
60
-
Once you have done this, you need to specify the compiler you are using::
77
+
Once you have done this, you need to specify the compiler you are using
78
+
79
+
.. code-block:: bash
61
80
62
81
export CC=gcc-5
63
82
64
83
You can then follow the same installation instructions as for 'Other Linux', but don't worry about BLAS and LAPACK as Anaconda takes care of these for you.
65
84
66
85
Then, follow the instructions in 'All Systems' below.
67
86
87
+
Troubleshooting
88
+
---------------
68
89
69
-
All systems
70
-
-----------
90
+
If there is a problem with finding C/C++ sundials and fftw libraries, it is necessary to update the corresponding env variable
71
91
72
-
Once you've built Fidimag, you need to add the libraries to your LD_LIBRARY_PATH, so that Fidimag can find them. If you installed SUNDIALS and FFTW using our scripts, you can do this with the command::
You may want to add this and another command to the file ~/.bashrc on Linux or ~/.bash_profile on OS X::
77
-
78
-
export PYTHONPATH=/path/to/fidimag:$PYTHONPATH
79
-
80
-
Adding Fidimag to your PYTHONPATH allows fidimag to be imported in Python from any directory.
81
-
82
-
If you want to check everything has worked correctly, try the command 'make test' from the fidimag directory - if all tests pass, then you have a working installation!
83
96
84
97
OOMMF
85
98
-----
86
99
87
100
Some additional tests check Fidimag against OOMMF. To run these, you need a working OOMMF installation, and you need need to tell the system where to
88
-
find it. You can do this by setting the environment variable to the directory containing oommf.tcl::
101
+
find it. You can do this by setting the environment variable to the directory containing oommf.tcl
0 commit comments