Topic: a third-party makefile
Dear All,
I tired to create a Windows 10 executable for a third-party Fortran 90 program called MDTEP.
The authors of the program include several makefiles that they claim should be easily modified for any system. MDTEP has been tested only on Intel Linux and Sun Solaris platforms, but no problems on other systems are anticipated. I procedded in an authomatic manner by copying all files into one directory that was saved in SF3 as a new project, bulding the project in SF3 with the authomatic creation of a SF3-specific makefile, and producing an executable. Appart from two warnings from the compiler in SF3, everything went smoothly, and a target.exe was produced. However, when I ran the executable with the input file, mymdrun.md, distributed with MDTEP, a Fortran error would always appear:
At line 357 of file .\IO.f90 (unit = 25, file = 'mymdrun.md')
Fortran runtime error: Bad value during floating point read
Error termination.
From what I know, SF3 uses gfortran. The MDTEP developpers
include a gfortran make file in the program they distribute (see blow). However, they also note that GNUMake must be used with the originally distirbuted makefiles, which may be the problem here. I guess, the main question is whether the authomatically-SF3 -- generated makefile will do the same job as an externally provided one (like the one below). If not, I wonder if there is a way to use a third-party makefile in SF3.
Many thanks for any help,
Matthew
F90=gfortran
FFLAGS=-O3
LIBS= -static-libgfortran
MATH_LIBS=
.PRECIOUS: %.o
.PHONY: clean
%: %.o
%.o: %.f90
$(F90) $(FFLAGS) -c -o $@ $<
%: %.o
$(F90) $(FFLAGS) -o $@ $^
mdtep : Constants.o Global.o Utility.o IO.o analyse.o Main.o
$(F90) $(FFLAGS) -o mdtep Constants.o Global.o Utility.o IO.o analyse.o Main.o $(LIBS) $(MATH_LIBS)
clog :
-rm *{o,e}[1-9][0-9]*
clean :
rm -f *.mod *.d *.il *.o work.*
rm -f mdtep