Thank you for your reply.
My home directory was on NFS and there was an issue about NFS file locking, which prevented ~/.nv to be written.
I got a hint from the link:
https://devtalk.nvidia.com/default/topic/1003878/problem-with-cuda-8-with-381-09-drivers-on-ubuntu-16-04-gtx-1080ti/ 75