aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/WarpX.py
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pywarpx/WarpX.py')
-rw-r--r--Python/pywarpx/WarpX.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/pywarpx/WarpX.py b/Python/pywarpx/WarpX.py
index ef35f28ce..cfa556414 100644
--- a/Python/pywarpx/WarpX.py
+++ b/Python/pywarpx/WarpX.py
@@ -6,6 +6,7 @@
# License: BSD-3-Clause-LBNL
import re
+import sys
from . import Particles
from .Algo import algo
@@ -91,7 +92,9 @@ class WarpX(Bucket):
return argv
def init(self, mpi_comm=None, **kw):
- argv = ['warpx'] + self.create_argv_list(**kw)
+ # note: argv[0] needs to be an absolute path so it works with AMReX backtraces
+ # https://github.com/AMReX-Codes/amrex/issues/3435
+ argv = [sys.executable] + self.create_argv_list(**kw)
libwarpx.initialize(argv, mpi_comm=mpi_comm)
def evolve(self, nsteps=-1):