Skip to content
Snippets Groups Projects
  • Eoin Clerkin's avatar
    6f6619b0
    Short license declarations for .sh files · 6f6619b0
    Eoin Clerkin authored
    Inserts the declaration on the 1st or 2nd line of scripts.
    
    EMPTY LINE
    
    Short license declarations for .sh files
    
    Inserts the declaration on the 1st or 2nd line of scripts.
    
    EMPTY LINE
    
    Revert "Short license declarations for .sh files"
    
    This reverts commit d3dd8608dead032b12bc71798a2bd97bfca95442.
    
    Uses SPDX identifier
    
    Modifies declaration to use SPDX license identifier syntax
    
    Corrects file
    
    Empty line before hashbang removed
    6f6619b0
    History
    Short license declarations for .sh files
    Eoin Clerkin authored
    Inserts the declaration on the 1st or 2nd line of scripts.
    
    EMPTY LINE
    
    Short license declarations for .sh files
    
    Inserts the declaration on the 1st or 2nd line of scripts.
    
    EMPTY LINE
    
    Revert "Short license declarations for .sh files"
    
    This reverts commit d3dd8608dead032b12bc71798a2bd97bfca95442.
    
    Uses SPDX identifier
    
    Modifies declaration to use SPDX license identifier syntax
    
    Corrects file
    
    Empty line before hashbang removed
do_run_sim.sh 809 B
#!/bin/bash
# Copyright (C) 2014 Institut fuer Kernphysik, Westfaelische Wilhelms-Universitaet Muenster, Muenster
# SPDX-License-Identifier: GPL-3.0-only
# First commited by Cyrano Bergmann

nThreads=0
maxThreads=0
nEvents=1000
centrality=mbias
cat /proc/cpuinfo | grep processor | tail -n1 | cut -c 13- > temp
while read line 
do
    maxThreads=$line
    echo "${maxThreads} threads are started in parallel"
done
rm temp  
 maxThreads=3
for urqmd in {0..399}
do
	nThreads=$(($nThreads+1))
	echo "${nThreads} root -l -b -q run_sim_maf.C'('$nEvents,$urqmd,'\"'$centrality'\"'')'"
	echo "nice root -l -b -q run_sim_maf.C'('$nEvents,$urqmd,'\"'$centrality'\"'')' &"  > mysim
	. mysim  &> /dev/null
#&>> logsimfile.txt
	sleep 10
	if [ "$nThreads" -ge "$maxThreads" ]; then
	    wait ${!}
	    nThreads=0
	fi
done