I usually use disk files to access big datas to save intermediated result. I’ve met a headache problem that when I use the code "close (unitnum,status=“delete”) during the program runing,it cannot delete the related file(s) and just keep it occupied and sometimes showed the file size as “0 bytes”, even if I want to delete it manually but failed with the warning of “the file cannot be accessed” unless I exit the program and delete the file(s) manually.This code is work well with other compilers such as ifort or gfortran as well. I’ve tried with other ways such as by call system(“del”) or deletefile functions by using third party module, but failed also with or without warnings.
Can anyone tell me how to fix it to solve my problem?It’ll be highly appreciated.
The compiler version is PGI 18.10 community.