当前位置:首页 > 其他 > 正文内容

1.2 在Debian12的Conda环境下装置MOOSE

邻居的猫3个月前 (12-09)其他1159

根据 MOOSE 的应用程序开发所需的依靠项的许多库首选办法是经过 Conda获取。依照以下阐明运用 Conda 在核算机上创立环境。

1. 装置Miniforge。

根据您的渠道,请依照以下过程装置 Miniforge。假如您在这些过程中遇到问题,请拜访Conda 毛病扫除攻略。

  • Linux Users:
    Linux用户:
点击检查代码
curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
bash Miniforge3-Linux-x86_64.sh -b -p ~/miniforge
  • Macintosh Users with Intel processors:
    运用 Intel 处理器的 Macintosh 用户:
点击检查代码
curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh
bash Miniforge3-MacOSX-x86_64.sh -b -p ~/miniforge
  • Macintosh Users with Apple Silicon processors:
    运用 Apple Silicon 处理器的 Macintosh 用户:
点击检查代码
curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh
bash Miniforge3-MacOSX-arm64.sh -b -p ~/miniforge

将 Miniforge 装置在主目录中后,导出 PATH 以便能够运用:

点击检查代码
export PATH=$HOME/miniforge/bin:$PATH
Now that we can execute conda, initialize it and then exit the terminal:

现在咱们能够履行 conda ,初始化它,然后退出终端:

点击检查代码
conda init --all
exitCopy
Upon restarting your terminal, you should see your prompt prefixed with (base). This indicates you are in the base environment, and Conda is ready for operation:

重新启动终端后,您应该会看到以 (base) 为前缀的提示。这表明您处于根底环境中,而且 Conda 已准备好运转:

点击检查代码
$ (base) ~>
The next thing you should do after a fresh install, is perform an update to the base Conda environment:

全新装置后,您应该做的下一件事是对根本 Conda 环境履行更新:

点击检查代码
conda update --all --yes
Add INL's public channel to gain access to INL's Conda package library:

增加 INL 的公共通道以拜访 INL 的 Conda 包库:

点击检查代码
conda config --add channels https://conda.software.inl.gov/public

正告:不要运用 sudo
假如您发现自己在运用 Conda 指令时运用了 sudo 指令...有些不对劲。需求 sudo 的最常见原因是由于 Conda 装置不妥。Conda 应该装置到您的主目录中,而不运用 sudo 。

注:Miniforge vs Miniconda vs Anaconda
他们的中心都是包括conda这一东西,来完成 python 环境(environment) 和 包(package) 办理的,(其实不仅仅能够用来办理python,许多言语R, Java, C都支撑)。
Anaconda 和 Miniconda 是一个公司的产品,商用是付费的,个人暂时免费;而Miniforge是由社区主导,用GitHub保管,完全免费。Miniconda 和 Miniforge 是差不多的产品,代表着轻量化,而Anaconda是完整版,就略显臃肿。
Miniforge 运用conda-forge 作为默许 channel,而 Miniconda 运用anaconda.org 作为默许channel。

注:conda channels (源)
conda channels (源)是 packages 存储的方位,也便是你是从哪个来历下载这个包,对应到conda内部处理则是下载文件的链接。由于不同源会有相同姓名的包,因而有必要指定来历,一起装置conda的时分也会有一个默许的channel。现在干流的便是 conda-forge,完全且更新快。假如有多个channel,他们会按次序确认优先级,优先的源上找不到,就会到下一个优先级的源上去找。还能够设置channel的优先级是否strict,假如是strict的话,则只会在这一个源上查找。

2.创立 MOOSE 环境

Create a unique conda environment for MOOSE, named moose, and install the MOOSE dependency packages:
为 MOOSE 创立名为 moose 的仅有 conda 环境,并装置 MOOSE 依靠项包:

点击检查代码
conda create -n moose moose-dev=2023.12.20

After the installation completes, activate the new environment:
装置完成后,激活新环境:

点击检查代码
conda activate moose

If you are running into errors, please see our troubleshooting guide for Conda.

假如您遇到过错,请参阅Conda 毛病扫除攻略

关于翻开的每个终端窗口,以及每非必须履行 MOOSE 相关作业时,都需求 conda activate moose 。假如您期望将其主动履行,能够将该指令增加到 shell 配置文件的结尾。

3. 克隆 MOOSE

MOOSE is hosted on GitHub and should be cloned directly from there using git. We recommend creating a directory ~/projects to contain all of your MOOSE related work.

MOOSE 保管在 GitHub 上,应运用 git 直接从那里克隆。咱们主张创立一个目录 ~/projects 来包括一切与 MOOSE 相关的作业。

To clone MOOSE, run the following commands in a terminal:
要克隆 MOOSE,请在终端中运转以下指令:

点击检查代码
mkdir -p ~/projects
cd ~/projects
git clone https://github.com/idaholab/moose.git
cd moose
git checkout master
> MOOSE 的 master 分支是安稳分支,只要在一切测验经过后才会更新。这能够维护您免受 MOOSE 存储库中的日常更改的影响。

gitee镜像 https://gitee.com/mirrors/moose.git

4.构建和测验 MOOSE

To build MOOSE run the following commands:
要构建 MOOSE,请运转以下指令:

点击检查代码
cd ~/projects/moose/test
make -j 6

To test MOOSE, run the following commands:

若要测验 MOOSE,请运转以下指令:

点击检查代码
cd ~/projects/moose/test
./run_tests -j 6

Some tests are SKIPPED. This is normal as some tests are specific to available resources, or some other constraint your machine does not satisfy. If you see failures, or you see MAX FAILURES, thats a problem! And it needs to be addressed before continuing:

某些测验被越过。这是正常的,由于某些测验特定于可用资源,或许核算机不满足的其他一些束缚。假如您看到失利,或许您看到 MAX FAILURES ,那便是一个问题!在持续之前,需求处理它:

  • Supply a report of the actual failure (scroll up a ways). For example the following snippet does not give the full picture (created with ./run_tests -i always_bad):

供给实践毛病的陈述(向上翻滚)。例如,以下代码片段没有给出全貌(运用 ./run_tests -i always_bad 创立):

点击检查代码
Final Test Results:
--------------------------------------------------------------------------------
tests/test_harness.always_ok .................... FAILED (Application not found)
tests/test_harness.always_bad .................................. FAILED (CODE 1)
--------------------------------------------------------------------------------
Ran 2 tests in 0.2 seconds. Average test time 0.0 seconds, maximum test time 0.0 seconds.
0 passed, 0 skipped, 0 pending, 2 FAILED
- Instead, you need to scroll up and report the actual error:

相反,您需求向上翻滚并陈述实践过错:

点击检查代码
materials/derivative_material_interface.required_property/allow_override .................................. OK
materials/derivative_material_interface.required_property/derivative_parsed_material ...................... OK
partitioners/petsc_partitioner.ptscotch_weight_elment ........................................ [min_cpus=4] OK
partitioners/petsc_partitioner.ptscotch_weight_side .......................................... [min_cpus=4] OK
partitioners/petsc_partitioner.ptscotch_weight_both .......................................... [min_cpus=4] OK
partitioners/petsc_partitioner.parmetis ...................................................... [min_cpus=4] OK
partitioners/petsc_partitioner.parmetis_weight_element ....................................... [min_cpus=4] OK
partitioners/petsc_partitioner.parmetis_weight_side .......................................... [min_cpus=4] OK
partitioners/petsc_partitioner.parmetis_weight_both .......................................... [min_cpus=4] OK
partitioners/petsc_partitioner.parmetis_presplit_mesh ........................................ [min_cpus=2] OK
meshgenerators/distributed_rectilinear/partition.1D_4 ........................................ [min_cpus=4] OK
meshgenerators/distributed_rectilinear/partition.3D_3 ........................................ [min_cpus=3] OK
meshgenerators/distributed_rectilinear/partition.3D_4 ........................................ [min_cpus=4] OK
meshgenerators/distributed_rectilinear/partition.3D_8 ................... [min_cpus=8,insufficient slots] SKIP
------------------------------------------------------------------------------------------
Ran 4100 tests in 393.7 seconds. Average test time 0.3 seconds, maximum test time 22.9 seconds.
4100 passed, 106 skipped, 0 pending, 0 failed

5.卸载

If you wish to remove the moose environment at any time, you may do so using the following commands:
假如您期望随时删去驼鹿环境,能够运用以下指令进行操作:

点击检查代码
conda activate base
conda env remove -n moose

Now that you have a working MOOSE, proceed to 'New Users' to begin your tour of MOOSE!
现在您已经有了一个能够作业的 MOOSE,请前往“新用户”开端您的 MOOSE 之旅!

扫描二维码推送至手机访问。

版权声明:本文由51Blog发布,如需转载请注明出处。

本文链接:https://www.51blog.vip/?id=729

分享给朋友:

“1.2 在Debian12的Conda环境下装置MOOSE” 的相关文章

Litctf2024-郑州轻工业大学第二届ctf-校内赛道wp

Litctf2024-郑州轻工业大学第二届ctf-校内赛道wp

战队:怎落笔都不对 终究成果校内第4 MISC 1. 盯帧珍珠 翻开文件发现是一个图片,放入 010 查看得文件头是 gif 格局 改为gif后缀得到一个GIF图,在下面这个网站分化,即可得到flag https://33tool.com/gif_unzip/ 2. 原铁,发动! 翻开发现是...

开源云桌面,构建灵活、安全的远程办公环境

开源云桌面,构建灵活、安全的远程办公环境

1. PXVDI云桌面: 平台:基于Proxmox VE 特点:支持RDP协议,适合有技术人员的公司使用。提供了详细的安装步骤和配置指南。2. 基于免费HyperV和Windows Admin Center的桌面云: 平台:HyperV Server和Windows Admin C...

开源杀毒软件,守护网络安全的新选择

开源杀毒软件,守护网络安全的新选择

1. ClamAV 简介:ClamAV 是一款免费、跨平台的开源防病毒软件工具包,主要用于检测和清除计算机设备上的恶意软件。它采用C和C 语言编写,并在GNU通用公共许可证下授权。 特点:ClamAV 支持多种操作系统,包括Windows、Linux、macOS等,可以检测各种类型的恶...

开源吧,如何选择适合自己的开源项目

开源吧,如何选择适合自己的开源项目

开源(Open Source)是指一种软件开发的模式,在这种模式下,软件的源代码可以被公众自由地使用、修改和分发。开源软件通常遵循特定的许可证,如GPL(通用公共许可证)、MIT许可证、Apache许可证等,这些许可证规定了用户对软件的使用、修改和分发的方式和限制。开源软件的优点包括:1. 透明性:...

区块链架构图,构建去中心化世界的基石

区块链架构图,构建去中心化世界的基石

区块链架构可以分为多个层次,每个层次都有其特定的功能和作用。以下是区块链架构的详细说明: 1. 数据层数据层是区块链架构的最底层,负责封装底层数据区块以及相关的数据加密和时间戳等技术。数据层的主要功能包括: 区块结构:每个数据区块包含区块头和区块体。区块头包含版本号、前一区块哈希值、当前区块的目标哈...

三问区块链,三问区块链——揭秘其原理、应用与未来

三问区块链,三问区块链——揭秘其原理、应用与未来

区块链是一个分布式数据库,它按照时间顺序将数据(区块)以顺序相连的方式组合成的一种链式数据结构,并通过密码学保证其不可篡改和不可伪造的。以下是关于区块链的三个问题及其答案:1. 区块链技术的主要特点是什么? 区块链技术的主要特点包括去中心化、透明性、安全性、不可篡改性和可追溯性。去中心化意味着没...