Advertisement
yLii

cluster .bashrc 27th oct

Oct 27th, 2021
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.84 KB | None | 0 0
  1.  
  2.  
  3. # .bashrc
  4.  
  5. # DO NOT SWITCH TO ZSH FROM .BASHRC FILE
  6. #export SHELL=/bin/zsh
  7. #exec /bin/zsh -l
  8.  
  9.  
  10. # Source global definitions
  11. # if [ -f /etc/bashrc ]; then
  12. # . /etc/bashrc
  13. # fi
  14.  
  15. # User specific environment
  16. # PATH="$HOME/.local/bin:$HOME/bin:$PATH"
  17. # export PATH
  18.  
  19. # Uncomment the following line if you don't like systemctl's auto-paging feature:
  20. # export SYSTEMD_PAGER=
  21.  
  22. #
  23. # 88
  24. # ,d 88
  25. # 88 88
  26. # 8b,dPPYba, ,adPPYYba, MM88MMM 88,dPPYba, ,adPPYba,
  27. # 88P' "8a "" `Y8 88 88P' "8a I8[ ""
  28. # 88 d8 ,adPPPPP88 88 88 88 `"Y8ba,
  29. # 88b, ,a8" 88, ,88 88, 88 88 aa ]8I
  30. # 88`YbbdP"' `"8bbdP"Y8 "Y888 88 88 `"YbbdP"'
  31. # 88
  32. # 88
  33. #
  34.  
  35.  
  36. # User specific aliases and functions
  37. # progs is for any programme that is work-related
  38. # custom is for anything fun and extra
  39.  
  40. # add hdf5
  41. export LD_LIBRARY_PATH=/scratch/s1/TjonnieLi/gmunu_libs/2020u4/mpiifort/hdf5/lib:$LD_LIBRARY_PATH
  42.  
  43. # for gmunu
  44. export GMUNU_DIR=$HOME/progs/gmunu
  45. export PATH=$HOME/miniconda3/bin:$PATH:$HOME/progs/gmunu:$HOME/progs/gmunu/tools:$HOME/custom/junest/bin:$HOME/.junest/usr/bin
  46. # :/opt/share/anaconda/3-2018.12/bin
  47. export PYTHONPATH=$GMUNU_DIR/tools/python:$PYTHONPATH
  48. export PYTHONPATH=$HOME/bin/python:$PYTHONPATH
  49. export PATH=$PYTHONPATH:$PATH
  50.  
  51.  
  52. export RUNS=/scratch/s1/TjonnieLi/lii/simulations/runs
  53. export PROFILES=/scratch/s1/TjonnieLi/lii/simulations/initial_profiles
  54.  
  55.  
  56. export LII=/scratch/s1/TjonnieLi/lii
  57. export PRJ=/lustre/project/TjonnieLi/lii/runs
  58.  
  59. export TESTS=$GMUNU_DIR/tests
  60. export GRHD=$TESTS/grhd
  61. export GRMHD=$TESTS/grmhd
  62. export NS2D=$GRHD/neutron_star_cylindrical_2D
  63. export FOCUS=$GRMHD/mag_neutron_star_cylindrical_2D
  64. export OUTPUT=$FOCUS/outputruns
  65. export XNS=$HOME/progs/xns
  66.  
  67. export MESASDK_ROOT=/users/s1155155707/custom/mesasdk
  68.  
  69.  
  70. # 88
  71. # 88
  72. # 88
  73. # ,adPPYba, ,adPPYba, 88 ,adPPYba, 88 88 8b,dPPYba, ,adPPYba,
  74. # a8" "" a8" "8a 88 a8" "8a 88 88 88P' "Y8 I8[ ""
  75. # 8b 8b d8 88 8b d8 88 88 88 `"Y8ba,
  76. # "8a, ,aa "8a, ,a8" 88 "8a, ,a8" "8a, ,a88 88 aa ]8I
  77. # `"Ybbd8"' `"YbbdP"' 88 `"YbbdP"' `"YbbdP'Y8 88 `"YbbdP"'
  78. #
  79.  
  80.  
  81. # ls colours
  82. alias ls='ls --color'
  83. LS_COLORS="di=1;36:ex=1;31:fi=0:ln=35:*.log=1;32:*.pdf=35:*.png=35:*.py=33:*.par=35:*.sh=3;35:*.t=34:*.rpm=90:*.tar=1;31"
  84. export LS_COLORS
  85.  
  86.  
  87.  
  88. # ad88 88
  89. # d8" ,d ""
  90. # 88 88
  91. # MM88MMM 88 88 8b,dPPYba, ,adPPYba, MM88MMM 88 ,adPPYba, 8b,dPPYba, ,adPPYba,
  92. # 88 88 88 88P' `"8a a8" "" 88 88 a8" "8a 88P' `"8a I8[ ""
  93. # 88 88 88 88 88 8b 88 88 8b d8 88 88 `"Y8ba,
  94. # 88 "8a, ,a88 88 88 "8a, ,aa 88, 88 "8a, ,a8" 88 88 aa ]8I
  95. # 88 `"YbbdP'Y8 88 88 `"Ybbd8"' "Y888 88 `"YbbdP"' 88 88 `"YbbdP"'
  96.  
  97.  
  98.  
  99. # exec $HOME/bin/zsh -l
  100.  
  101.  
  102. # autojump, "j"
  103. [[ -s /users/s1155155707/.autojump/etc/profile.d/autojump.sh ]] && source /users/s1155155707/.autojump/etc/profile.d/autojump.sh
  104.  
  105.  
  106. # custom commands
  107. # function GMUNU() {
  108. # conda activate gmunu
  109. # }
  110.  
  111.  
  112.  
  113. function CHECK() {
  114. subl mod_usr.t para.par $(basename ${PWD%/*})_${PWD##*/}.sh
  115. }
  116.  
  117. function DOFFT() {
  118. python extract_gw.py && python plot_gw.py && python extract_point.py && python fft_rho_c.py && python plot_combine.py && imgcat *.png
  119. }
  120.  
  121. function ANIMATE() {
  122. python animate_B.py && python animate_Rho.py
  123. }
  124.  
  125. function DOANALYSIS(){
  126. zsh $RUNS/analysis.sh
  127. }
  128.  
  129. function PULLW() {
  130. scp -r -P 1922 liiyung.yeow@tgfli-s0.phy.cuhk.edu.hk:$1 $2
  131. }
  132.  
  133. function PUSHW() {
  134. scp -r -P 1922 $1 liiyung.yeow@tgfli-s0.phy.cuhk.edu.hk:$2
  135. }
  136.  
  137.  
  138. function sq() {
  139. squeue
  140. }
  141.  
  142.  
  143. function SANDBOX() {
  144. ssh -R 52698:localhost:52698 -Y sandbox
  145. }
  146.  
  147. function pp() {
  148. conda deactivate && conda activate postprocessing
  149. }
  150.  
  151.  
  152. alias sl='SLURM_TIME_FORMAT="%d %H:%M:%S" sacct -X --format=JobID%9,JobName%16,Priority%4,Submit%12,Start%12,Elapsed,NCPU%5,CPUTime,ExitCode,State'
  153. # alias zsh='zsh & '
  154.  
  155. alias conda='$HOME/miniconda3/bin/conda'
  156.  
  157.  
  158.  
  159. # for gmunu
  160. module load intel/2020u4
  161. # module load python/3.6
  162. # for xns with MESA
  163. module load perl/5.26.2
  164. module load zlib/1.2.11
  165. # source /lustre/project/TjonnieLi/lii/miniconda3/bin
  166. # source /lustre/project/TjonnieLi/lii/miniconda3/bin/activate
  167. # source /opt/share/anaconda/3-2018.12/bin/activate
  168. # source /opt/share/anaconda/3-2018.12/condabin/conda
  169. # source /project/TjonnieLi/share/anaconda3/condabin/conda
  170. # source $HOME/custom/envs/python36/bin/activate # commented out by conda initialize
  171. source $MESASDK_ROOT/bin/mesasdk_init.sh
  172. # zsh
  173.  
  174.  
  175.  
  176.  
  177.  
  178. # experimental
  179. # CUSTOM_PREFIX='❯'
  180.  
  181. # PS1=$'\x1b[33;1;3m$(basename "$CONDA_PREFIX") \x1b[31;1m$CUSTOM_PREFIX \x1b[0m'
  182. # PS1=$'\x1b[31;1m$CUSTOM_PREFIX \x1b[0m'
  183.  
  184.  
  185.  
  186. # # >>> conda initialize >>>
  187. # # !! Contents within this block are managed by 'conda init' !!
  188. # __conda_setup="$('/opt/share/intel/2020u4/intelpython3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
  189. # if [ $? -eq 0 ]; then
  190. # eval "$__conda_setup"
  191. # else
  192. # if [ -f "/opt/share/intel/2020u4/intelpython3/etc/profile.d/conda.sh" ]; then
  193. # . "/opt/share/intel/2020u4/intelpython3/etc/profile.d/conda.sh"
  194. # else
  195. # export PATH="/opt/share/intel/2020u4/intelpython3/bin:$PATH"
  196. # fi
  197. # fi
  198. # unset __conda_setup
  199. # # <<< conda initialize <<<
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement