Page 1 of 1

unsupported Fortran compiler error in magma's testing folder

Posted: Fri Mar 29, 2013 4:48 pm
by lcebamanos
I am using cuda 5.0 and gcc 4.7.2, some testing_* files are properly compiled but, I am getting the following error:

gcc -fPIC -Xlinker -zmuldefs -DGPUSHMEM=200 testing_zsymmetrize.o -o testing_zsymmetrize \
lin/liblapacktest.a -L../lib -lmagma -lmagmablas -lmagma \
-L/home/w02/lcebaman/acml/gfortran64/lib -L/usr/local/cuda-5.0/lib64 -L/home/w02/lcebaman/blas/cblas/lib \
/home/w02/lcebaman/blas/cblas/lib/cblas_LINUX.a -lacml -lacml_mv -lpthread -lcublas -lm
gcc -O3 -DADD_ -fPIC -DHAVE_CUBLAS -DGPUSHMEM=200 -I/usr/local/cuda-5.0/include -I/home/w02/lcebaman/acml/gfortran64/include -I../include -I../control -c /usr/local/cuda-5.0/src/fortran.c -o fortran.o
In file included from /usr/local/cuda-5.0/src/fortran.c:67:0:
/usr/local/cuda-5.0/src/fortran_common.h:405:2: error: #error unsupported Fortran compiler
make[1]: *** [fortran.o] Error 1
make[1]: Leaving directory `/home/w02/lcebaman/magma-1.2.1/testing'
make: *** [test] Error 2

Any ideas how to fix this? I would appreciate any help.

Re: unsupported Fortran compiler error in magma's testing fo

Posted: Mon Apr 01, 2013 4:01 pm
by mgates3
You need to add -DCUBLAS_GFORTRAN to OPTS in the file. This was a change with CUDA 5.0.

Re: unsupported Fortran compiler error in magma's testing fo

Posted: Fri Aug 09, 2013 6:23 pm
by adrianor
I have the same error but I couldn't solve it with the hint provided. Here's my Makefile:
TARGET = kEmbEns
OBJS = mod_DefineKind.o mod_IniciaMPI.o mod_Params.o mod_BosonOp.o mod_random.o \
mod_SubsRMT.o hqrii1c.o mod_SpFluc.o mod_nonsym.o mod_EigenvecStats.o#mod_diag.o
SOURCE = mod_DefineKind.f90 mod_IniciaMPI.f90 mod_Params.f90 mod_BosonOp.f90 mod_random.f90 \
mod_SubsRMT.f90 hqrii1c.f mod_SpFluc.f90 mod_nonsym.f90 mod_EigenvecStats.f90#mod_diag.f90

F90 = gfortran
F90FLAGS = -O3
LD = $(F90) $(F90FLAGS)


CFLAGS += -I$(CUDA_DIR)/include -I$(MAGMA_DIR)/include
LIBS += -L$(MAGMA_DIR)/lib -lmagma -lmagmablas -lmagma
LIBS += -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 -lm
LIBS += -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.

Any idea what's the problem?

Thanks in advance,
Adrian O

Re: unsupported Fortran compiler error in magma's testing fo

Posted: Tue Aug 13, 2013 4:51 pm
by mgates3
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.