Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

temporary files? #80

Open
gordonritter opened this issue May 19, 2016 · 6 comments
Open

temporary files? #80

gordonritter opened this issue May 19, 2016 · 6 comments

Comments

@gordonritter
Copy link

I love JBLAS and hope to see it continue and become more widely used. Thanks for creating this!

I just wanted to note that some clouds or clusters don't allow any write access to the local filesystem at all, even for temp files. It would be a nice enhancement if JBLAS could write its temporary files to a virtual filesystem in RAM or something that didn't require an actual file.

@gordonritter
Copy link
Author

This project from google should provide an in-memory filesystem to store the temp files. I'm not sure how easy/hard it is to change the location to which jblas writes them, though.

https://github.com/google/jimfs

@mikiobraun
Copy link
Member

Hey gordonritter, thanks and very sorry for the late reply.

I get the issue that you might not be able to write locally. I think the biggest blocker to using something else is that Java's loadLibrary just takes a filename and then starts looking into the local filesystem.

@vrdn-23
Copy link

vrdn-23 commented Nov 18, 2020

Hi @mikiobraun ,

Sorry to re-open an old issue, but is is possible to specify where this file is being written? Is there somewhere in the code where we can specify this tmp file location?

@mikiobraun
Copy link
Member

Hey Vinay,

no problem! So I read a bit into the docs, and jblas uses File.createTempFile to create the library.

According to the docs, the output file can be configured by setting the java.io.tempdir property (via -Djava.io.tempdir=...).

Hope this helps!

@mikiobraun mikiobraun reopened this Nov 19, 2020
@gordonritter
Copy link
Author

That would affect all temp files for the whole JVM. It would be cool if we could allow the user to set the JBLAS temp location specifically, e.g. with system property jblas.tempdir. File.createTempFile allows to optionally specify a parent directory so could use that and revert to the default if none was specified.

@mikiobraun
Copy link
Member

I see, good point. Yeah, let's do that.

Do you want to do prepare a PR or I can look into it the next few days.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants