Starman为董博编写,专注于HPC的使用,带来更优的环境搭建体验。
sudo yum install lbzip2
)yum install gcc
)、g++(yum install gcc-c++
)、gfortran(yum install gcc-gfortran
)编译器(安装很简单,最终使用which gcc
、 which g++
、 which gfortran
均能找到路径即可)# git clone https://github.com/dongli/starman
把starman/setup/bashrc文件夹添加至环境变量(root用户添加至 /etc/profile, 普通用户添加至~/.bash_profile)
source <path_to_starman_setup_bashrc_file>
如:source ~/starman/setup/bashrc
运行setup命令启动starman
# starman setup --install-root <where_you_want_to_put_installed_software> \
--rc-root <where_store_config_and_db_files> \
--cache-root <where_store_packages_and_temporary_files>
# starman config
gcc --version
看一下gcc,g++,gfortran的版本,如果不是4.8.5,则需要修改下面的版本号install_root
和cache_root
应该是提前有的---
install_root: /opt/software
cache_root: /tmp/starman
defaults:
compiler_set: gcc_4.8.5
compiler_sets:
gcc_4.8.5:
c: /usr/bin/gcc
cxx: /usr/bin/g++
fortran: /usr/bin/gfortran
# starman install netcdf
在环境变量里(/etc/profile
)添加
starman load netcdf@4.6.0
重载环境(/etc/profile
)
# which ncdump
成功找到目录即成功
starman uninstall netcdf