Renaming firework launch folders created by a workflow

Hi,

When I run a workflow, a folder named something like “block_2017-02-13-22-14-42-132705” is created. Inside are a bunch of folders for each firework with names like “launcher_2017-02-13-22-15-50-842035”. When debugging I’d like to inspect the error file in the folder that corresponds to a particular firework with some a name I can view from the data stored in my database, such as the fw_id. Is there a way to rename the “launcher…” folders with fw_id’s?

Thanks,
Jonathan

Hi Jonathan,

In the standard version of qlaunching, it is not known at the time of the launch what FireWork will be pulled. So, it is impossible to label the directory with a fw_id. In fact, if your queue script contains a “rapidfire” style command, the directory might contain several sub-directories with multiple FireWorks run in it.

In reservation mode of qlaunch, you can assign a custom directory name using the “_launch_dir” parameter - see: https://pythonhosted.org/FireWorks/controlworker.html

Some other possible workarounds:

  • I usually use the command “lpad get_fws -i <FW_ID> -d more” and copy the launch_dir from the resulting printout in order to find the directory. Especially when there are possibly thousands of directories this method works better than hunting around the file system. Sometimes I’ll do the same thing but from the webgui.

  • There is also a feature to monitor output files and store the last few lines in the database. Then you can, for example, print out the last few lines of all FIZZLED FireWorks with a single command line statement. See: https://pythonhosted.org/FireWorks/tracker_tutorial.html

  • If I really care about finding directories within the filesystem, I’ll usually add a FireTask that writes an empty file to the directory with a descriptive name, e.g. MY_SPECIAL_RUN.txt. Then when on the file system I do something like “ls -l launch$/MY_SPECIAL_RUN.txt” and it will tell me the right directory. You can use this strategy to categorize runs, etc. as well.

  • Note also that the FW.json (written by default in each directory with a run unless you turn it off) contains the fw_id inside of it. I am sure there is some combination of Linux commands that can search inside all the launcher_* directories and find the one with a FW.json that contains the correct fw_id. It would be slower than searching the directory names themselves but might still work for your purposes.

Best

Anubhav

···

On Monday, February 13, 2017 at 3:00:11 PM UTC-8, jkuck wrote:

Hi,

When I run a workflow, a folder named something like “block_2017-02-13-22-14-42-132705” is created. Inside are a bunch of folders for each firework with names like “launcher_2017-02-13-22-15-50-842035”. When debugging I’d like to inspect the error file in the folder that corresponds to a particular firework with some a name I can view from the data stored in my database, such as the fw_id. Is there a way to rename the “launcher…” folders with fw_id’s?

Thanks,
Jonathan