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

GET DIRECT DATA on a subdimension generates zero size lookups #163

Closed
ToddFincannon opened this issue Nov 5, 2021 · 1 comment · Fixed by #164 or #190
Closed

GET DIRECT DATA on a subdimension generates zero size lookups #163

ToddFincannon opened this issue Nov 5, 2021 · 1 comment · Fixed by #164 or #190
Assignees
Labels
Milestone

Comments

@ToddFincannon
Copy link
Collaborator

When an array on a subdimension reads data from a CSV file using GET DIRECT DATA:

DimM: M1, M2, M3 ~~|
SubM: M2, M3 ~~|

q[SubM] = GET DIRECT DATA('e_data.csv', ',', 'A', 'B2') ~~|

The generated lookup size is zero:

_q[2] = __new_lookup(0, /*copy=*/true, (double[]){  });

This causes a memory read error (see #161).

@ToddFincannon ToddFincannon self-assigned this Nov 5, 2021
@ToddFincannon
Copy link
Collaborator Author

We were using the index in the subdimension family instead of the subdimension itself. The family size is larger than the subdimension size, so the CSV read would come up empty, resulting in a zero size lookup. The solution is to detect which situation is in effect and use the correct index.

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