It has been known for a long time on the cluster we run vasp that you encounter issues when the path length for the run directory goes beyond 256 characters. After recent experience on different clusters I have narrowed down the behavior and cause, and would like to request a solution for coming versions of VASP.
Specifically, if the absolute path for the OUTCAR file is 259 characters, the calculation will start, but after going into the electronic convergence, new output file paths are capped to the 256 character limit, e.g., causing the remaining OUTCAR output to be written to "OUT" in the same folder. It is worse when output files get capped higher up in the path tree where some files are not supposed to be written or not allowed to be written.
The output files are closed before starting the electronic convergence and reopened using the filename obtained from INQUIRE (I am sure it was needed for flushing or other reasons at the time, but is it still necessary?). See subroutines WFORCE, REOPEN, etc. in lib/diolib.F. This filename is saved in a buffer of size 255 characters, which is usually fine since the proper/gnu behaviour of INQUIRE is to return the relative path of the file. However, intel compiler behavior is to return the absolute path, meaning this filepath capping error is encountered when the path is too long. I realize this is also an unusual situation, but in our production runs, we encode a lot of running information in the folder name for various reasons and therefore encounter this error often.
I see some possible solutions I would like to discuss:
Add a compiler option for the size of this buffer, so one may request the cluster to update the current and coming binaries for the intel compilers.
Make the buffer dynamic, increasing the buffer until full path is captured/buffer is properly terminated.
Add flag/compiler option for skipping the reopening of files if users do not see the need.
Inquire to intel about possible options on their end for uniformity across compilers.
On the use end we could always compile with a different compiler or manually modify the buffer size, but none of these solutions are very sustainable moving between clusters and VASP versions.
I would be very glad if you could come with an official solution to this issue, although I otherwise hope this post can serve as documentation for those running older versions with long paths. Thank you in advance for any guidance and discussion.