Using mode=profile

Member Site Forums Rosetta 3 Rosetta 3 – General Using mode=profile

  • This topic has 2 replies, 2 voices, and was last updated 12 years ago by Anonymous.
Viewing 2 reply threads
  • Author
    Posts
    • #1338
      Anonymous

        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?

      • #7382
        Anonymous

          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.

        • #7383
          Anonymous

            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.

        Viewing 2 reply threads
        • You must be logged in to reply to this topic.