# Batch run plenty of input files

**URL:** <https://fluka-forum.web.cern.ch/t/batch-run-plenty-of-input-files/4771>\
**Category:** Running and Runtime Errors\
**Created:** [24 May 2023 02:22 UTC](https://fluka-forum.web.cern.ch/t/batch-run-plenty-of-input-files/4771 "2023-05-24T02:22:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![22111140001](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/22111140001/32/7455_2.png) [@22111140001](https://fluka-forum.web.cern.ch/u/22111140001)\
**Post date:** [24 May 2023 02:22 UTC](https://fluka-forum.web.cern.ch/t/batch-run-plenty-of-input-files/4771/1 "2023-05-24T02:22:21Z")

</div>

Dear experts  
Here I have 400 input files(they are different from each other in some details) to run，so it’s troublesome if I choose to run them manually(open them with flair and click the “RUN” indepently ), I’m wondering whether there is an efficient way to **batch run** them or not.  
I have tried to use “Add” to add some input files to “RUN” of flair in order to run them at once , but I found that the added files **become the same automaticlly** , so is there any other way to batch run plenty of input files?

![ADD](https://fluka-forum.web.cern.ch/uploads/default/original/2X/a/a4a39c85cf6a299b4814473be3ffd22b7b0c9eef.png)

Liuyu Cui  
Best wished

---

<div class="post-metadata">

**Author:** ![vasilis](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/vasilis/32/16_2.png) [@vasilis](https://fluka-forum.web.cern.ch/u/vasilis)\
**Post date:** [24 May 2023 20:02 UTC](https://fluka-forum.web.cern.ch/t/batch-run-plenty-of-input-files/4771/2 "2023-05-24T20:02:23Z")

</div>

You can run them from the command line with `flair --run runname`  
or even a pattern as  
`flair --run "myrun*"`

If you are running them locally is better to select as a submission system the **tsp** (=taskspooler) option in flair,  
 ![image](https://fluka-forum.web.cern.ch/uploads/default/original/2X/d/d34374a5c04add97992d09c432eae46600e32802.png)  
which behaves like a very primitive batch scheduler.  
You select all the runs Ctrl-A and press Start

You can configure the **tsp** to run up to a certain number of concurrent jobs (e.g. to the number of cores)  
You need to install the additional linux package of **task-spooler**

---

<div class="post-metadata">

**Author:** ![22111140001](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/22111140001/32/7455_2.png) [@22111140001](https://fluka-forum.web.cern.ch/u/22111140001)\
**Post date:** [25 May 2023 09:01 UTC](https://fluka-forum.web.cern.ch/t/batch-run-plenty-of-input-files/4771/3 "2023-05-25T09:01:10Z")

</div>

Dear Vasilis:  
Thank you very much for your quickly reply, I have trid to use tsp option as you taught before , and I set “tsp -S 5” in the terminal. Howerver, I found the flair can just run the first five files of the 400 input files successfully，the others display the status of “TIMED OUT” and can’t run as expected

 ![image](https://fluka-forum.web.cern.ch/uploads/default/original/2X/4/473dcf7a1b3e661271bd37a8d9e53f4e9f26a57f.png)  
So could please teach me how to solve this problem

---

<div class="post-metadata">

**Author:** ![vasilis](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/vasilis/32/16_2.png) [@vasilis](https://fluka-forum.web.cern.ch/u/vasilis)\
**Post date:** [30 May 2023 08:17 UTC](https://fluka-forum.web.cern.ch/t/batch-run-plenty-of-input-files/4771/5 "2023-05-30T08:17:38Z")

</div>

By setting “tsp -S 5” you are indicating to run up to 5 jobs at the same time. When one job finishes the next one in the line will take over. However flair is completely agnostic of the launching program. It check only the output of fluka to find out what happens in the run. Since the runs are in the waiting queue flair didn’t find any output and it reported that the attaching process timed out.

What you can do is reselect the runs and click **Attach** , to find out which runs are going on and which ones have finished

---

<div class="post-metadata">

**Author:** ![22111140001](https://fluka-forum.web.cern.ch/user_avatar/fluka-forum.web.cern.ch/22111140001/32/7455_2.png) [@22111140001](https://fluka-forum.web.cern.ch/u/22111140001)\
**Post date:** [6 June 2023 08:45 UTC](https://fluka-forum.web.cern.ch/t/batch-run-plenty-of-input-files/4771/6 "2023-06-06T08:45:07Z")

</div>

Thank you very much for your helpful reply. I have already solved my problem

---

<div class="post-metadata">

**Author:** ![rversaci](https://fluka-forum.web.cern.ch/letter_avatar_proxy/v4/letter/r/cc9497/32.png) [@rversaci](https://fluka-forum.web.cern.ch/u/rversaci)\
**Post date:** [6 June 2023 08:57 UTC](https://fluka-forum.web.cern.ch/t/batch-run-plenty-of-input-files/4771/7 "2023-06-06T08:57:56Z")

</div>

Closed on 6 June 2023 08:57 UTC


