Using the CUDA Visual Profiler How to load executable files in Visual profiler

When using the CUDA visual profiler what extension (if any) must be on the executables that you are seeking to profile? I know in Windows the extension should be *.exe. In Linux what should the extension be?

I wish to profile some of the example programs included in the NVIDIA 64 bit CUDA installlation.

I type cudaprof and cudaprof opens up.

I select File->New

because my project is new.

I then try to browse and select the CUDA program (from the example files) that I want to profile. But none are shown. As I said earlier in MS Windows the files would be identified with *.exe extension. But what about Linux; the executable files are identified by the green print out of their name.

However, in my case nothing is shown, so I can load nothing.

Again, I am using the 64 bit NVIDIA with Linux 64 bit operatng system. Can the profiler handle 64 bit files?

I just want to load a Linux executable and profile it. As I said when I come to that step nothing is shown. I can only assume that it must be looking for an extension. In a Linux compilation the generic executable is a.out, is it lookng for extenesion .out?

Newport_j

There is no default extension for Linux applications, although in general the UNIX convention has always been to use no extension for compiled executables. You can name them whatever you want, it makes no difference whatsoever.

The dialogue box you get in the visual profiler when you select new is asking you to give project a name and to select the a directory in which the project will operate (the dialog box even has a nice title “Please select a project directory”). It then shows a panel for the profiling session settings. The panel has three tabs, one of which is “Session”. On the “Session” tab you will see an option “launch”. Select it and a dialogue will open titled “Select an application to launch”. From there you can select the application you want to profile.

The visual profiler has built in help that briefly explains how everything works, and all the windows and dialogue boxes have pretty informative titles and helper text. I used to think it was completely intuitive, but perhaps it isn’t…

Linux doesn’t really traffic in extensions, as avidday stated. The way a linux system determines whether a program is executable or not is from the program’s flags. There are three levels of access, user, group, and other, and three flags for usability, read, write, and execute.

Say you create a shell script, called foo.bat. Do a long listing on it, right out of your text editor, and you get this:

M:test> ls -l

total 8

-rw-r–r-- 1 martin martin 56 Jan 20 23:55 foo.bat

The first rw- means that the user can read and write, but not execute it, second r-- means that the group can read, but not write or execute. Same for the third triplet for other users.

Now use the chmod command, like this:

M:test> chmod u+x foo.bat

That makes the file executable for the user. Doing another long listing (ls -l) gets this now:

M:test> ls -l

total 8

-rwxr–r-- 1 martin martin 56 Jan 20 23:55 foo.bat

foo.bat has gone from being non-executable to being executable. The extension is irrelevant. And standard usage is for executables to have whatever extension you want. I use .bat for some shell scripts, .data for data files, .hst for histograms, and usually no extension for compiled code or big control scripts. Many distributed files have the creation or version date in them, so program.09.03.17 could be the version from March 17, 2009. The idea is that the whole name is yours to play with and use for your convenience.

It’s possible that the visual profiler is looking for an executable flag. Other than that, I can’t help you with the visual profiler. But it seemed like your question implied a little confusion about linux.

To learn more about these commands, use the man pages in linux (enter man ls or man chmod at a prompt,) or google search them.

Good luck.

Regards,

Martin