From 3f95565a3c69ee235976386481b1452427b1b64a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=90=D0=B1?= =?UTF-8?q?=D0=B4=D1=80=D0=B0=D1=85=D0=BC=D0=B0=D0=BD=D0=BE=D0=B2?= <565963@gmail.com> Date: Tue, 18 Jun 2024 15:42:14 +0300 Subject: [PATCH] Add: Bashrc basics --- README.md | 1 + clusterNodes/bashrc.md | 84 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 clusterNodes/bashrc.md diff --git a/README.md b/README.md index 9d2b668..8b9c7c8 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,4 @@ ## [Состав вычислительного кластера](./clusterNodes/nodelist.md) +## [Базовый вариант файла .bashrc](./clusterNodes/bashrc.md) \ No newline at end of file diff --git a/clusterNodes/bashrc.md b/clusterNodes/bashrc.md new file mode 100644 index 0000000..293596a --- /dev/null +++ b/clusterNodes/bashrc.md @@ -0,0 +1,84 @@ +# Файл .bashrc + +Файл bashrc определён в вашей домашней дирректории, его можно найти использовав команды + +``` +$ cd + +$ nano .bashrc +``` + +Если вы вносите изменения в файле `.bashrc` то чтобы изменения вступили в силу требунтся снова перезагрузить конфигурацию при помощи команд: + +``` +$ cd + +$ source .bashrc +``` + +Базовая конфигурация файла `.bashrc` выглядет следующим образом: + +``` +# .bashrc + + +# Source global definitions +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi + +# User specific environment +if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]] +then + PATH="$HOME/.local/bin:$HOME/bin:$PATH" +fi +export PATH + + +#GCC 11.2 INIT +#Devtoolset-11-gcc#g++ enabler +source /opt/rh/gcc-toolset-11/enable + + +#CONDA INIT +# >>> conda initialize >>> +# !! Contents within this block are managed by 'conda init' !! +__conda_setup="$('/opt/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" +if [ $? -eq 0 ]; then + eval "$__conda_setup" +else + if [ -f "/opt/miniconda3/etc/profile.d/conda.sh" ]; then + . "/opt/miniconda3/etc/profile.d/conda.sh" + else + export PATH="/opt/miniconda3/bin:$PATH" + fi +fi +unset __conda_setup +# <<< conda initialize <<< + + +#OPENMP INIT +#export LIB_OPENMP="/opt/intel2018/lib/intel64/libiomp5.so" +export LIB_OPENMP="/opt/intel/oneapi/compiler/2023.2.1/linux/compiler/lib/intel64_lin/libiomp5.so" +#for SCREEN correct working with OMP5.so library +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/intel/oneapi/compiler/2023.2.1/linux/compiler/lib/intel64_lin/" + +#CUDA INIT +export PATH="/opt/cuda/cuda-12.2/bin/:$PATH" +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/cuda/cuda12.2/lib64" +export PATH="/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/compilers/bin/:$PATH" +export PATH="/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/mpi/bin:$PATH" +export MANPATH="$MANPATH:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/comm_libs/mpi/man" + +#MPI INIT +export I_MPI_FABRICS=shm:ofi +#export I_MPI_CC=mpiicc +export UCX_TLS=mm,tcp,self +export OMPI_MCA_btl_openib_allow_ib=1 +export OMPI_MCA_btl_openib_if_include="mlx4_0:1" +export PATH="/usr/lib64/openmpi/bin/:$PATH" +export I_MPI_FALLBACK=1 + +#INTEL ICX/ICPX INIT +alias targetIntel="source /opt/intel/oneapi/setvars.sh intel64 >> /dev/null" +``` \ No newline at end of file