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

Lazy loading CompartmentReport before subprocess hangs #272

Open
antonelepfl opened this issue Jan 9, 2020 · 0 comments
Open

Lazy loading CompartmentReport before subprocess hangs #272

antonelepfl opened this issue Jan 9, 2020 · 0 comments

Comments

@antonelepfl
Copy link

Issue

I have an issue on BB5 where I need to use brion in combination with py-bluepy modules to read some reports and then execute other process with subprocess.
The issue is that after using brain to get some information, then subprocess hangs.
We were able to identify that if we load from brain import CompartmentReport at the beginning of the test_brion_report.py file (so it is not being lazy loading) the issue disappears.
But BluePy uses this with lazy load and anyhow it should work the same so, can you investigate why am I getting this issue?

I past below the files examples and the script to run this test.

Save files

run.sh

#!/bin/bash
module load brion
module load py-bluepy
python ./test_brion_report.py

test_brion_report.py

# from brain import CompartmentReport

t_start = 0
t_end = 300
t_step = 0.1
report_path = '/gpfs/bbp.cscs.ch/home/antonel/unicore_jobs/47f40ebc-8910-4fb5-99ad-d5fcc28ff059/5Cells_report_0.bbp'

def use_brain():
   import pandas as pd
   import numpy as np
   import subprocess
   from brain import CompartmentReport

   # obtained from the original brion code
   def _wrap_index(index):
      """ Create pandas (Multi)Iindex from 'raw' index. """
      return pd.MultiIndex.from_tuples(index)

   report = CompartmentReport(report_path)
   view = report.create_view([51848])

   print('Calling subprocess ---------------------')
   subprocess.call(['ls'])
   print('Done')

use_brain()

Allocate resources on BB5

salloc -n 1 --time 2:00:00 --account proj42 -C uc3 --partition prod

Run script

sh run.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant