Read contents of PC Sampling Continuous output (dat file)

I am looking into the code samples provided in /usr/local/cuda-11.8/extras/CUPTI/samples/pc_sampling_continuous/. I am trying to get the PC stall reasons (from an executable) without modifying the source code using CUPTI. pc_sampling_continuous seems to be doing exactly the same.

When I am running the command :
./libpc_sampling_continuous.pl --collection-mode 1 --sampling-period 7 --file-name pcsampling.dat --verbose --app "./executable_name", it outputs a dat file.

To read this .dat file, /usr/local/cuda-11.8/extras/CUPTI/samples/pc_sampling_utility/ contains an utility file. This is run with the command:
./pc_sampling_utility --file-name 1_pcsampling.dat and it is able to output in a human readable format.

I have 2 problems regarding this:

  1. It always says lineNumber:0, fileName: ERROR_NO_CUBIN, dirName: , in each line. However it is able to show me the stalls. But without correlating to the line number in the code and SASS (both) , it is of no use.

  2. README file tells that I should be using the cubin file for the source correlation. I am able to generate the cubin file (as cuobjdump -xelf all ./executable_name and renaming it to 1.cubin). But I am not able to understand how to input this cubin file together with the .dat file to pc_sampling_utility.

Any help is appreciated.

Please put the .cubin file in the folder in which the pc_sampling_utility executable is created.

In your case the folder should be /usr/local/cuda-11.8/extras/CUPTI/samples/pc_sampling_utility.

Yes, it is in the same folder. Hence, the confusion

Please make sure that the app is compiled with the nvcc -lineinfo option.

Also as mentioned in CUPTI/samples/pc_sampling_utility/README.txt make sure that the “cuobjdump” utility version is the same as the CUDA Toolkit version used to build the CUDA application executable or library files.

Hello,

To read the contents of a PC sampling continuous output .dat file, you can use a variety of tools and techniques depending on the specific format of the file. One approach is to use a text editor or a programming language such as Python to read the contents of the file and extract the relevant data.

If the file contains structured data such as CSV or JSON, you can use a library such as pandas or json to read the file and extract the data into a usable format. If the file is in a binary format, you may need to use a lower-level programming language such as C++ to parse the data.

Regarding your interest in a MERN stack development course, that sounds like a great idea if you are interested in building full-stack web applications. The MERN stack consists of MongoDB, Express, React, and Node.js, which are all popular technologies for building scalable and performant web applications.

There are many resources available for learning the MERN stack, including online courses, tutorials, and documentation. I would recommend starting with the official documentation for each technology and then exploring online resources such as Udemy or Coursera for structured courses.

Best of luck with your learning journey!

Ok nice, this is best their is also a best python development course for students and working professionals in india. You can learn from anywhere