You are here

Using mode=profile

3 posts / 0 new
Last post
Using mode=profile
#1

Thanks in advance.

I need to see which functions are using the most time so I compiled with:

scons mode=profile extras=opencl bin

That was successful and I ran my program:

~/rosetta_source/bin/ragul_darc_run.opencl.macosgccprofile -database ~/rosetta_database/ -input_protein_file 2YXJ.pdb -input_ligand_file ZINC01350605_0001.fa.pdb -extra_res_fa ZINC01350605_0001.fa.params

That was successful and it created a file gmon.out.

But I'm not sure how to work with this. My understanding of gprof is that I need a command like:

gcc -g -pg executable.exe gmon.out

So I tried: (which lacks the command options)

gcc -g -pg ~/rosetta_source/bin/ragul_darc_run.opencl.macosgccprofile gmon.out

And got this error:

ld: in /Users/karenkhar/rosetta_source/bin/ragul_darc_run.opencl.macosgccprofile, can't link with a main executable for architecture x86_64
collect2: ld returned 1 exit status

Also tried:

gcc -g -pg ~/rosetta_source/bin/ragul_darc_run.opencl.macosgccprofile -database ~/rosetta_database/ -input_protein_file 2YXJ.pdb -input_ligand_file ZINC01350605_0001.fa.pdb -extra_res_fa ZINC01350605_0001.fa.params gmon.out

And got this error:

ld: unknown option: -extra_res_fa
collect2: ld returned 1 exit status

Where have I gone wrong?

Post Situation: 
Fri, 2012-07-06 00:29
Biokhar

I also tried:

gprof ~/rosetta_source/bin/ragul_darc_run.opencl.macosgccprofile > out.txt

But out.txt didn't have data:

granularity: each sample hit covers 4 byte(s) no time propagated

called/total parents
index %time self descendents called+self name index
called/total children

And nothing followed that, suggesting there should be something there, but the profiling failed.

Fri, 2012-07-06 03:25
Biokhar

To be honest, I have not had much luck with mode=profile. If you would like to see what function is taking the most time I would use a profiling software. A lot of people in the community use Shark for Macs. I use valgrind with a tool called callgrind. The command is valgirnd --tools=callgrind. It outputs a log file that you can analyze with kcachegrind.

I should also mention that you can use valgrind in release mode.

Fri, 2012-07-06 06:26
scombs