I have just installed the trial version of pgi cuda fortran. The documentation is not very clear about compilation and execution. Can anyone help with,say,how to compile and run the matrix multiplication code using cuda fortran?
Hi Hari46,
Sample code, including an example CUDA Fortran single precision matrix multiply routine can be found under you PGI installation’s “etc/samples/” directory. Compilation is the same as other Fortran files. The exception is that you might need to add the flag “-Mcuda” if your file does not use the “.cuf” suffix.
For example:
% pgf90 -o sgemm.out $PGI/linux86-64/10.1/etc/samples/sgemm.cuf
% sgemm.out
Device:Tesla T10 Processor, 1296.0 MHz clock, 4095.8 MB memory.
Test passed!
256x256 * 256x256: 3.170 ms 10.585 GFlops/s
Hope this helps,
Mat