You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Suppress batch default handling of moving products out #6932
The batch module runs jobs in parallel and may produce products with unique names, similar to that of movie. When a single job completes it tries to move any named products up to the top directory, which for my case may give scripts that end with
However, not every possibly batch scenario will produce single products that are called ${BATCH_NAME}.* (here, EFLX3_1000.*). In my case, batch is given a file via -T with 3 columns of parameters (two densities and an elastic thickness) and the output of the script is a single grid that has those parameters in the file name, since flex_2510_2930_15.0k.grd is much more helpful to me (I can see the densities and the elastic thickness I used via the file name) than EFLX3_1433.grd, where I would have to run grdinfo to learn which solution this is. Thus, there are clearly cases where the single number naming is not helpful (whereas it is always used for movies).
I will think more about this but some initial thoughts are listed here:
We could add an option -C that does not issue those move commands and then the user is on the hook to do something specific in the main script. In my case I write directly to an outside final directory, so no need to move.
Alternatively, we add an option that takes a format statement and then BATCH_NAME and others are formed from the template and the various columns in the -Tfile. In my case, that would mean I pass something like -Fflex_%4.0lf_%4.0lf_%4.1lfk and then this template is used with the three items. If the file had trailing texts etc then it would use %s instead.
I think the second one is getting a bit too complicated and will experiment with the first for now, but I do like the power of the 2nd option.
Also, since batch was based on movie there is the assumption that a job only produces products with the same name but may have different extensions. That may not be true in general, hence the move command needs some updates anyway. In the case above it should probably be
Not insist that all products must have the same complete filename and only vary by extension. What if I want to make two grids?
Not insist there is an extension at all. What if I want to make a file called junk_01234?
My specific research example will create numerous grids and they all need to end in *.grd but will have things added to the prefix instead. I think I will treat the current move command in batch as a bug.
Activity
Let batch -D drop the mandatory moving of product files
PaulWessel commentedon Aug 3, 2022
Also, since batch was based on movie there is the assumption that a job only produces products with the same name but may have different extensions. That may not be true in general, hence the move command needs some updates anyway. In the case above it should probably be
mv -f ${BATCH_NAME}* /Users/pwessel/Dropbox/UH/ACTIVE/PROJECTS/OXFORD2022/EMPERORSi.e.,
My specific research example will create numerous grids and they all need to end in *.grd but will have things added to the prefix instead. I think I will treat the current move command in batch as a bug.
Let batch -D drop the mandatory moving of product files (#6933)
Esteban82 commentedon Aug 3, 2022
Probably, but nothing to suggest right now.
Allow batch -F to set a more specific naming template (#6934)