From fdc832f0d83ad87dcd40fb0d24d1801365b918de Mon Sep 17 00:00:00 2001 From: Philipp Jurasic Date: Thu, 14 Nov 2024 14:52:04 +0100 Subject: [PATCH 1/2] pp00aa use dynamic OpenMP scheduling due to load imbalance --- src/pp00aa.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pp00aa.f90 b/src/pp00aa.f90 index dc91ff31..0de63577 100644 --- a/src/pp00aa.f90 +++ b/src/pp00aa.f90 @@ -145,7 +145,7 @@ subroutine pp00aa SALLOCATE( utflag, (ioff:lnPtrj ), 0 ) ! error flag that indicates if fieldlines successfully followed; 22 Apr 13; SALLOCATE( fiota, (ioff:lnPtrj, 1:2 ), zero ) ! will always need fiota(0,1:2); -!$OMP PARALLEL DO SHARED(lnPtrj,ioff,Wpp00aa,Nz,data,fiota,utflag,iota,oita,myid,vvol,cpus,Lconstraint,nPpts,ppts) PRIVATE(itrj,sti) +!$OMP PARALLEL DO SHARED(lnPtrj,ioff,Wpp00aa,Nz,data,fiota,utflag,iota,oita,myid,vvol,cpus,Lconstraint,nPpts,ppts) PRIVATE(itrj,sti) SCHEDULE(dynamic) do itrj = ioff, lnPtrj ! initialize Poincare plot with trajectories regularly spaced between interfaces along \t=0; ; sti(1:2) = (/ - one + itrj * two / lnPtrj , Ppts*pi /) From e406819335b6b5527452d4e9c19e001b479cd4bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Jura=C5=A1i=C4=87?= <58512364+missing-user@users.noreply.github.com> Date: Mon, 18 Nov 2024 18:50:38 +0100 Subject: [PATCH 2/2] Update _plot_pressure.py --- Utilities/pythontools/py_spec/output/_plot_pressure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/pythontools/py_spec/output/_plot_pressure.py b/Utilities/pythontools/py_spec/output/_plot_pressure.py index 6110699c..97d51d0b 100644 --- a/Utilities/pythontools/py_spec/output/_plot_pressure.py +++ b/Utilities/pythontools/py_spec/output/_plot_pressure.py @@ -10,7 +10,7 @@ def plot_pressure(self, normalize=True, ax=None, **kwargs): import matplotlib.pyplot as plt pressure = np.atleast_1d(self.input.physics.pressure) * self.input.physics.pscale - tflux = self.output.tflux[: len(pressure)] + tflux = np.atleast_1d(self.output.tflux)[: len(pressure)] if not normalize: # remove mu_0 pressure /= 4 * np.pi * 1.0e-7