This error leaves me nowhere to go. The program compiled and I have lots of configuration variables. Hopefully there is a way to identify which variable has a problem. This occurs when I go to run it.
internal error: unknown config var case not handled appropriately
make: *** [run-listen] Error 2
The conditional for this error message in runtime/src/config.c is:
if (configVar == NULL || configVar == ambiguousConfigVar) {
chpl_internal_error("unknown config var case not handled appropriately");
}
The ambiguousConfigVar case could occur if you have the same config variable listed twice - that might be helpful in your case. I can't say much more without seeing some example code, ideally a small reproducer.
Aside from that, I agree the error message could be improved in a number of ways, such as providing line numbers, stating which variable is causes the issue, and/or a clearer description of why it is not handled.
This is an internal error, so not intended for the end-user -- more like an assertion failure / bug on our part.
Feeling responsible for this code, I took the obvious step of creating a program with two modules with a config of the same name and of one module with two configs of the same name, but they don't result in this behavior (as I'd hoped).
@buddha314: To help narrow down what's causing the error, if you would be willing to replace the line in runtime/src/config.c that @ben-albrecht refers to above to reads:
chpl_internal_error("unknown config var case not handled appropriately");
with
printf("error for module = %s, var = %s\n", moduleName, varName);
if (configVar == NULL) {
chpl_internal_error("Got a NULL");
} else {
chpl_internal_error("Got an ambiguous config var");
}
I think this would help you / us understand what's going wrong and create a reproducer (or just point us to the full-blown source if that's easy and possible to do).
[edit: Fixed the code snippet above]
could it happen if a config file provides a variable the program is not expecting?
I seem to get a different / clearer error message for that case.
@buddha314 : I'm still very interested in tracking this one down, and suspect the fix would be easy, but haven't been able to guess how to reproduce it. If you can still reproduce it yourself and would try applying the above patch, re-make-ing your build, and re-running to see which variable is being complained about, that'd be really helpful. Otherwise, I'm not sure how to proceed. Thanks.
I dropped the ball on this one. Let me see if I can make it happen again. Once I get past an error, I tend to forget about it. Apologies.
Closing this as a duplicate of #8600 where we made better progress on it.
Most helpful comment
I dropped the ball on this one. Let me see if I can make it happen again. Once I get past an error, I tend to forget about it. Apologies.