This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Load/save results remotely

–2 votes

Hi all,

Due to some quota issues, I would like to write my results to a file which lies on another station as well as load my meshes from a file on another station.

Without Dolfin, I usually use paramiko to write to remote files. However, since in Fenics I use dolfin.File since I want to make sure my file is in the vtk format, it is unclear to me how this works or even if it works.

Thank you

closed with the note: No help
asked Jul 29, 2015 by affzwei FEniCS Novice (100 points)
closed Sep 2, 2015 by affzwei

Hello,

(Not sure that this is really a fenics issue)
If you work with python, you could easily just copy/move around the files via ssh.

Basically, you can call arbitrary shell commands from python, so instead of

for i in range(n):
    u = Function(V)
    some_file << u

you could do

for i in range(n):
    u = Function(V)
    some_file << u
    some_system_command_to_move_file()

I am not an expert on this matter but that would be the first thing i'd try.

best regards

Thanks for your reply! I think I haven't formulated the question clearly.

I have a time-dependent PDE to solve and of course I would like to save the solution at each time-step, i.e. sth like

while t<T
    u = do_timestep(...)
    file_instance << (u,t)
    t += dt

Now I would like file_instance to be a file on a server where I have more space than on the cluster. Hence, I would like dolfin.File(REMOTE_PATH) to open a file on the remote server. Is this possible?
Your solution does not help there since it requires a local save first.

Sorry for being unclear, I hope someone can still help.

sorry my weird "range(n)" notation was supposed to suggest a time-dependent problem.

Is your problem too large to save the solution for a single timestep locally?

It is, yes. That's why I was wondering whether dolfin.File could open and access a remote file.

Ok sorry I can't be of any help then...

...