NVIDIA / gdrcopy

A fast GPU memory copy library based on NVIDIA GPUDirect RDMA technology
MIT License
898 stars 144 forks source link

Fix building issues on OpenSUSE #294

Open JieRen98 opened 9 months ago

JieRen98 commented 9 months ago

the config_arch script is for determining the architecture of the system. However, it generates a temp dir at /tmp using mktemp in this line and then compile and run an executable. However, a lot of Linux distributions, e.g., OpenSUSE, mount the /tmp directory with the noexec flag. So it is not allowed to run any executables in /tmp.

This PR generates the temp dir at the current dir rather than in /tmp.

pakmarkthub commented 9 months ago

Thank you, @JieRen98. However, this does not solve the fundamental issue. On some clusters, the current directory is immutable inside compute nodes (i.e., it is read only). Introducing a variable to Makefile to set the temp directory location might be better.

JieRen98 commented 9 months ago

Thank you, @JieRen98. However, this does not solve the fundamental issue. On some clusters, the current directory is immutable inside compute nodes (i.e., it is read only). Introducing a variable to Makefile to set the temp directory location might be better.

Thanks for your prompt reply. I added several candidates (/tmp, /dev/shm, and pwd). The function checks the existence, writable property, and noexec flag.