From 04d83ec9cd06123d9c644ad426efd48631e9be48 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 20 Mar 2012 12:26:21 +0000 Subject: [PATCH] added "-assume byterecl" in Makefile for ifortran to specify with "recl=" the size of the file in bytes instead of 4byte chunk when opening files. (same as in gfortran per default). no important changes in other files --- code/Makefile | 14 ++++++++------ code/compilation_info.f90 | 2 +- code/debug.f90 | 5 ++++- code/material.f90 | 2 +- code/prec.f90 | 1 + 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/code/Makefile b/code/Makefile index cf0f7aa52..089eb9d7f 100644 --- a/code/Makefile +++ b/code/Makefile @@ -121,10 +121,11 @@ OPTIMIZATION_DEFENSIVE_gfortran :=-O2 OPTIMIZATION_AGGRESSIVE_ifort :=-O3 $(PORTABLE_SWITCH) -ipo -static -no-prec-div -fp-model fast=2 OPTIMIZATION_AGGRESSIVE_gfortran :=-O3 $(PORTABLE_SWITCH) -ffast-math -funroll-loops -ftree-vectorize -ifeq "$(FASTBUILD)" "YES" -COMPILE_OPTIONS_ifort :=-fpp -else + COMPILE_OPTIONS_ifort :=-fpp\ + -assume byterecl +ifneq "$(FASTBUILD)" "YES" +COMPILE_OPTIONS_ifort :=$(COMPILE_OPTIONS_ifort)\ -implicitnone\ -diag-enable sc3\ -diag-disable 5268\ @@ -180,11 +181,12 @@ endif #-integer-size 16: set precision to one of those 16/32/64 (= 2/4/8 bytes) for standard integer (=4 for pInt) ################################################################################################### -ifeq "$(FASTBUILD)" "YES" + COMPILE_OPTIONS_gfortran :=-xf95-cpp-input\ -fno-range-check -else -COMPILE_OPTIONS_gfortran :=-xf95-cpp-input\ +ifneq "$(FASTBUILD)" "YES" +COMPILE_OPTIONS_gfortran :=$(COMPILE_OPTIONS_gfortran)\ + -xf95-cpp-input\ -ffree-line-length-132\ -fno-range-check\ -fimplicit-none\ diff --git a/code/compilation_info.f90 b/code/compilation_info.f90 index bf2ac277d..9f5692863 100644 --- a/code/compilation_info.f90 +++ b/code/compilation_info.f90 @@ -1,7 +1,7 @@ !$Id$ #ifdef __GFORTRAN__ #if __GNUC__<=4 && __GNUC_MINOR__<=5 - write(6,'(3(a,i2.2))') ' Compiled with GNU fortran version ', __GNUC__,'.',__GNUC_MINOR__,& + write(6,'(3(a,i2.2))') ' Compiled with GCC version ', __GNUC__,'.',__GNUC_MINOR__,& '.',__GNUC_PATCHLEVEL__ #else write(6,*) 'Compiled with ', compiler_version() !not supported by GFORTRAN 4.5 and ifort 12 diff --git a/code/debug.f90 b/code/debug.f90 index cf4cb135b..96eacdb48 100644 --- a/code/debug.f90 +++ b/code/debug.f90 @@ -21,7 +21,10 @@ !############################################################## module debug !############################################################## - use prec, only: pInt, pReal, pLongInt + use prec, only: & + pInt, & + pReal, & + pLongInt implicit none private diff --git a/code/material.f90 b/code/material.f90 index 7d05bc389..3a98d01ec 100644 --- a/code/material.f90 +++ b/code/material.f90 @@ -136,7 +136,7 @@ subroutine material_init debug_levelExtensive implicit none -!* Definition of variables + integer(pInt), parameter :: fileunit = 200_pInt integer(pInt) :: i,j, myDebug diff --git a/code/prec.f90 b/code/prec.f90 index 39527b1ec..2492ea03b 100644 --- a/code/prec.f90 +++ b/code/prec.f90 @@ -56,6 +56,7 @@ subroutine prec_init use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment) implicit none + !$OMP CRITICAL (write2out) write(6,*) write(6,*) '<<<+- prec init -+>>>'