Unnecassary file Fort.# such as Fort.2 or Fort.3 suddenly created while running fortran??[SOLVED]

Hi guys, what's up?, It's been a while since my first post and now I post again. I hope you find your solution here if you have the same problem with me. Are you using fortran language on your program?. I use fortran in my program now and lately I relized that each time I run my program suddenly unnecassary file Fort.# such as Fort.2 or Fort.3 created in my current working folder (the file is like this ๐Ÿ‘‡)



If the file is not huge enough it's still okay but if the file is huge maybe it's not efficient anymore for your memory plus if the file is not just 2 but many more. Anyone face the same problem with me?. I think you should take action๐Ÿ˜. I just read and browse about that and it turns out that those Fort.# files are created by compiler Gfortran automatically when you open the file to do writing or reading in file using fortran.  Fortran can not write or read without opening those file and add "UNIT" in opening file will connect fortran to file. Then # indicate the "UNIT" number where you write file. Then why those file not always found when you write in file using fortran??. Let's assume that maybe something worng with those file unit. Then I just check again my program especially in "unit =2" and "unit=3" and it turns out that I have been using "unit=2" and "unit=3" for opening file twice even when I close those opening unit. I will show how it is ๐Ÿ‘‡



Next, I tried to replace one of the same units with the other unit number which I don't use yet and walla.... those fort files are gone. Hopefully, it helps you guys which have the same problem with me. Thanks and keep sharing.

Komentar

Postingan Populer