wilicc / gpu-burn

Multi-GPU CUDA stress test
BSD 2-Clause "Simplified" License
1.37k stars 295 forks source link

Use Names for Exit Codes #74

Closed nahmed3536 closed 1 year ago

nahmed3536 commented 1 year ago

Summary

Instead of hardcoding exit codes (such as 1, 15, 111, 123, 124), I've replaced them with the exit codes from errno.h, signal.h, and stdlib.h. This relates the exit codes to established standards.

Comments

For the exit code on line 458, instead of exiting with exit code 0, which indicates a success, I changed it to exit with ENODEV which corresponds with No such device since the reason for exiting is Could not invoke nvidia-smi, no temps available which indicates that there is no GPU device(s) for GPU Burn.

Test Plan

Ran GPU Burn several times with several flags on a machine with GPUs.
nahmed3536 commented 1 year ago

@wilicc Tagging you since I can't seem to add you as a reviewer on the PR.

wilicc commented 1 year ago

Good stuff, thanks.