fixed usage of OpenMP function library
This commit is contained in:
parent
fc7b4d6471
commit
5b7f2e122e
|
@ -238,10 +238,10 @@ subroutine hypela2(&
|
|||
debug_reset
|
||||
use mesh, only: mesh_FEasCP
|
||||
use CPFEM, only: CPFEM_initAll,CPFEM_general,CPFEM_init_done
|
||||
!$ use OMP_LIB ! the openMP function library
|
||||
!$ use numerics, only: DAMASK_NumThreadsInt ! number of threads set by DAMASK_NUM_THREADS
|
||||
|
||||
implicit none
|
||||
include "omp_lib.h" ! the openMP function library
|
||||
! ** Start of generated type statements **
|
||||
real(pReal) coord, d, de, disp, dispt, dt, e, eigvn, eigvn1, ffn, ffn1
|
||||
real(pReal) frotn, frotn1, g
|
||||
|
|
|
@ -107,8 +107,6 @@ program DAMASK_spectral
|
|||
materialpoint_sizeResults, &
|
||||
materialpoint_results
|
||||
|
||||
!$ use OMP_LIB ! the openMP function library
|
||||
|
||||
implicit none
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! variables related to information from load case and geom file
|
||||
|
|
|
@ -105,8 +105,6 @@ program DAMASK_spectral_AL
|
|||
materialpoint_sizeResults, &
|
||||
materialpoint_results
|
||||
|
||||
!$ use OMP_LIB ! the openMP function library
|
||||
|
||||
implicit none
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! variables to read from load case and geom file
|
||||
|
|
|
@ -43,6 +43,7 @@ ACMLROOT :=/opt/acml4.4.0
|
|||
|
||||
F90 ?=ifort
|
||||
COMPILERNAME ?= $(F90)
|
||||
INCLUDE_DIRS +=-I$(DAMASK_ROOT)/lib
|
||||
|
||||
ifeq "$(FASTBUILD)" "YES"
|
||||
OPENMP :=OFF
|
||||
|
@ -105,13 +106,13 @@ endif
|
|||
endif
|
||||
|
||||
ifdef STANDARD_CHECK
|
||||
STANDARD_CHECK_ifort =$(STANDARD_CHECK)
|
||||
STANDARD_CHECK_gfortran =$(STANDARD_CHECK)
|
||||
STANDARD_CHECK_ifort =$(STANDARD_CHECK) -DSTANDARD_CHECK
|
||||
STANDARD_CHECK_gfortran =$(STANDARD_CHECK) -DSTANDARD_CHECK
|
||||
endif
|
||||
|
||||
ifneq "$(FASTBUILD)" "YES"
|
||||
STANDARD_CHECK_ifort ?=-stand f08 -standard-semantics -warn stderrors
|
||||
STANDARD_CHECK_gfortran ?=-std=f2008 -fall-intrinsics
|
||||
STANDARD_CHECK_ifort ?=-stand f08 -standard-semantics -warn stderrors -DSTANDARD_CHECK
|
||||
STANDARD_CHECK_gfortran ?=-std=f2008 -fall-intrinsics -DSTANDARD_CHECK
|
||||
endif
|
||||
#-fall-intrinsics: all intrinsic procedures (including the GNU-specific extensions) are accepted. This can be useful with -std=f95 to force standard-compliance
|
||||
# but get access to the full range of intrinsics available with gfortran. As a consequence, -Wintrinsics-std will be ignored and no user-defined
|
||||
|
@ -254,8 +255,8 @@ endif
|
|||
#-fdefault-integer-8: set precision to 8 bytes for standard integer (=4 for pInt)
|
||||
##################################################################################################
|
||||
|
||||
COMPILE =$(OPENMP_FLAG_$(F90)) $(COMPILE_OPTIONS_$(F90)) $(STANDARD_CHECK_$(F90)) $(OPTIMIZATION_$(OPTI)_$(F90))
|
||||
COMPILE_MAXOPTI =$(OPENMP_FLAG_$(F90)) $(COMPILE_OPTIONS_$(F90)) $(STANDARD_CHECK_$(F90)) $(OPTIMIZATION_$(MAXOPTI)_$(F90))
|
||||
COMPILE =$(OPENMP_FLAG_$(F90)) $(COMPILE_OPTIONS_$(F90)) $(STANDARD_CHECK_$(F90)) $(OPTIMIZATION_$(OPTI)_$(F90)) $(INCLUDE_DIRS)
|
||||
COMPILE_MAXOPTI =$(OPENMP_FLAG_$(F90)) $(COMPILE_OPTIONS_$(F90)) $(STANDARD_CHECK_$(F90)) $(OPTIMIZATION_$(MAXOPTI)_$(F90)) $(INCLUDE_DIRS)
|
||||
###################################################################################################
|
||||
COMPILED_FILES = prec.o DAMASK_spectral_interface.o IO.o numerics.o debug.o math.o \
|
||||
FEsolving.o mesh.o material.o lattice.o \
|
||||
|
|
|
@ -106,16 +106,20 @@ subroutine numerics_init
|
|||
IO_floatValue, &
|
||||
IO_intValue, &
|
||||
IO_warning
|
||||
!$ use OMP_LIB ! the openMP function library
|
||||
|
||||
implicit none
|
||||
#ifdef STANDARD_CHECK ! If STANDARD_CHECK is defined (as in the makefile for the spectral solver by setting
|
||||
!$ use OMP_LIB ! -DSTANDARD_CHECK use the module file for the openMP function library
|
||||
#endif ! REASON: module file crashes with Marc but omp_lib.h is not standard conform
|
||||
implicit none ! and ifort will does not compile it (gfortran seems to have an exeption)
|
||||
#ifndef STANDARD_CHECK ! if STANDARD_CHECK is not defined (e.g. when compiling with Marc or Abaqus)
|
||||
!$ include "omp_lib.h" ! use this file for the openMP function library
|
||||
#endif
|
||||
integer(pInt), parameter :: fileunit = 300_pInt ,&
|
||||
maxNchunks = 2_pInt
|
||||
!$ integer :: gotDAMASK_NUM_THREADS = 1
|
||||
integer(pInt), dimension(1+2*maxNchunks) :: positions
|
||||
character(len=64) :: tag
|
||||
character(len=1024) :: line
|
||||
!$ character(len=6) DAMASK_NumThreadsString !environment variable DAMASK_NUM_THREADS
|
||||
!$ character(len=6) DAMASK_NumThreadsString ! environment variable DAMASK_NUM_THREADS
|
||||
|
||||
!$OMP CRITICAL (write2out)
|
||||
write(6,*)
|
||||
|
|
Loading…
Reference in New Issue