MAGMA_DIR=$(HOME)/src/magma-1.2.1CUDA_DIR=/usr/local/cudaCFLAGS += -I$(CUDA_DIR)/include -I$(MAGMA_DIR)/includeLIBS += -L$(MAGMA_DIR)/lib -lmagma -lmagmablas -lmagmaLIBS += -L$(CUDA_DIR)/lib64 -lcublas#LIBS += -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_sequential.a $(MKLROOT)/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lmLIBS += -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_gf_lp64.a $(MKLROOT)/lib/intel64/libmkl_sequential.a $(MKLROOT)/lib/intel64/libmkl_core.a -Wl,--end-group -lpthread -lm============================================================================================If I include -DCUBLAS_GFORTRAN in F90 or F90FLAGS nothing happens and I get the same error as the first post.If I include -DCUBLAS_GFORTRAN in CFLAGS as it is now I get a horrible error that I'm not posting here.

The /usr/local/cuda-5.0/src/fortran.c file that comes with CUDA 5 requires -DCUBLAS_GFORTRAN, or something similar, to compile. Note this is not a MAGMA file. All MAGMA files do not need -DCUBLAS_GFORTRAN.

This seems to be a Makefile for your own project -- not for compiling MAGMA itself. So I don't really understand where you see the problem. The problem occurs when you compile the MAGMA testers. It shouldn't happen when you compile your own project, unless you are compiling the same CUDA /usr/local/cuda-5.0/src/fortran.c file.