-
Notifications
You must be signed in to change notification settings - Fork 11
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
Override scratch directory with preference or environmental variable #43
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #43 +/- ##
==========================================
- Coverage 87.61% 87.03% -0.59%
==========================================
Files 1 1
Lines 105 108 +3
==========================================
+ Hits 92 94 +2
- Misses 13 14 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Co-authored-by: Mosè Giordano <[email protected]>
No idea why this is failing on nightly :-( |
I don't know that this can be done in this way. One of the requirements I tried to convey on Slack was that even when this option isn't set, it has to be possible to find the places where scratch spaces have been placed because this option was used. We could record it in a log file in the depot or something but there has to be some record of it so that it can be cleaned up by another (potentially automated) Julia process without knowledge of this option. |
Something like the way Pkg keeps track of all of the environments for GC? I can dig around and see how that's done 👍 |
Yes, exactly like that. Some log file like |
Just a heads up - given the higher complexity and my current life circumstances, it may be a while until I can address this adequately. I'm happy to leave the PR open or close it, but I don't want to be a cookie licker in case someone else wants this feature and can implement it. |
Just a note orthogonal to this PR, in case it helps @kescobo: depending on your setup, perhaps you could also try to turn |
Pursuant to a discussion on Slack, this PR adds the ability to specify an alternate location for scratch directories using
Preferences.jl
or using an environmental variable. My personal reason for needing this is that for large files on HPC, I typically want to put stuff on filesystems that are specifically meant for scratch data / fast access, which is often a differentfilesystem than
$HOME
Possible sources of bikeshedding:
Preferences
as a dependency? If not, I still think this would be useful with just the environmental variable option (I couldn't think of a way to do this with a conditional dependency, but I'm happy to take suggestions there)."scratch_dir"
andJULIA_SCRATCH_DIR
respectively, but don't feel strongly.Obviously happy to take any other comments / suggestions, but if this approach is amenable, I can start working on docs and tests.