|
[Sponsors] |
August 6, 2012, 17:54 |
copy cache file to each processor
|
#1 |
Member
ak
Join Date: May 2011
Posts: 64
Rep Power: 15 |
Hi
I have to copy a data file, that each processor would require, into the respective constant directories of the processors. Is there a simpler way to do this, than to manually do "cp constant/cachefile processor(n)/constant" for each of the N processors whenever I try to run a case. Maybe a script that I can write just once, and use whenever a case is run? Any help is appreciated. Thanks! ak |
|
August 7, 2012, 06:50 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi newOFuser,
This command line will copy the file "file_name" as you asked: Code:
for a in processor*; do cp constant/file_name $a/constant/file_name; done
Bruno
__________________
|
|
August 7, 2012, 18:06 |
|
#3 |
Member
ak
Join Date: May 2011
Posts: 64
Rep Power: 15 |
Thanks!
Option 3 works like a charm! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc | ofslcm | OpenFOAM Community Contributions | 25 | March 6, 2017 11:03 |
[blockMesh] error message with modeling a cube with a hold at the center | hsingtzu | OpenFOAM Meshing & Mesh Conversion | 2 | March 14, 2012 10:56 |
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' | mfiandor | OpenFOAM Installation | 2 | January 25, 2010 10:50 |
[Gmsh] Compiling gmshFoam with OpenFOAM-1.5 | BlGene | OpenFOAM Meshing & Mesh Conversion | 10 | August 6, 2009 05:26 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |