Problem with computation in Lab (stops with no error)

Matan Grauer
  • 1
  • 16 May '22

Dear Dylan
I have some issues with the following code:

import illustris_python as il
import numpy as np
basePath = './sims.TNG/TNG50-3/output/' 

gas_dens = gas_dens = il.snapshot.loadSubset(basePath,99,'gas',['Density'])
gas_pos = il.snapshot.loadSubset(basePath,99,'gas',['Coordinates'])
GAS_DENSITY , xedges, yedges = np.histogram2d(gas_pos[:,0], gas_pos[:,1], weights = gas_dens, bins = num_bins)

I already used the code before and it worked in the past. But for some reason, it failed and stopped running without writing an error every time since then (I didn't change the code).
Please let me know what went wrong.


Dylan Nelson
  • 20 May '22


I suspect this is just hitting the memory limit and being killed on the Lab. To confirm, you can run against TNG50-4 instead. If that works fine, you have two options:

(1) download the data to your own system and run the calculation there
(2) change the method to not load all the data at once, but to load it in pieces (i.e. "chunks"). For a 2D histogram there is no need to have all the data in memory at once.

Matan Grauer
  • 29 May '22

Thank you very much!

  • Page 1 of 1