From 8f0f884eec7ea422fccf25a869fabdb42179dd15 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sun, 18 Aug 2013 11:13:47 -0400 Subject: [PATCH] Added OpenMP threading for fixed source runs. --- src/fixed_source.F90 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/fixed_source.F90 b/src/fixed_source.F90 index b057008728..cac08a1559 100644 --- a/src/fixed_source.F90 +++ b/src/fixed_source.F90 @@ -12,6 +12,7 @@ module fixed_source use tracking, only: transport type(Bank), pointer :: source_site => null() +!$omp threadprivate(source_site) contains @@ -23,11 +24,15 @@ contains if (master) call header("FIXED SOURCE TRANSPORT SIMULATION", level=1) ! Allocate particle and dummy source site +!$omp parallel allocate(source_site) +!$omp end parallel ! Turn timer and tallies on tallies_on = .true. +!$omp parallel call setup_active_usertallies() +!$omp end parallel call time_active % start() ! ========================================================================== @@ -47,6 +52,7 @@ contains ! ======================================================================= ! LOOP OVER PARTICLES +!$omp parallel do schedule(static) firstprivate(p) PARTICLE_LOOP: do i = 1, work ! Set unique particle ID @@ -67,6 +73,7 @@ contains call transport(p) end do PARTICLE_LOOP +!$omp end parallel do ! Accumulate time for transport call time_transport % stop()