Konstantina Panagiotopoulou <kwno...@hotmail.com> wrote on 10/25/2013
11:37:46 AM:

>
> Thank you both for your help. So I started with gperftools as David
suggested.
> But I'm having some problems since the manual refers to gcc mainly.
>
> So in my program I am compiling with :
>
> bin/x10c++ -gpt  -o myexecutable myprogram.x10
>
> But any pother gperf flag is not permitted. Say, I need the CPU
> profiling. Then I need to link with -lprofiler.
> How can I specify further options after the gpt flag?

Hi,

        when you invoke x10c++ with -gpt, it automatically adds the
-lprofiler argument to the g++ command it generates under the covers.  If
libprofiler.so is in a standard place (eg /usr/lib) then there is nothing
else to do.

        If you have gperf tools installed somewhere else, then you will need
to fiddle with the g++ command.  The easiest way to experiment with this is
to get x10c++ to print the g++ command it is using, and then manually
adjust that until you get something that works.

[dgrove@linchen myTests]$ x10c++ -gpt -report postcompile=5 HelloWorld.x10
 Output files: {HelloWorld=[HelloWorld.h, HelloWorld.cc]}
Executing post-compiler g++ -I/home/dgrove/x10-trunk/x10.dist/include
-I/home/dgrove/x10-trunk/x10.dist/stdlib/include
-I/home/dgrove/x10-trunk/myTests -I. -Wno-long-long -Wno-unused-parameter
-g -DHOMOGENEOUS -DX10_USE_BDWGC -Wl,--no-as-needed -pthread HelloWorld.cc
xxx_main_xxx.cc -L/home/dgrove/x10-trunk/x10.dist/stdlib/lib -lx10 -lgc -lm
-lpthread -lrt -ldl -L/home/dgrove/x10-trunk/x10.dist/lib -lx10rt_sockets
-Wl,--no-as-needed -lprofiler -Wl,--as-needed -Wl,--rpath
-Wl,/home/dgrove/x10-trunk/x10.dist/stdlib/lib -Wl,--rpath
-Wl,/home/dgrove/x10-trunk/x10.dist/lib -Wl,-export-dynamic


--dave
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to