I just installed the NVIDIA HPC SDK 21.7 on Window 10 WSL (Ubuntu 20.04.2 LTS). Unfortunately, a problem was encountered when I run a simple Fortran program.
I have tried to install the SDK in another PC, but the same problem was occurred again.
By default, the compiler uses “/tmp” store intermediary temp files during compilation. I suspect that this directory doesn’t existing in your WSL environment given the path you show. Though you should be able to work around this by explicitly setting the “TMP” environment variable to a directory that exists and is writable. The compiler will then use this directory for it’s temp files.
I have checked on my PC. The “/tmp” is available in my WSL environment. Also, it seems that the intermediary temp file for nvfortran could access the “/tmp”.
Can you please post the verbose output from the compilation? i.e. add “-v” to the compilation.
I understand that you haven’t set the “TMP” environment variable, I’m asking if you can please try setting TMP to a directory where you know you have read/write permissions?
By the way, what are the permissions on “/tmp”?
By the way, anyone has done the installation of NVHPC successfully in Win 10 WSL?
Note that we don’t officially support WSL2 but I have had reports from users that it works fine for them.
After some digging, this turns out to be compiler issue due to a recent change on how temp files are formed. Since we don’t officially support WSL2 as of yet, we missed it during our QA process. I’ve added a problem report, TPR #30467, and asked our engineers to investigate.