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

PSRC Model crashes during non_mandatory_tour_frequency when compiling sharrow. #830

Open
stefancoe opened this issue Mar 8, 2024 · 2 comments
Labels
Bug Something isn't working/bug f

Comments

@stefancoe
Copy link
Contributor

Describe the bug
The model crashes during non_mandatory_tour_frequency when trying to compile sharrow using our small test data as inputs using the latest code on Main:

IndexError: Boolean array size 1824 is used to index array with shape (96, 210).

The model runs to completion when not running in compile mode. It also crashes using v1.2.2. It is difficult to find the exact commit that causes the issue as we have been mostly using branches on CS's forked repository for the last 6 months or so. It does run to completion using an older environment which I believe is using the explict-chunk-with-config branch.

To Reproduce
Steps to reproduce the behavior:

  1. Run the following with PSRC configs and test data, which I can provide.
    activitysim run -c configs_sh_compile -c configs_dev -d data_test -o output_test

I can provide the test data.
activitysim.log

@stefancoe stefancoe added the Bug Something isn't working/bug f label Mar 8, 2024
@i-am-sijia
Copy link
Contributor

I see you are running with household debug tracing. We have not been testing with tracing in the benchmarking tests, which could cause some oversight (as I raised on the Thursday call).

But this one it seems more Sharrow related, when it's indexing in sh_utility_fat. Are you able to run sharrow without household debug tracing?

  File "C:\Users\Modeller.PSRC\Anaconda3\envs\asim_main\lib\site-packages\activitysim\core\interaction_simulate.py", line 422, in eval_interaction_utilities
    sh_utility_fat = sh_utility_fat[trace_rows, :]
  File "C:\Users\Modeller.PSRC\Anaconda3\envs\asim_main\lib\site-packages\xarray\core\dataarray.py", line 860, in __getitem__
    return self.isel(indexers=self._item_key_to_dict(key))
  File "C:\Users\Modeller.PSRC\Anaconda3\envs\asim_main\lib\site-packages\xarray\core\dataarray.py", line 1479, in isel
    variable = self._variable.isel(indexers, missing_dims=missing_dims)
  File "C:\Users\Modeller.PSRC\Anaconda3\envs\asim_main\lib\site-packages\xarray\core\variable.py", line 993, in isel
    return self[key]
  File "C:\Users\Modeller.PSRC\Anaconda3\envs\asim_main\lib\site-packages\xarray\core\variable.py", line 763, in __getitem__
    dims, indexer, new_order = self._broadcast_indexes(key)
  File "C:\Users\Modeller.PSRC\Anaconda3\envs\asim_main\lib\site-packages\xarray\core\variable.py", line 605, in _broadcast_indexes
    self._validate_indexers(key)
  File "C:\Users\Modeller.PSRC\Anaconda3\envs\asim_main\lib\site-packages\xarray\core\variable.py", line 647, in _validate_indexers
    raise IndexError(
IndexError: Boolean array size 1824 is used to index array with shape (96, 210).

@stefancoe
Copy link
Contributor Author

Thanks @i-am-sijia! I tested running with tracing off and it did not crash so we are able to compile sharrow. I also tried testing with sharrow and it does not crash when tracing is off, but it does crash when tracing is on. So we will run with tracing turned off!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working/bug f
Projects
None yet
Development

No branches or pull requests

2 participants