Closed michaelJwilson closed 2 years ago
Indeed, we carefully chose a definition of TARGETID
to allow a reasonable maximum for the number of objects in a brick. There cannot be more than ~4 million objects in a "portion" of the sky (a brick or HEALPixel). That's a hard-coded decision at this point, I would think.
Try nside=16
? Or whatever gives you fewer than 4.2 million targets in a pixel. Otherwise the mocks will need a different TARGETID
definition to the real data (we could rig that, we do have a few spare bits in TARGETID, but it would be messy).
Makes sense. The Galaxia mock are already packaged at 8, which isn't a decision I can lightly change I guess. I leave it for @moustakas to call (the latter doesn't sound like a route we should go down).
The bug above I originally found trying to create a minimal example that would reproduce this independent error, but I haven't been able to achieve that yet, in the meantime:
Traceback (most recent call last):
File "/global/common/software/desi/cori/desiconda/20200801-1.4.0-spec/code/desitarget/0.42.0/bin/mpi_select_mock_targets", line 4, in
I may not be understanding the error. Although the Galaxia mocks are organized on-disk into nside=8
pixels, select_mock_targets
can read arbitrarily sized healpixelized chunks of sky. Specifically, if you simulate nside=16
the code will go and figure out which pixels it needs to read from disk and pull out just the rows it needs.
So you should be able to circumvent / prevent this memory / bit overflow on TARGETID, I think.
@michaelJwilson I'd like to go ahead and close this ticket given the solution I proposed but feel free to reopen it if it's still on the critical path.
mockmaker.readmock('/global/cfs/cdirs/desi/mocks/mws/galaxia/alpha/v0.0.6/healpix/', healpixels=206, nside=8) ...:
INFO:mockmaker.py:1921:readmock: Reading /global/cfs/cdirs/desi/mocks/mws/galaxia/alpha/v0.0.6/healpix/8/2/206/mock_allsky_galaxia_desi-8-206.fits CRITICAL:targets.py:118:encode_targetid: Invalid range when making targetid: OBJID cannot exceed 4194303
OSError Traceback (most recent call last)