Commit 5448bad0 authored by Claus Kleinwort's avatar Claus Kleinwort
Browse files

Makefile, print out improved

git-svn-id: http://svnsrv.desy.de/public/MillepedeII/trunk@97 3547b9b0-65b8-46d3-b95d-921b3f43af62
parent 5c3d6b44
# #################################################################
# Makefile for MillePede II (Fortran90) with possible input from C
#
# Works on 64-bit SL5 with gcc version 4.4.4 (or higher).
# Tested on - 64-bit SL5 with gcc version 4.4.4.
# - 64 bit Ubuntu 11.10 with gcc version 4.6.1.
#
# See comments about different gcc versions inline to get a
# hint about the necessary adjustments.
# #################################################################
# Define gcc to be used
GCC=gcc
GCCVERS=$(shell $(GCC) -dumpversion)
# On SL5 replace default (gcc41) by gcc44
ifeq ($(findstring 4.1., $(GCCVERS)), 4.1.)
GCC=gcc44
GCCVERS=$(shell $(GCC) -dumpversion)
endif
$(info Using gcc version $(GCCVERS))
# #################################################################
# On 32-bit systems:
# LARGE_SIZE=4
# #################################################################
......@@ -20,25 +32,30 @@ SUPPORT_ZLIB = yes
# Define the size of LARGE integers (4: INTERGER*4, 8: INTEGER*8)
LARGE_SIZE=8
# ompP profiler (http://www.ompp-tool.com)
OMPP =
OMPP =
# kinst-ompp
#
FCOMP = $(OMPP) gcc44
FCOMP = $(OMPP) $(GCC)
F_FLAGS = -Wall -fautomatic -fno-backslash -O3 -cpp -DLARGE_SIZE=${LARGE_SIZE}
#
CCOMP = $(OMPP) gcc44
CCOMP = $(OMPP) $(GCC)
C_FLAGS = -Wall -O3 -Df2cFortran
C_INCLUDEDIRS = # e.g. -I .
# gcc4 till gcc44:
C_LIBS = -lgfortran -lgfortranbegin
# gcc45, gcc46: C_LIBS = -lgfortran -lm
ifeq ($(findstring 4.4., $(GCCVERS)), 4.4.)
# gcc44:
C_LIBS = -lgfortran -lgfortranbegin
else
# gcc45, gcc46:
C_LIBS = -lgfortran
# math library -lm or -lquadmath may be required
endif
DEBUG = # e.g. -g
#
# Multithreading with OpenMP (TM)
C_LIBS += -lgomp
F_FLAGS += -fopenmp
#
LOADER = $(OMPP) gcc44
LOADER = $(OMPP) $(GCC)
L_FLAGS = -Wall -O3
#
# objects for this project
......
......@@ -418,6 +418,8 @@ PROGRAM mptwo
WRITE(*,111) __GNUC__ , __GNUC_MINOR__ , __GNUC_PATCHLEVEL__
111 FORMAT(' compiled with gcc ',i0,'.',i0,'.',i0)
#endif
WRITE(*,113) LARGE
113 FORMAT(' Large integers are INTEGER*',I1)
WRITE(*,*) ' '
WRITE(*,*) ' < Millepede II-P starting ... ',chdate
WRITE(*,*) ' ',chost
......@@ -1360,7 +1362,7 @@ SUBROUTINE peread(more)
END DO records
readBufferInfo(1,ithr)=-jfile ! flag eof
IF (kfd(1,jfile) == 0) THEN
IF (kfd(1,jfile) == 1) THEN
PRINT *, 'PEREAD: file ', kfile, 'read the first time, found',jrec,' records'
kfd(1,jfile)=-jrec
END IF
......@@ -1410,7 +1412,7 @@ SUBROUTINE peread(more)
jfile=readBufferInfo(1,k)
IF (jfile > 0) THEN ! rewind files
nrc=readBufferInfo(3,k)
IF (kfd(1,jfile) == 0) kfd(1,jfile)=-nrc
IF (kfd(1,jfile) == 1) kfd(1,jfile)=-nrc
IF (kfile <= nfilf) THEN
lun=kfile+10
REWIND lun
......@@ -5983,7 +5985,7 @@ SUBROUTINE filetc
DO i=1,nfiles
FORALL (k=1:lfd(i)) fname(k:k)=tfd(ioff+k)
! fname=tfd(i)(1:lfd(i))
IF (mprint > -1) WRITE(*,103) i,bite(mfd(i)),fname(1:lfd(i))
IF (mprint > 1) WRITE(*,103) i,bite(mfd(i)),fname(1:lfd(i))
WRITE(8,103) i,bite(mfd(i)),fname(1:lfd(i))
ioff=ioff+lfd(i)
END DO
......@@ -6049,7 +6051,7 @@ SUBROUTINE filetc
END DO
DO k=1,nfilb
kfd(1,k)=0 ! reset record counters
kfd(1,k)=1 ! reset (negated) record counters
kfd(2,k)=k ! set file number
ifd(k)=0 ! reset integrated record numbers
xfd(k)=0 ! reset max record size
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment