The generation of bnn files on the cluster is slow

Dear FLUKA Experts,

Recently, I conducted a simulation on a computing cluster, which generated thousands of filename_fort.21 files. When utilizing flair on the cluster to “Process” these files into filename.bnn files, the progress seemed to stagnate. Initially, I speculated that the poor performance of the cluster’s management node was the cause. Consequently, I wrote the following bash script to upload the bnn file generation process to the compute nodes. Upon testing on my personal computer, the script proved to be effective. However, when I applied it to the cluster, the generation speed of bnn files remained extremely slow. After 12 hours, the generation process on the cluster was still ongoing! Additionally, generating bnx files seemed unaffected, proceeding at a normal speed.
My questions are as follows:

  1. Is there any alternative command-line method to perform the generation process for thousands of filename_fort.21 files? I also tested the method from “Command line data processing”, but it does not work.
  2. Is the slow speed in generating bnn files from thousands of filename_fort.21 files on the cluster a unique issue that I am experiencing, or is it a common occurrence? If it is a unique case, could you please suggest any potential solutions to address this problem?
  3. Does the generation of bnn files involve using graphics cards? Our cluster is not equipped with high-performance graphics cards, whereas my personal computer is. This is currently the only reason I can think of for the speed difference. I would appreciate it if the experts could further clarify this matter.
    Thank you for your attention to this matter.

bash.txt (728 Bytes)
White source.flair (13.0 KB)

Dear @cuiyaoxuan,

First of all, this processing might take a long time for hundreds of files it usually takes 2-3 minutes (depends also on the resolution of USRBINs)

The processing routines as most of FLUKA are written in Fortran77, so there is no native support for graphics cards.

I see that you are sending input line by line, try instead to execute usbsuw with a complete list of lines like:usbsuw < dummy1 > dummy2
where dummy1 will look like:

file1_fort.21
file2_fort.21
file3_fort.21
file4_fort.21
file5_fort.21

sum_usrbin_21

If it’s still slow, I recommend merging 100s of USRBINs separately in batches, and then merging their products into the final USRBIN with usbscw.

Hope it helps,
Volodymyr

Thanks for your reply. It has already worked effectively