From 26c6063a2c1e70d4ec7b4139891583525a91894e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 28 Apr 2012 10:46:41 +0000 Subject: [PATCH] utf8 encoding output to screen now for all solvers using intel ifort>10 or any gfortran (old versions might not support it, but we don't use them anyway) --- code/DAMASK_spectral_interface.f90 | 1 - code/prec.f90 | 16 +++++++++++----- code/prec_single.f90 | 16 +++++++++++----- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/code/DAMASK_spectral_interface.f90 b/code/DAMASK_spectral_interface.f90 index d3e0d8fc6..0582e14bb 100644 --- a/code/DAMASK_spectral_interface.f90 +++ b/code/DAMASK_spectral_interface.f90 @@ -67,7 +67,6 @@ subroutine DAMASK_interface_init(loadcaseParameterIn,geometryParameterIn) length integer, dimension(8) :: & dateAndTime ! type default integer - open (6, encoding='UTF-8') write(6,'(a)') '' write(6,'(a)') '<<<+- DAMASK_spectral_interface init -+>>>' write(6,'(a)') '$Id$' diff --git a/code/prec.f90 b/code/prec.f90 index 2492ea03b..bdf3e5c7e 100644 --- a/code/prec.f90 +++ b/code/prec.f90 @@ -19,6 +19,12 @@ !############################################################## !* $Id$ !############################################################## +#ifdef __INTEL_COMPILER +#if __INTEL_COMPILER<1200 +#define LEGACY_COMPILER +#endif +#endif + module prec !############################################################## @@ -34,12 +40,8 @@ module prec ! NaN is precision dependent ! from http://www.hpc.unimelb.edu.au/doc/f90lrm/dfum_035.html ! copy can be found in documentation/Code/Fortran -#ifdef __INTEL_COMPILER -#if __INTEL_COMPILER<1200 +#ifdef LEGACY_COMPILER real(pReal), parameter, public :: DAMASK_NaN = Z'7FF0000000000001' -#else - real(pReal), parameter, public :: DAMASK_NaN = real(Z'7FF0000000000001', pReal) -#endif #else real(pReal), parameter, public :: DAMASK_NaN = real(Z'7FF0000000000001', pReal) #endif @@ -58,6 +60,10 @@ subroutine prec_init implicit none !$OMP CRITICAL (write2out) +#ifndef LEGACY_COMPILER + open (6, encoding='UTF-8') +#endif + write(6,*) write(6,*) '<<<+- prec init -+>>>' write(6,*) '$Id$' diff --git a/code/prec_single.f90 b/code/prec_single.f90 index 168535eee..dd57b6237 100644 --- a/code/prec_single.f90 +++ b/code/prec_single.f90 @@ -19,6 +19,12 @@ !############################################################## !* $Id$ !############################################################## +#ifdef __INTEL_COMPILER +#if __INTEL_COMPILER<1200 +#define LEGACY_COMPILER +#endif +#endif + module prec !############################################################## @@ -34,12 +40,8 @@ module prec ! NaN is precision dependent ! from http://www.hpc.unimelb.edu.au/doc/f90lrm/dfum_035.html ! copy can be found in documentation/Code/Fortran -#ifdef __INTEL_COMPILER -#if __INTEL_COMPILER<1200 +#ifdef LEGACY_COMPILER real(pReal), parameter, public :: DAMASK_NaN = Z'Z'7F800001', pReal' -#else - real(pReal), parameter, public :: DAMASK_NaN = real(Z'7F800001', pReal) -#endif #else real(pReal), parameter, public :: DAMASK_NaN = real(Z'7F800001', pReal) #endif @@ -58,6 +60,10 @@ subroutine prec_init implicit none !$OMP CRITICAL (write2out) +#ifndef LEGACY_COMPILER + open (6, encoding='UTF-8') +#endif + write(6,*) write(6,*) '<<<+- prec_single init -+>>>' write(6,*) '$Id$'