Go to the source code of this file.
|
| int | main (int argc, char **argv) |
| |
◆ main()
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 22 of file gpu_activity.c.
27 printf(
"please supply Cuda app to be profiled \n");
42 while((
c=getopt(argc,argv,
"d:s:"))!=-1){
49 printf(
"GPU device ID not valid \n");
58 if(tmp < 0 || tmp > 5){
59 printf(
"PC sampling rate not valid \n");
64 printf(
"Switch not recognized by papi_sampling_cuda utility \n");
82 strcpy(env1,
"LD_LIBRARY_PATH=");
83 ld_lib=
getenv(
"LD_LIBRARY_PATH");
85 printf(
"Error loading CUDA shared libraries: LD_LIBRARY_PATH=NULL \n");
90 strcpy(env2,
"GPU_DEVICE_ID=");
93 strcpy(env3,
"PC_SAMPLING_RATE=");
97 char* env[]={env1,env2,env3,ld_prld, NULL};
100 printf(
"***************** PAPI_SAMPLING_CUDA utility **********************\n");
103 execve(var[0],var,env);
105 printf(
"Profile fork failed \n");