A note to anyone trying to compile on windows: to get the fortran files to compile I manually set PTROPT=-Dmagma_devptr_t="integer(kind=8)" in Makefile.internal. On linux this value is determined by shelling out. Also, I had to include C preprocess directives. For intel fortran set FORT = ifort -fpp, for gfortran set FORT = gfortran -x f95-cpp-input.