From 78799f9794cf1e7cf74ad5ad1b87defb510ecf05 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 23 May 2021 18:44:24 +0200 Subject: [PATCH] fix for openMP --- src/homogenization.f90 | 7 +++---- src/phase.f90 | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/homogenization.f90 b/src/homogenization.f90 index f25a749c2..3162daada 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -236,21 +236,20 @@ subroutine materialpoint_stressAndItsTangent(dt,FEsolving_execIP,FEsolving_execE NiterationMPstate, & ip, & !< integration point number el, & !< element number - myNgrains, co, ce, ho, en, ph + co, ce, ho, en, ph logical :: & converged logical, dimension(2) :: & doneAndHappy !$OMP PARALLEL - !$OMP DO PRIVATE(ce,en,ho,myNgrains,NiterationMPstate,converged,doneAndHappy) + !$OMP DO PRIVATE(ce,en,ho,NiterationMPstate,converged,doneAndHappy) do el = FEsolving_execElem(1),FEsolving_execElem(2) do ip = FEsolving_execIP(1),FEsolving_execIP(2) ce = (el-1)*discretization_nIPs + ip en = material_homogenizationEntry(ce) ho = material_homogenizationID(ce) - myNgrains = homogenization_Nconstituents(ho) call phase_restore(ce,.false.) ! wrong name (is more a forward function) @@ -267,7 +266,7 @@ subroutine materialpoint_stressAndItsTangent(dt,FEsolving_execIP,FEsolving_execE call mechanical_partition(homogenization_F(1:3,1:3,ce),ce) converged = .true. - do co = 1, myNgrains + do co = 1, homogenization_Nconstituents(ho) converged = converged .and. crystallite_stress(dt,co,ip,el) enddo diff --git a/src/phase.f90 b/src/phase.f90 index a72d72d1a..58776229f 100644 --- a/src/phase.f90 +++ b/src/phase.f90 @@ -564,7 +564,7 @@ subroutine crystallite_init() flush(IO_STDOUT) - !$OMP PARALLEL DO + !$OMP PARALLEL DO PRIVATE(ce) do el = 1, eMax do ip = 1, iMax ce = (el-1)*discretization_nIPs + ip