Support and discussions for Molcas and OpenMolcas users and developers
You are not logged in.
Please note: The forum's URL has changed. The new URL is: https://molcasforum.univie.ac.at. Please update your bookmarks!
You can choose an avatar and change the default style by going to "Profile" → "Personality" or "Display".Pages: 1
Is it possible to copy a whole directory with an EMIL command? The copy commands >> COPY or >> SAVE can't copy a directory, >> SHELL cp -r ... doesn't work as MOLCAS stops and forces me to use COPY or SAVE instead, and neither >> SHELL sh -c "cp -r ..." does. Any hints on that?
Thanks in advance
Leon
Offline
My current workaround is >> SHELL rsync -a, but this can't be the solution (it requires rsync to be installed on the system)
Offline
You could create a script that contains the "cp -r ..." command, and run it with "> SHELL $CurrDir/myscript.sh", or copy it to $WorkDir and run it with "> SHELL ./myscript.sh". Or maybe create an alias for "cp", so you can just run "> SHELL my_aliased_cp -r ...", or put a script in your path that accepts arguments: "> SHELL my_cp_r.sh ...". (All of this is untested, though.)
But maybe the question is whether you actually need to copy a directory, maybe there's a better way to achieve what you are trying to do?
Offline
Thank you for your reply Ignacio. I'm working with the QCMaquis DMRG-MOLCAS interface, and QCMaquis checkpoints, which I need to copy, are directories, so there's no way around it. Is there any specific reason why MOLCAS forbids >> SHELL cp ... (one could issue a warning instead of an error and stop, e.g.)
Offline
kommerck,
One of the elements of EMIL philosophy is: avoid side effects. However, as Ignacio pointed out, you always can make a shell script and execute it from EMIL.
To be more specific, copy of a file is an expensive operation. If Molcas run in parallel is really really expensive operation.
If you need a copy a directory with unknown content - for me it is a clear indication that the code design at that point is poor.
Offline
Pages: 1