spack+PETSc+LaMEM安装和编译
467 字
2 分钟
spack+PETSc+LaMEM安装和编译
环境预装,该软件安装和编译,需要提前搭建好网络环境
spack安装和配置
前提环境
sudo apt updatesudo apt install build-essential gfortran clang-18git clone https://github.com/spack/spack.git ~/spackcd ~/spack. share/spack/setup-env.shspack compiler find安装PETSc
spack install petsc@3.22.5 +mumps +suite-sparse -hypre -hdf5 -shared -debug## 上面那个测试的时候部分功能不通过,下面这是另一个完整版的,不一定百分百能全部通过(未测试)spack install petsc@3.22.5 +mumps +suite-sparse +superlu-dist -hypre -hdf5 -shared -debug## 下面是test通过率Test Summary: | Pass Fail Total TimeLaMEM Testsuite | 91 13 104 5m26.2s t1_FB1_Direct | 3 3 6.7s t2_FB2_MG | 1 1 2.0s t3_Subduction | 4 4 38.6s t4_Localisation | 3 1 4 12.9s t5_Permeability | 1 1 0.7s t6_AdjointGradientScalingLaws_p2 | 1 1 2 0.5s t7_AdjointGradientInversion | 5 5 7.7s t8_AdjointGradients | 6 4 10 10.7s t9_PhaseDiagrams | 1 1 11.6s t10_Compressibility | 4 4 7.7s t11_Subgrid | 1 1 0.2s t12_Temperature_diffusion | 3 3 3.3s t13_Rheology0D | 9 9 6.1s t14_1DStrengthEnvelope | 8 8 3.4s t15_RTI | 1 1 5.7s t16_PhaseTransitions | 7 7 45.4s t17_InflowOutflow | 3 1 4 15.0s t18_SimpleShear | 4 4 1.4s t19_CompensatedInflow | 2 2 34.4s t20_FSSA | 1 1 6.4s t21_Passive_Tracer | 2 2 4.3s t22_RidgeGeom | 2 2 1.0s t23_Permeable | 1 1 24.3s t24_Erosion_Sedimentation | 2 2 26.0s t25_APS_Healing | 1 1 0.2s t26_Dike | 6 6 17.8s t27_T-dep_Conductivity | 1 1 21.6s t28_HeatRecharge | 2 2 0.9s t29_PermeableSides_VelBoxes | 1 1 1.0s t30_Timestep_Schedule | 1 1 0.4s t31_geomIO | 2 2 1.4s t32_BC_velocity | 2 2 2.5s t33_Initial_APS | 6 6 4.6s提示,出现该报错,直接方向键上键,回车等待重新下载

安装成功

环境设置
复制下面的命令直接粘贴复制到命令行回车
echo 'if command -v spack &> /dev/null; then export PETSC_DIR=$(spack location -i petsc) export PETSC_OPT=$PETSC_DIR export PETSC_DEB=$PETSC_DIR export PETSC_ARCH=""fi' >> ~/.bashrcsource ~/.bashrcLaMEM编译
#首先下载git clone https://github.com/UniMainzGeo/LaMEM.git ./LaMEM#然后输入这个命令spack load petsc#前往LaMEM/src目录,cd LaMEM/src# 编译make mode=opt all配置
#配置echo 'export PATH="$HOME/LaMEM/bin/opt:$PATH"' >> ~/.bashrcsource ~/.bashrc测试
sudo snap install julia --classic#成功后输入julia --version,看看有没有版本号julia --version#前往测试目录cd ../test/#运行测试make test支持与分享
如果这篇文章对你有帮助,欢迎分享给更多人或赞助支持!
spack+PETSc+LaMEM安装和编译
https://sunkme.com/posts/spack_petsc_lamem/ 相关文章 智能推荐
1
2026最新node.js安装和配置教程
软件安装 超级详细的node.js安装和配置教程
2
从零开始:我的 Astro 博客全栈建设方案(0)-网站结构
网站搭建 这是一个从0开始建造个人博客的完整教程
随机文章 随机推荐