You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the prediction spagetti file contains only NaN in a particular row, BaM will fail in the envelop computation and crash with the error At line 89 of file quicksort_X_INC.f90 (it is actually in the miniDMSL lib that the crash occurs). Sorting only NaN is indeed not possible in this case, that is why BaM crashes... However, it would be usefull to simply return NaN for any quantile (or other statistics) computed this way instead of crashing. A simple check before computing any stats could be done so any statistics computation is bypassed in this particular case.
This is an annoying bug for me. It is currently blocking me In my development of BaRatinAGE although I can imagine some workaround on my end.
Reproduction of the bug
You can run the following example to reproduce the error. From within the config files directory, run /path/to/BaM -cf "./Config_BaM.txt.
If you want to prevent failure, simply remove the first 50 values from input_prediction_data.txt and edit the file Config_Pred_u.txt file to indicate that there are 50 observations instead of 100 in the second row.
The text was updated successfully, but these errors were encountered:
…ed when computing spaghettis (e.g. when predicting h^theta with h<0). This causes a crash when computing envelops because sorting NAs is impossible.
This fixes issue #17.
This is a bit tricky because I'm not fully familiar with the handling of NAs in Fortran, as it depends on compiler settings. What I did is implementing a NA check by testing (value/=value) (which is true if value is NA), and returning the unfeasible flag in envelops when computation becomes impossible (I used an unfeasible flag rather than NAs because I don't want to manipulate them explicitly in the code).
That being said, I think the best practice is to try catching the problem before it occurs. In the formula you used for instance, this means replacing h^c by e.g. -9999.99*issneg(h) + (ispos(h)*h)^c (returns -9999.99 if h<0, h^c otherwise)
Description
When the prediction spagetti file contains only NaN in a particular row, BaM will fail in the envelop computation and crash with the error
At line 89 of file quicksort_X_INC.f90
(it is actually in the miniDMSL lib that the crash occurs). Sorting only NaN is indeed not possible in this case, that is why BaM crashes... However, it would be usefull to simply return NaN for any quantile (or other statistics) computed this way instead of crashing. A simple check before computing any stats could be done so any statistics computation is bypassed in this particular case.This is an annoying bug for me. It is currently blocking me In my development of BaRatinAGE although I can imagine some workaround on my end.
Reproduction of the bug
You can run the following example to reproduce the error. From within the config files directory, run
/path/to/BaM -cf "./Config_BaM.txt
.ISSUE_ENV_STAT_COMPUTATION_FAILS.zip
If you want to prevent failure, simply remove the first 50 values from
input_prediction_data.txt
and edit the fileConfig_Pred_u.txt
file to indicate that there are 50 observations instead of 100 in the second row.The text was updated successfully, but these errors were encountered: