Skip to content
Snippets Groups Projects
Unverified Commit c0b67d18 authored by Hernán Asorey's avatar Hernán Asorey
Browse files

This version transfer results to onedata

parent d04a4c6c
No related branches found
No related tags found
No related merge requests found
...@@ -106,7 +106,7 @@ BZcomp=false ...@@ -106,7 +106,7 @@ BZcomp=false
defaults=false defaults=false
ecut=800 ecut=800
slurm=false slurm=false
onedataBase="/mnt/datahub.egi.eu/test8/fluka"; # need to change also at rain.pl
echo echo
while getopts 'w:k:p:t:v:u:f:h:s:j:c:b:m:n:r:i:o:q:a:?lydex' opt; do while getopts 'w:k:p:t:v:u:f:h:s:j:c:b:m:n:r:i:o:q:a:?lydex' opt; do
...@@ -343,7 +343,7 @@ fi ...@@ -343,7 +343,7 @@ fi
echo -e "# INFO : Executable file is ($corsika_bin)" echo -e "# INFO : Executable file is ($corsika_bin)"
# It is important to now the total time in onedata. Adding total simulation time to the project name... # It is important to now the total time in onedata. Adding total simulation time to the project name...
prj="$prj_$(printf "%06d" $tim)" prj="${prj}_$(printf "%06d" ${tim})"
direct=$wdir/$prj direct=$wdir/$prj
basearti=${ARTI} basearti=${ARTI}
#helium -> Usually for 1 hour flux, 4 different procces is enough #helium -> Usually for 1 hour flux, 4 different procces is enough
...@@ -434,8 +434,15 @@ if $slurm; then ...@@ -434,8 +434,15 @@ if $slurm; then
fi fi
rain="$rain -r $wdir -v $ver -h $hig -f $lemodel -b $prj/\$i-*.run" rain="$rain -r $wdir -v $ver -h $hig -f $lemodel -b $prj/\$i-*.run"
# echo -e "# INFO : rain command: $rain" echo -e "# INFO : rain command: $rain"
oneout="$onedataBase/S3_${prj}_${site}_${lemodel}"
[[ ! -d $oneout ]] && mkdir $oneout
while ! cp -v $wdir/$prj/inject $oneout; do
sleep 5
done
echo -e "# INFO : Results will be transferred to $oneout"
echo -e "# INFO : Calculations done. Now run the go_${prj}_* scripts in $wdir/" echo -e "# INFO : Calculations done. Now run the go_${prj}_* scripts in $wdir/"
basenice=19 basenice=19
if $slurm; then if $slurm; then
basenice=0; basenice=0;
......
...@@ -90,7 +90,7 @@ my $imuaddi = 0; ...@@ -90,7 +90,7 @@ my $imuaddi = 0;
my $nofruns = 1; my $nofruns = 1;
my $ecutshe = 800.; my $ecutshe = 800.;
my $lemodel = "gheisha"; my $lemodel = "gheisha";
my $onedataBase = "/mnt/datahub.egi.eu/test8/fluka/"; my $onedataBase = "/mnt/datahub.egi.eu/test8/fluka"; # need to change also at do_sims.sh
sub get_answer { sub get_answer {
my $question = $_[0]; my $question = $_[0];
...@@ -577,7 +577,7 @@ EXIT ...@@ -577,7 +577,7 @@ EXIT
my $binout = sprintf("$direct/DAT%06d",$run_nr); my $binout = sprintf("$direct/DAT%06d",$run_nr);
my $out = "$direct/DAT$name.lst"; my $out = "$direct/DAT$name.lst";
my $script = "$home/run-$prj-$name.sh"; my $script = "$home/run-$prj-$name.sh";
my $oneout = "$onedataBase/S3_$prj_$site_$lemodel"; my $oneout = "$onedataBase/S3_${prj}_${site}_${lemodel}";
unless ($debug != 0) { unless ($debug != 0) {
opendir(IMD, "$direct/") or system("mkdir $direct/"); opendir(IMD, "$direct/") or system("mkdir $direct/");
closedir(IMD); closedir(IMD);
...@@ -596,10 +596,10 @@ EXIT ...@@ -596,10 +596,10 @@ EXIT
print $fh "bzip2 -9v $binout\n"; print $fh "bzip2 -9v $binout\n";
print $fh "bzip2 -9v $out\n"; print $fh "bzip2 -9v $out\n";
print $fh "echo \"tranferring to onedata...\"\n"; print $fh "echo \"tranferring to onedata...\"\n";
print $fg "echo \"[[ ! -d $oneout ]] && mkdir $oneout\"\n"; print $fh "while ! cp -v $binout.bz2 $oneout; do sleep 5; done\n";
print $fg "echo \"while ! cp -av $binout.bz2 $wdir/; do sleep 5; done\"\n"; print $fh "while ! cp -v $file $oneout; do sleep 5; done\n";
print $fg "echo \"while ! cp -av $out.bz2 $wdir/; do sleep 5; done\"\n"; print $fh "while ! cp -v $out.bz2 $oneout; do sleep 5; done\n";
print $fg "echo \"rm $binout.bz2 $out.bz2\"\n"; print $fh "rm $binout.bz2 $file $out.bz2\n";
print $fh "rm $script\n"; print $fh "rm $script\n";
close($fh); close($fh);
system("chmod 777 $script"); system("chmod 777 $script");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment