It is very frustrating when things fail silently or fail without knowing why. Sometimes we just see:
segfault
To resolve this, in key areas, we need to add prints before and after. A common failure is reading files if they are missing or have invalid contents. It would be nice to have something like:
About to read <file>
then right after it is done:
Finished reading <file>.
If we don't have the finished line and it fails later, we may think the reading was the failure, even if it read fine and failed on a future step.
It is very frustrating when things fail silently or fail without knowing why. Sometimes we just see:
segfault
To resolve this, in key areas, we need to add prints before and after. A common failure is reading files if they are missing or have invalid contents. It would be nice to have something like:
About to read <file>
then right after it is done:Finished reading <file>
.If we don't have the finished line and it fails later, we may think the reading was the failure, even if it read fine and failed on a future step.
The biggest usage is in:
readCsv()
function here: https://github.com/UBCSailbot/global-pathfinding/blob/master/src/grib/gribParse.cpp#L30 https://github.com/UBCSailbot/global-pathfinding/blob/master/src/grib/gribParse.cpp#L340Should add something like
std::cout << "About to read from " << csvfilename << std::endl;
at the beginning and end, maybe removing some other prints.