Hello,
I am attempting to make a makefile on an ubuntu 10.04 system (64 bit), but I have some error message as following:
on the other hand, I have install PGI 11.9, mpich2, netcdf, parallel-netcdf …
makefile:
CPP = cpp -P
FC = mpif90
LD = mpif90
CLEAN = rm
Set libraries and include files
NETCDFINC = -I/usr/local/parallel-netcdf/include
NETCDFLIB = -L/usr/local/parallel-netcdf/lib
FFLAGS = -i4 -r4 $(NETCDFINC)
FFLAGA = $(NETCDFINC)
LIBS = $(NETCDFLIB) -lpnetcdf
BIN = test.exe
SRCDIR = mode
#-----------------------------------------------------------------------
Define objects
#-----------------------------------------------------------------------
OBJS = parallel_mpi.o
io_pnetcdf.o
solver.o \
VPATH = $(SRCDIR)
#-----------------------------------------------------------------------
Set implicit rules for compilation
#-----------------------------------------------------------------------
%.o: %.f
@echo
$(FC) -c $(FFLAGS) $<
#-----------------------------------------------------------------------
Set implicit rules for dependencies
#-----------------------------------------------------------------------
%.f: %.F
@echo
$(CPP) $(FFLAGS) $< > $*.f
#-----------------------------------------------------------------------
Create the executable
#-----------------------------------------------------------------------
$(BIN): $(OBJS)
@echo
$(LD) $(FFLAGS) -o $(BIN) $(OBJS) $(LIBS)
#-----------------------------------------------------------------------
Cleaning target
#-----------------------------------------------------------------------
clean:
@rm -f *.o *.mod
This is when trying to run
$ make
But to no avail…producing the same errors:
mpif90 -c -i4 -r4 -I/usr/local/parallel-netcdf/include /parallel_mpi.f
gfortran: unrecognized option ‘-r4’
f951: error: unrecognized command line option “-i4”
make: *** [parallel_mpi.o] Error 1
any advice and suggestions ?