Best to do what Rico says, but....

If the tcmalloc library is dynamically linked to Moses, running ldd will
show it is linked into moses:
  #ldd bin/moses
  .....
  libtcmalloc_minimal.so.4 => /usr/lib/libtcmalloc_minimal.so.4
(0x00007ff49f5a2000)
  ...
You can force it to statically link by deleting
   rm /usr/lib/libtcmalloc*.a

On 26 November 2014 at 10:50, Rico Sennrich <[email protected]> wrote:

> Li Xiang <lixiang.ict@...> writes:
>
> >
> > I compile Moses with tcmalloc. How can I test whether tcmalloc is used
> and
> evaluate the performance ?
> >
>
> there's probably many ways, but here's three:
>
> at compile time, you will see the following message if tcmalloc is not
> enabled:
>
> "Tip: install tcmalloc for faster threading.  See BUILD-INSTRUCTIONS.txt
> for
> more information."
>
> you can also use '--without-tcmalloc' to disable tcmalloc and compare speed
> to a binary that is compiled with tcmalloc.
>
> If you use profiling tools (such as 'perf'), you can see which malloc is
> being called. 'perf top' shows me this line, among others:
>
>   1.75%  moses_chart  moses                [.]
>
> tcmalloc::ThreadCache::ReleaseToCentralCache(tcmalloc::ThreadCache::FreeList*,
> unsigned long, int
>
> _______________________________________________
> Moses-support mailing list
> [email protected]
> http://mailman.mit.edu/mailman/listinfo/moses-support
>



-- 
Hieu Hoang
Research Associate
University of Edinburgh
http://www.hoang.co.uk/hieu
_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to