From 8eeec5c0f1a6c164a93c066a898520dfecfc3e76 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 3 Jul 2018 12:05:14 +0200 Subject: [PATCH] also Abaqus works with openMP now/again? --- installation/mods_Abaqus/abaqus_v6.env | 4 ++-- installation/mods_Abaqus/abaqus_v6_debug.env | 1 - src/numerics.f90 | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/installation/mods_Abaqus/abaqus_v6.env b/installation/mods_Abaqus/abaqus_v6.env index fb243e987..d09257a9d 100644 --- a/installation/mods_Abaqus/abaqus_v6.env +++ b/installation/mods_Abaqus/abaqus_v6.env @@ -19,7 +19,7 @@ fortCmd = "ifort" # -free to use free-format FORTRAN 90 syntax # -O <0-3> optimization level # -fpp use FORTRAN preprocessor on source code -# -openmp build with openMP support +# -fopenmp build with openMP support # -w90 -w95 suppress messages about use of non-standard Fortran (previous version of abaqus_v6.env only) # -WB turn a compile-time bounds check into a warning (previous version of abaqus_v6.env only) # -mP2OPT_hpo_vec_divbyzero=F inofficial compiler switch, proposed by abaqus but highly dubios (previous version of abaqus_v6.env only) @@ -32,7 +32,7 @@ fortCmd = "ifort" # -integer-size 32 -DINT=4 assume size of integer to be 4 bytes, matches our definition of pInt compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " + - "-I%I -free -O3 -fpp " + + "-I%I -free -O3 -fpp -fopenmp " + "-ftz -diag-disable 5268 " + "-implicitnone -standard-semantics " + "-assume nostd_mod_proc_name " + diff --git a/installation/mods_Abaqus/abaqus_v6_debug.env b/installation/mods_Abaqus/abaqus_v6_debug.env index 2b112f29a..51bb9505d 100644 --- a/installation/mods_Abaqus/abaqus_v6_debug.env +++ b/installation/mods_Abaqus/abaqus_v6_debug.env @@ -19,7 +19,6 @@ fortCmd = "ifort" # -free to use free-format FORTRAN 90 syntax # -O <0-3> optimization level # -fpp use FORTRAN preprocessor on source code -# -openmp build with openMP support # -w90 -w95 suppress messages about use of non-standard Fortran (previous version of abaqus_v6.env only) # -WB turn a compile-time bounds check into a warning (previous version of abaqus_v6.env only) # -mP2OPT_hpo_vec_divbyzero=F inofficial compiler switch, proposed by abaqus but highly dubios (previous version of abaqus_v6.env only) diff --git a/src/numerics.f90 b/src/numerics.f90 index 27b04cd67..8de664248 100644 --- a/src/numerics.f90 +++ b/src/numerics.f90 @@ -217,12 +217,12 @@ subroutine numerics_init #include use petscsys #endif -#if defined(Spectral) || defined(FEM) -!$ use OMP_LIB, only: omp_set_num_threads ! Use the standard conforming module file for omp if using the spectral solver +#if !defined(Marc4DAMASK) +!$ use OMP_LIB, only: omp_set_num_threads ! Standard conforming module implicit none #else implicit none -!$ include "omp_lib.h" ! use the not F90 standard conforming include file to prevent crashes with some versions of MSC.Marc +!$ include "omp_lib.h" ! MSC.Marc includes this file on !its own, avoid conflict with the OMP_LIB module #endif integer(pInt), parameter :: FILEUNIT = 300_pInt !$ integer :: gotDAMASK_NUM_THREADS = 1