Skip to content
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

Output is not written, if the folder does not exist #7

Closed
slizzered opened this issue Jul 9, 2014 · 9 comments
Closed

Output is not written, if the folder does not exist #7

slizzered opened this issue Jul 9, 2014 · 9 comments

Comments

@slizzered
Copy link
Contributor

Although this is described in the documentation, this could be handled better.
We should try to create these folders, in case they do not exist.

(Mostly relevant for writing vtk-files, so this is related to #1)

@slizzered slizzered added the bug label Jul 9, 2014
@slizzered slizzered added this to the 1.5 - extended features milestone Jul 9, 2014
@ax3l
Copy link
Member

ax3l commented Jul 9, 2014

-> use boost::filesystem for that to avoid the pain of taking care of every system detail.

@erikzenker
Copy link
Member

Thx, that you like to contribute assigned 💖

@ax3l
Copy link
Member

ax3l commented Jul 9, 2014

hrhr, sorry no time ;)
But the implementation in PIConGPU might help you.

@slizzered
Copy link
Contributor Author

Since f6c9f76 the code does actually complain and stop if the folder does not exist. Should we instead auto-create the folder and continue working? (would be a nicer experience for the user)

@erikzenker
Copy link
Member

In my opinion we should print some very clear error message like I mentioned in #72.
Something like :

The specified output path does not exist (or permission denied) please specify a correct path by --output-path=[path]

A user should be able to create some output folder.

@slizzered
Copy link
Contributor Author

Ok, so just a clear error message, no auto-creation. In that case, I would also like to remove/change the default value for the output folder. Currently, the default folder is "output", but if it is not auto-created, then there is no real reason for it, right? (and we have config files now, so the use can specify it).

Alternatively, we could set the default output-folder to .. This way, the code is still executed, but files are just produced on the current location. Quite a lot of unix tools do that, so it might be acceptable.

@slizzered
Copy link
Contributor Author

In this case, the clear error message would still be useful, if the user specified some invalid path. So I will definitely change the message.

@erikzenker
Copy link
Member

Currently the programm produces a lot of output files, thus, just using the . folder would somehow trash the root directory. It would be another situation if we would have some nice output format like
hdf5 or openPMD (see #54).

I would suggest to force the user to specify an output directory.

@slizzered
Copy link
Contributor Author

I completely agree. nice that everything is done now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants