[CMake] Issues with CMake + TAU

sindimo sindimo at gmail.com
Wed Apr 9 11:46:19 EDT 2014


The wrapper scripts aren't ours, they are part of the TAU profiler tool
from the University of Oregon, so it's not something we would like to edit
or mingle with.



As a workaround I've implemented a custom command that runs post build
which does the job, I'll post it here if anyone else is having the same
issue:



################################

if(UNIX)



#Cleanup TAU temp files



    add_custom_command(TARGET  myApp.exe



      POST_BUILD



      #Move TAU temp files to output folder

      COMMAND  mv

      ARGS     -f *.pp.* ${LIBRARY_OUTPUT_PATH}



      COMMENT  "Cleaning TAU temp files"

    )



endif(UNIX)

################################



The only issue with this is that if I cancel the build intentionally while
it's taking place (e.g. CTRL+C) or the build fails for whatever reason, the
TAU temp files will remain in the current directory since the clean up only
happens after a successful post build.



If anyone has any better ideas please let me know.



I came across this document online and it mentions patching CMake to work
better with TAU, I am guessing this is not official from CMake, but maybe
worth thinking of to add new CMake TAU variables:

http://graal.ens-lyon.fr/~bdepardo/perso/docs/TAU.pdf



Thanks



*Mohamad O. Sindi*

EXPEC Advanced Research Center
Saudi Aramco


On Sun, Apr 6, 2014 at 6:42 PM, Hendrik Sattler <post at hendrik-sattler.de>wrote:

> On 6. April 2014 13:23:19 MESZ, sindimo <sindimo at gmail.com> wrote:
> >Thanks Eike for the input.
> >
> >I went with your suggestion and I am using the environment variables
> >now CC
> >and FC to point to the TAU wrappers.
> >
> >Just for the record this specific app isn't cross platform, just on
> >Linux.
> >
> >It's still identifying the TAU wrappers as GNU and not Intel. For now
> >we
> >can live with forcing the compiler ID to be Intel.
> >
> >The second issue explained previously is the one more concerning, any
> >hints
> >on how to get CMake to dump the TAU temporary files (e.g. *.pp.f,
> >*.pp.pdb,
> >*.pp.inst.f) in the correct output folder instead of the current
> >directory?
>
> did you try to fix this issue on your wrapper scripts? I'd assume it has
> something to do with the current working directory...
>
> >None of these variables seem to be honored when dumping the TAU
> >temporary
> >files (LIBRARY_OUTPUT_PATH, CMAKE_LIBRARY_OUTPUT_DIRECTORY,
> >CMAKE_Fortran_MODULE_DIRECTORY)
> >
> >Thanks again for your help.
> >
> >On Sunday, April 6, 2014, Rolf Eike Beer <eike at sf-mail.de> wrote:
> >
> >> Am Sonntag, 6. April 2014, 10:31:57 schrieb sindimo:
> >> > Dear CMake Support,
> >> >
> >> > We've been using your wonderful tool for quite some time to do our
> >cross
> >> > platform builds.
> >> >
> >> > We recently started using the TAU profiler and are having some
> >issues
> >> when
> >> > integrating it with CMake and would appreciate your help with it
> >please.
> >> >
> >> > We set our compilers in CMake to the TAU wrappers:
> >> >
> >> > set (CMAKE_Fortran_COMPILER
> >> > /red/cmt3/vol5/tau/tau_installation/x86_64/bin/tau_f90.sh)
> >>
> >> I don't read on ;) Are you doing this in a toolchain file? Otherwise
> >do it
> >> either there or using the environment variables (CC, CXX, and so on).
> >If
> >> you
> >> start fiddling with the compiler inside a project environment that
> >usually
> >> means trouble.
> >>
> >> Eike
> >
> >
> >------------------------------------------------------------------------
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140409/1a30ea37/attachment.html>


More information about the CMake mailing list