Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

bug, parse error

jivifair
Beginner
694 Views
I'm trying to compile a program that works fine in a cluster but when I try to compile it
in a new machine that I have (in fact, a gpu machine) the following error arises:

Use mpi
         1
Fatal Error: Parse error when checking module version for file 'mpi.mod' opened at (1)
make[1]: *** [prog] Error 1
make[1]: Leaving directory `/home/jivifair/gpuparallel'
make: *** [all] Error 2

Some people at the university claimed that I don't need to use open mpi for this kind
of machine and for what I have seen this error is related with the version installed.
Is that correct? How can I fix this error?

Greetings and thanks!
0 Kudos
3 Replies
Steven_L_Intel1
Employee
694 Views
You're not using Intel Fortran for that compile - probably gfortran, and I'd guess it is finding an Intel .mod and (reasonably) complaining.  Make sure that you use consistent compilers.
0 Kudos
jivifair
Beginner
694 Views
but if I type

[jivifair@titan-gpu gpuparallel]$ ifort -v
ifort version 12.1.3

and my Makefile contains

include /usr/local/cula/examples/common/common.mk

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_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_diag.f90
INCLUDES=-I${CULA_INC_PATH}
LIBPATH32=-L${CULA_LIB_PATH_32}
LIBPATH64=-L${CULA_LIB_PATH_64}

LIBS=-lcula_core -lcula_lapack -lcula_lapack_fortran -lcublas -lcudart -llapack
MODULES=/usr/local/cula/src/interfaces/fortran/cula.F90

#
# Lo siguiente es necesario si se compila con ifort (sin mpif90) (version mas o menos minimalista)
MPI_OBJS        = -I/usr/local/include -I/usr/local/lib

MPI_LIBS        = -L/usr/local/lib -lmpi_f90 -lmpi_f77 -lmpi -lopen-rte -lopen-pal -llibopen-pal -lutil \
            -L/opt/homebrew/lib
#
# Compiladores
#F90                    = gfortran $(MPI_OBJS) $(MPI_LIBS)
#F90                     = ifort $(MPI_OBJS) $(MPI_LIBS)
F90                    = mpif90
F90FLAGS        = -O3 # -mpe=mpicheck
LD                              = $(F90) $(F90FLAGS)
#

all:
        make  objetos
        make  prog
        #make -s run
objetos:
        $(F90) $(F90FLAGS) -c $(SOURCE)
prog:
        $(LD) $(OBJS) $(MODULES) $(TARGET).f90 -m64 -o $(TARGET).x -llapack -lblas $(CFLAGS) $(INCLUDES) $(LIBPATH64) $(LIBS)
run:
        ./bhl.x
clean:
        rm *.o *.mod *.x

!==================================================================================================

If I compile with
F90                    = mpif90
I get this error that I posted, but if I compile with
F90                     = ifort $(MPI_OBJS) $(MPI_LIBS)
I get a bunch of errors :S

0 Kudos
Steven_L_Intel1
Employee
694 Views
Your "mpif90" definition is invoking gfortran. When using ifort, make sure you are using an MPI distribution built for ifort.  It sounds to me as if you are using a gfortran version.
0 Kudos
Reply