Add: Bashrc basics
This commit is contained in:
		
							parent
							
								
									80c2686005
								
							
						
					
					
						commit
						3f95565a3c
					
				| 
						 | 
				
			
			@ -4,3 +4,4 @@
 | 
			
		|||
 | 
			
		||||
## [Состав вычислительного кластера](./clusterNodes/nodelist.md)
 | 
			
		||||
 | 
			
		||||
## [Базовый вариант файла .bashrc](./clusterNodes/bashrc.md)
 | 
			
		||||
							
								
								
									
										84
									
								
								clusterNodes/bashrc.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										84
									
								
								clusterNodes/bashrc.md
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -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"
 | 
			
		||||
```
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user