-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No final output files #2608
Comments
Actually I found the culprit. I am not sure if this was intended, but currently the HeaderFile of the output directory opened on line 987 is not closed before "std::rename(xxx,yyy)" is called. Since this file resides in the "_plt" folder, it effectively blocks the renaming of the folder. I suggest to close it on line 1039: HeaderFile.close() The same case is with the "_chk" output folders. So there are actually errors on two places. https://stackoverflow.com/questions/24509989/rename-function-doesnt-work-using-c |
Thanks for reporting this and finding the culprit! |
The file stream for the header must be closed before the parent directory can be renamed. Closes AMReX-Codes#2608
The file stream for the header must be closed before the parent directory can be renamed. Closes #2608
Hello,
I am trying a simple Sedov test on my Ubuntu in Windows Subsystem for Linux (WSL) and Castro doesn't want to produce proper output files. It creates only temporary output files:
drwxrwxrwx 1 ondrej ondrej 512 Jan 31 15:08 sedov_1d_sph_chk00000.temp
drwxrwxrwx 1 ondrej ondrej 512 Jan 31 15:09 sedov_1d_sph_chk00119.temp
drwxrwxrwx 1 ondrej ondrej 512 Jan 31 15:08 sedov_1d_sph_plt00000.temp
drwxrwxrwx 1 ondrej ondrej 512 Jan 31 15:09 sedov_1d_sph_plt00119.temp
I digged a bit into the AMReX code and found the following.
In "AMReX_Amr.cpp" around line 1044 the code the "std::rename(pltfileTemp.c_str(),pltfile.c_str())" returns -1, that is "Error: Permission denied".
Do you have an idea what can go wrong?
On one forum I found that this can happen when a previously opened file was opened but not closed.
Can this be an issue?
https://stackoverflow.com/questions/11840611/permission-denied-for-rename-function-in-c-on-windows/13383026
Thanks
The text was updated successfully, but these errors were encountered: