Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions produce.clasLU.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env bash
set -euo pipefail

num=200000
seed=0

install/bin/clas-stringspinner-slurm $num $seed ~/j/bihadro/out/lund.sss.prod2.clasLUp.l \
--config clas12 \
--pol-type LU \
--beam-spin p \
--cut-inclusive 11,211,-211 \
--cut-lepton-theta 2,60 \
--cut-pion-multiplicity 4 \
--save-hipo \
--set 'StringSpinner:GLGT=20.0'

install/bin/clas-stringspinner-slurm $num $seed ~/j/bihadro/out/lund.sss.prod2.clasLUn.l \
--config clas12 \
--pol-type LU \
--beam-spin n \
--cut-inclusive 11,211,-211 \
--cut-lepton-theta 2,60 \
--cut-pion-multiplicity 4 \
--save-hipo \
--set 'StringSpinner:GLGT=20.0'

install/bin/clas-stringspinner-slurm $num $seed ~/j/bihadro/out/lund.sss.prod2.clasLUp.t \
--config clas12 \
--pol-type LU \
--beam-spin p \
--cut-inclusive 11,211,-211 \
--cut-lepton-theta 2,60 \
--cut-pion-multiplicity 4 \
--save-hipo \
--set 'StringSpinner:GLGT=0.0'

install/bin/clas-stringspinner-slurm $num $seed ~/j/bihadro/out/lund.sss.prod2.clasLUn.t \
--config clas12 \
--pol-type LU \
--beam-spin n \
--cut-inclusive 11,211,-211 \
--cut-lepton-theta 2,60 \
--cut-pion-multiplicity 4 \
--save-hipo \
--set 'StringSpinner:GLGT=0.0'
23 changes: 23 additions & 0 deletions produce.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail

num=10000000
seed=0

install/bin/clas-stringspinner-slurm $num $seed ~/j/bihadro/out/lund.sss.prod2.zeus.l \
--config zeus \
--pol-type UU \
--cut-inclusive 11,211,-211 \
--cut-lepton-theta 2,60 \
--cut-pion-multiplicity 4 \
--save-hipo \
--set 'StringSpinner:GLGT=20.0'

install/bin/clas-stringspinner-slurm $num $seed ~/j/bihadro/out/lund.sss.prod2.zeus.t \
--config zeus \
--pol-type UU \
--cut-inclusive 11,211,-211 \
--cut-lepton-theta 2,60 \
--cut-pion-multiplicity 4 \
--save-hipo \
--set 'StringSpinner:GLGT=0.0'
13 changes: 13 additions & 0 deletions src/Tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,17 @@ namespace string_spinner {
func(token, i++);
}

/// @brief expand `~` to the user's home directory
/// @param path the file path
/// @returns the file path with `~` expanded to `$HOME`
inline std::string ExpandTilde(std::string const& path)
{
if(path.empty() || path[0] != '~')
return path;
if(char const* home_dir = std::getenv("HOME"); home_dir)
return std::string(home_dir) + path.substr(1);
throw std::runtime_error("cannot expand `~` since $HOME is not set");
}


}
9 changes: 6 additions & 3 deletions src/clas-stringspinner-slurm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
TopSeed = ARGV[1].to_i
OutputDir = ARGV[2]
ExeArgs = ARGV[3..]
MaxEventsPerJob = 5000 # OSG constraint
# MaxEventsPerJob = 5000 # OSG constraint
MaxEventsPerJob = 50000 # altair # NOTE: don't go too high since sometimes pythia just stops: 100% CPU usage but with no stdout, no stderr, no data output

# make sure we can find the main executable
ExeName = 'clas-stringspinner'
Expand Down Expand Up @@ -69,13 +70,15 @@
'job-name' => 'stringspinner',
'account' => 'clas12',
'partition' => 'production',
'time' => '1:00:00',
# 'time' => '1:00:00',
'time' => '0', # altair
'mem-per-cpu' => 200, # units megabytes; local tests show typical usage is around 30M
'ntasks' => 1,
'cpus-per-task' => 1,
'output' => "/farm_out/%u/%x_%A_%a.out",
'error' => "/farm_out/%u/%x_%A_%a.err",
'array' => "1-#{events_per_job.size}"
# 'array' => "1-#{events_per_job.size}"
'array' => "1-#{events_per_job.size}%6" # altair
}
SlurmScriptFile = File.join OutputDir, "run.slurm.sh"
File.open(SlurmScriptFile, 'w') do |out|
Expand Down
Loading