cmt-dtu-energy / MagTense

MagTense - a micromagnetism and magnetostatic framework
http://www.MagTense.org
GNU General Public License v3.0
28 stars 12 forks source link

magstatics build for ARM architectures (e.g. MacOS) #25

Closed berianjames closed 1 year ago

berianjames commented 1 year ago

This PR (re-?)adds the ability to build and use MagTense on ARM architectures (i.e. any current or future MacOS). Presently only the magstatics module can be used. We can discuss whether it's appropriate to actually merge this now.

To develop a ARM build consistent with Windows / Linux, we need to:

spollok commented 1 year ago

I have looked quickly through the files, and they seem to look fine. And I guess @berianjames has tested it successfully on an ARM architecture. As mentioned, the files are mostly a copy of the existing files. A suggestion could be trying to make a unified Makefile already. The underlying machine hardware can be inferred with UNAME_M:= $(shell uname -m) on unix-like systems and for excluding the micromagnetic part in the IO file with could use preprocessor directives, e.g., ARCH_ARM, to switch between the two cases.

spollok commented 1 year ago

@berianjames I have made a commit on the arch_arm64 branch for a first attempt of unification. You might want to test it on ARM architecture :)