Cudafe intermediate files in TMPDIR ?

Hi all,

I’am working on a GPU cluster (for which I am not sys admin), and /tmp partition is rather small (200MB).

When compiling C++/Thrust code, it turns out that /tmp can be easily full, and so build stops.

I tried to set env variable “TMDIR” to tell nvcc to put all intermediate files (cudafe1.gpu) somewhere else (not in /tmp), but it seems that nvcc (and other tools involved) do not all understand TMPDIR ?

Is there another way to re-root intermediate files in a custom temp dir ?

Thank you.

Pierre

By using nvcc flags --keep and --keep-dir, I can avoid filling /tmp.
But I still need to remove files afterwards (for example when building petsc for gpu, temp files can amount to several Gbytes).

According to the compiler documentation, here

[url]CUDA Toolkit Documentation

there doesn’t seem to be any alternative of the sort you need. Either the intermediate files go to /tmp and get automatically deleted, or you need to use --keep in which case they can go to a location of your choice but won’t get deleted.

I would suggest filing a feature request to allow specification of the intermediate file lcation, while keeping auto deletion. To do so, you can simply use the bug reporting form linked from the registered developer page. Please prefix the synopsis of the bug report with “RFE:” (request for enhancement).

As far as the most efficient way of manually deleting the files left behind by use of --keep, please check out the section “Cleaning Up Generated Files” at the link above (you may already be using that technique, but I don’t know).