- changed status to open
- removed comment
Simplify SimFactory's get-output-dir command
Currently, sim get-output-dir returns:
Simulation name: <simname>
Output directory: <basedir>/<simname>/output-NNNN/<parbasename>
I think most uses of this command would be in shell scripts, where it would be easier to use if it only output the actual output directory. The first line is redundant, as the user has already specified the simulation name. Also, simfactory is appending the <parbasename>, and assuming that such a directory exists and contains some useful data. Without parsing the parameter file and duplicating cactus logic, it cannot know where the actual data is. I think simfactory should just give the output-0000 directory, and leave it up to the user to figure out where to find the data in there. The attached patch implements this change. OK to apply?
Keyword:
Comments (8)
-
reporter -
- removed comment
If the parbasename is not included, a user would have to find this out some other way, as it is not necessarily equal to the simulation name. Thus, it would make life harder for people using $parfile as out_dir.
-
reporter - removed comment
Yes it would. However, adding parbasename to the output, as is currently done, is wrong in the following situations: 1. The output is in a different directory 2. The output is in more than one directory (I have seen simulations with separate 1d, 2d, 3d etc output locations) 3. The simulation is a test suite run I think it is better to give something correct than to guess at one particular convention and give invalid output if that convention is not being followed.
-
- removed comment
I agree that this information might be wrong. My line of thought was: it is easier to remove the last part of the path in case you know it's wrong than adding the correct information in all cases (assuming nobody really writes to '.').
I suppose 'being correct' and not surprising users is more important here, so please go ahead.
Btw: multiple directories for different kinds of output data are just as well possible within parbasedir. Just specify ${parfile}/DIRNAME in your parameter file.
-
- changed status to open
- removed comment
-
- removed comment
Ian: do you still want to apply this patch? It's reviewed ok by Frank.
-
- removed comment
Ian?
-
reporter - changed status to resolved
- removed comment
This was applied already in February as r1989.
- Log in to comment