You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build_LiebLin_catalogue_k_fixed.sh 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #! /bin/zsh
  2. # We use zsh here to support floats (not supported in bash)
  3. # This script produces a whole stack of subdirectories,
  4. # for a range of values of c centered on 4 with 8 up/down factors of 2,
  5. # and momenta in multiples of kF/4 from 1 to 16.
  6. # For each combination c & k, the LiebLin_Catalogue_Fixed_c_k_Nscaling
  7. # executable is invoked, which computes up to the highest N possible in view of time.
  8. if [[ $# -ne 4 ]]; then
  9. echo "Arguments needed: whichDSF, kBT, target_sumrule, nr_minutes (for each c, k combination)."
  10. exit 1
  11. fi
  12. if [[ $1 != 'd' && $1 != 'g' && $1 != 'o' ]]; then
  13. echo "Only the d, g and o scanning options are implemented."
  14. exit 1
  15. fi
  16. if [[ $2 -lt 0 ]]; then
  17. echo "Temperature kBT must be > 0."
  18. exit 1
  19. fi
  20. if [[ $3 -lt 0 || $3 -gt 1 ]]; then
  21. echo "Requirement: 0 < target_sumrule < 1."
  22. exit 1
  23. fi
  24. if [[ $4 -lt 1 ]]; then
  25. echo "Please give a positive nr_minutes."
  26. exit 1
  27. fi
  28. zmodload zsh/datetime
  29. whichDSF=$1
  30. kBT=$2
  31. target_sumrule=$3
  32. nr_minutes=$4
  33. correlator='rho-rho'
  34. if [[ $whichDSF == 'o' ]]; then
  35. correlator='psidag-psi'
  36. elif [[ $whichDSF == 'g' ]]; then
  37. correlator='psi-psidag'
  38. fi
  39. mkdir -p logs
  40. logfile='logs/run_catalogue_k_fixed_'$whichDSF'_kBT_'$kBT'_sr_'$target_sumrule'_nr_minutes_'$nr_minutes'_'$(date '+%Y-%m-%d-%Hh%M')'.log'
  41. touch $logfile
  42. clist=(1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625 0.03125 0.015625)
  43. basedir="$(pwd)"
  44. for c in $clist
  45. do
  46. for nk in {1..16}
  47. do
  48. echo '** Starting run for c =' $c', kfact = '$nk | tee -a $logfile
  49. dir='Lieb-Liniger/'$correlator'/T_'$kBT'/c_fixed/c_'$c'/k_fixed/k_'${(l:2::0:)nk}'kFo4/sr_'$target_sumrule'/prelim'
  50. mkdir -p $dir
  51. cd $dir
  52. LiebLin_Catalogue_Fixed_c_k_Nscaling $whichDSF $c $nk $kBT $target_sumrule 0 $nr_minutes | tee -a $basedir/$logfile
  53. cd $basedir
  54. echo '** Successfully completed run for c =' $c', kfact = '$nk'.\n' | tee -a $logfile
  55. done
  56. done
  57. echo '\n\n*** Successfully completed build_LiebLin_catalogue_k_fixed on '$(date '+%Y-%m-%d-%Hh%M') | tee -a $logfile