Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activated environment propagation to new workers #15

Merged
merged 1 commit into from
Mar 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Instrumentation/ExtraeLocalManager.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function Distributed.launch(manager::ExtraeLocalManager, params::Dict, launched:
bind_to = manager.restrict ? `127.0.0.1` : `$(LPROC.bind_addr)`
cookie = cluster_cookie()

active_project = Base.active_project()
hookline = """
using Distributed
using Extrae
Expand All @@ -29,7 +30,7 @@ function Distributed.launch(manager::ExtraeLocalManager, params::Dict, launched:

# Bug: Instead of using julia_cmd(exename), I directly use exename because idk howto access Base.julia_cmd
for i in 1:manager.np
cmd = `env EXTRAE_SKIP_AUTO_LIBRARY_INITIALIZE=1 $exename $exeflags --project=. --bind-to $bind_to -e "$hookline"`
cmd = `env EXTRAE_SKIP_AUTO_LIBRARY_INITIALIZE=1 $exename $exeflags --project=$active_project --bind-to $bind_to -e "$hookline"`
io = open(detach(setenv(cmd, dir=dir)), "r+")

# Cluster cookie is not passed through IO. Instead, we set it
Expand Down