Joined: 30 Jun 2004
Location: The Portland Group Inc.
|Posted: Thu Feb 04, 2010 1:02 pm Post subject:
As of 10.2, pgaccelinfo will return "0" if it was able successfully detect that the system has a functioning accelerator. It returns non-zero for errors and if no accelerator was found.
We've also add the "-short" ("-s") and "-quiet" ("-q") flags:
System with accelerator with 4 Tesla cards:
|% pgaccelinfo -help
-all - show accelerators of all types (default)
-amd - show AMD/ATI accelerators
-ati - same as -amd
-help - show this help information
-nv - same as -nvidia
-nvidia - show NVIDIA accelerators
-quiet - no output, just return code
-short - brief output, one line
-v - show additional information for accelerators not found
% pgaccelinfo -short
0 Tesla T10 Processor
1 Tesla T10 Processor
2 Tesla T10 Processor
3 Tesla T10 Processor
% pgaccelinfo -quiet
% echo $?
System without an accelerator:
No accelerators found.
Try pgaccelinfo -v for more information
% echo $?
Also, in the "etc/samples" directory, the "cufinfo.cuf" sample code contains the simplified CUDA Fortran version of pgaccelinfo.
Thanks for the suggestion,