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

Attempt to unify makefile for different architectures #26

Closed berianjames closed 1 year ago

berianjames commented 1 year ago

Sorry it took me so long to get to this!

Creating PR so we can discuss some code topics.

berianjames commented 1 year ago

This builds with make (and with fewer compiler warnings than before), but fails upon module import

import magtense
from magtense.magstatics import Tiles

> ImportError: cannot import name 'magtensesource' from 'magtense.lib'

I think this is something in the f2py f90 file? I am trying to work it out

berianjames commented 1 year ago

It must be the subroutines wrappers in FortranToPythonIO.f90? Are they redirecting the module namespace a layer deeper?

spollok commented 1 year ago

I removed some unnecessary include paths for the gfortan compilation. I don't think it will resolve the issue, but as it worked previously with the additional Makefile, I wanted to make the compilation as similar as possible.

berianjames commented 1 year ago

Great, this works now!

We still can't merge this because the io_general module updates in NumericalIntegation. Some of that fortran needs re-writing to conform to the standard (which gfortran enforces but ifort doesn't).

berianjames commented 1 year ago

Resolved merge conflicts so that this branch is now up-to-date with master. It will now fail again (for different reasons than before!) because of the ifort vs gfortran standard stuff I mentioned above.

berianjames commented 1 year ago

Everything works now - it's ready to merge back into master!

berianjames commented 1 year ago

👍🏻 LGTM