ugly hack for Abaqus in prec, it seems that it links against old (10.1) ifort where IEEE_arithmetic is not avaialbe.

Took the chance and cleaned the env file and used #ifdef# statement in the wrappers because in fixed format Fortran some lines of code might be interpretated as comments.
This should not happen, but it happens for Abaqus exp
This commit is contained in:
Martin Diehl 2015-04-15 18:10:56 +00:00
parent caf6611485
commit eb3173c6cc
5 changed files with 26 additions and 26 deletions

View File

@ -173,11 +173,14 @@ subroutine vumat(nBlock, nDir, nshr, nStateV, nFieldV, nProps, lAnneal, &
real(pReal), dimension(6,6) :: ddsdde
real(pReal) :: temp, timeInc, stresspower
integer(pInt) :: computationMode, n, i, cp_en
!$ integer :: defaultNumThreadsInt !< default value set by Abaqus
!$ include "omp_lib.h"
!$ defaultNumThreadsInt = omp_get_num_threads() ! remember number of threads set by Marc
!$ call omp_set_num_threads(DAMASK_NumThreadsInt) ! set number of threads for parallel execution set by DAMASK_NUM_THREADS
#ifdef _OPENMP
integer :: defaultNumThreadsInt !< default value set by Abaqus
include "omp_lib.h"
defaultNumThreadsInt = omp_get_num_threads() ! remember number of threads set by Marc
call omp_set_num_threads(DAMASK_NumThreadsInt) ! set number of threads for parallel execution set by DAMASK_NUM_THREADS
#endif
computationMode = CPFEM_CALCRESULTS ! always calculate
do n = 1,nblock(1) ! loop over vector of IPs

View File

@ -181,16 +181,18 @@ subroutine UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,&
real(pReal), dimension(6,6) :: ddsdde_h
integer(pInt) :: computationMode, i, cp_en
logical :: cutBack
!$ integer :: defaultNumThreadsInt !< default value set by Abaqus
!$ include "omp_lib.h"
#ifdef _OPENMP
integer :: defaultNumThreadsInt !< default value set by Abaqus
include "omp_lib.h"
defaultNumThreadsInt = omp_get_num_threads() ! remember number of threads set by Marc
call omp_set_num_threads(DAMASK_NumThreadsInt) ! set number of threads for parallel execution set by DAMASK_NUM_THREADS
#endif
temperature = temp ! temp is intent(in)
DDSDDT = 0.0_pReal
DRPLDE = 0.0_pReal
!$ defaultNumThreadsInt = omp_get_num_threads() ! remember number of threads set by Marc
!$ call omp_set_num_threads(DAMASK_NumThreadsInt) ! set number of threads for parallel execution set by DAMASK_NUM_THREADS
if (iand(debug_level(debug_abaqus),debug_levelBasic) /= 0 .and. noel == 1 .and. npt == 1) then
write(6,*) 'el',noel,'ip',npt
write(6,*) 'got kInc as',kInc

View File

@ -12,8 +12,12 @@
!! for details on NaN see https://software.intel.com/en-us/forums/topic/294680
!--------------------------------------------------------------------------------------------------
module prec
#if defined(Abaqus)
use ifport ! needed as a hack for Abaqus because version 6.12-2 is linked partly against Intel Fortran Compiler 10.1. allows to use non IEEE is NaN
#endif
#ifdef __INTEL_COMPILER
use, intrinsic :: & ! unfortunately not in commonly used gfortran versions
use, intrinsic :: & ! unfortunately not avialable in commonly used gfortran versions
IEEE_arithmetic
#endif
@ -171,10 +175,10 @@ logical elemental function prec_isNaN(a)
implicit none
real(pReal), intent(in) :: a
#ifndef __GFORTRAN__
prec_isNaN = IEEE_is_NaN(a)
#else
#if defined(__GFORTRAN__) || defined(Abaqus)
prec_isNaN = isNaN(a)
#else
prec_isNaN = IEEE_is_NaN(a)
#endif
end function prec_isNaN

View File

@ -29,18 +29,12 @@ fortCmd = "ifort"
# -assume byterecl count record length in bytes
# -real-size 64 -DFLOAT=8 assume size of real to be 8 bytes, matches our definition of pReal
# -integer-size 32 -DINT=4 assume size of integer to be 4 bytes, matches our definition of pInt
# -L/usr/lib64 -L/usr/lib search path for lapack libraries
# -Wl,-rpath=/usr/lib64,-rpath=/usr/lib run path for lapack libraries
# -llapack link against lapack
compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " +
"-I%I -I../lib -free -O1 -fpp -openmp " +
"-ftz -diag-disable 5268 " +
"-implicitnone -assume byterecl " +
"-real-size 64 -integer-size 32 -DFLOAT=8 -DINT=4 " +
"-L/usr/lib64 -L/usr/lib " +
"-Wl,-rpath=/usr/lib64,-rpath=/usr/lib " +
"-llapack")
"-real-size 64 -integer-size 32 -DFLOAT=8 -DINT=4")
# Abaqus/CAE will generate an input file without parts and assemblies.
cae_no_parts_input_file=ON

View File

@ -37,10 +37,7 @@ compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " +
"-I%I -I../lib -free -O1 -fpp " +
"-ftz -diag-disable 5268 " +
"-implicitnone -assume byterecl " +
"-real-size 64 -integer-size 32 -DFLOAT=8 -DINT=4 " +
"-L/usr/lib64 -L/usr/lib " +
"-Wl,-rpath=/usr/lib64,-rpath=/usr/lib " +
"-llapack")
"-real-size 64 -integer-size 32 -DFLOAT=8 -DINT=4")
# Abaqus/CAE will generate an input file without parts and assemblies.
cae_no_parts_input_file=ON