<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ubuntu 24 使用OF4]]></title><description><![CDATA[<p dir="auto">用docker～</p>
]]></description><link>https://cfd-china.com/topic/8186/ubuntu-24-使用of4</link><generator>RSS for Node</generator><lastBuildDate>Tue, 16 Jun 2026 21:23:30 GMT</lastBuildDate><atom:link href="https://cfd-china.com/topic/8186.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 Sep 2025 07:44:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ubuntu 24 使用OF4 on Mon, 06 Oct 2025 13:04:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://cfd-china.com/uid/6297">@Noob</a> 这个要看你超算的singularity设置了。这个超算不是我们搞得，所以不太清楚，至少目前一个node是没问题的。<br />
不过我在运行的时候提示过inifiniteband 相关的library缺失。</p>
<p dir="auto">我不确定你的情况，具体你得问超算admin怎么设置singularity的。理论上应该是没问题的</p>
]]></description><link>https://cfd-china.com/post/44829</link><guid isPermaLink="true">https://cfd-china.com/post/44829</guid><dc:creator><![CDATA[星星星星晴]]></dc:creator><pubDate>Mon, 06 Oct 2025 13:04:27 GMT</pubDate></item><item><title><![CDATA[Reply to ubuntu 24 使用OF4 on Sat, 04 Oct 2025 03:19:57 GMT]]></title><description><![CDATA[<p dir="auto">OF的镜像能跨节点计算吗</p>
]]></description><link>https://cfd-china.com/post/44823</link><guid isPermaLink="true">https://cfd-china.com/post/44823</guid><dc:creator><![CDATA[Noob]]></dc:creator><pubDate>Sat, 04 Oct 2025 03:19:57 GMT</pubDate></item><item><title><![CDATA[Reply to ubuntu 24 使用OF4 on Mon, 22 Sep 2025 08:44:41 GMT]]></title><description><![CDATA[<p dir="auto">最近开始用正经超算跑程序了，记录一下Singularity配置和运行OF4。<br />
下面是为什么不能使用docker的原因</p>
<pre><code>Singularity or Docker
Docker images provide a means to gain root access to the system they are running on. For this reason Docker is not available on the PC2 clusters. Singularity is compatible with all Docker images and it can be used with GPUs and MPI applications. Here is a comparision between virtual machines, Docker and Singularity.

Singularity images are stored as a single file which makes them easily shareable. You can host your images on the Singularity Cloud Library for others to download. You could also make it available by putting it on a web server like any other file. Singularity can be used to run massively-parallel applications which leverage fast interconnects like InfiniBand and GPUs. These applications suffer minimal performance loss since Singularity was designed to run "close to the hardware".
</code></pre>
<p dir="auto">根据说明，Singularity 可以无痛转换docker 镜像</p>
<p dir="auto">因此，<br />
OF4的原生docker地址<br />
<a href="https://hub.docker.com/r/openfoam/openfoam4-paraview50" target="_blank" rel="noopener noreferrer nofollow ugc">https://hub.docker.com/r/openfoam/openfoam4-paraview50</a></p>
<p dir="auto">执行下面命令即可，然后就是等待</p>
<pre><code>singularity pull docker://openfoam/openfoam4-paraview50
</code></pre>
<p dir="auto">然后就可以得到<code>openfoam4-paraview50_latest.sif</code> 文件</p>
<p dir="auto">执行和测试运行下面命令即可。</p>
<pre><code>singularity run ./openfoam4-paraview50_latest.sif
</code></pre>
<p dir="auto">但是如果使用自己编译的程序的话，会有寻找不到路径的情况，就要根据自己的情况处理。</p>
<p dir="auto">可以在.bashrc文件中添加下面的内容</p>
<pre><code># User specific aliases and functions
export WM_PROJECT_USER_DIR="/xxxxx/xxx/path"
</code></pre>
<p dir="auto">配合SLRUM的话，因为OF4版本太老，没有找到其他使用外部系统高版本的MPI的解决办法。所以只能使用自带的内部MPI运行。</p>
<pre><code>#!/bin/bash
#SBATCH ... 根据自己情况配置

module 自己配置

singularity exec ~/openfoam4-paraview50_latest.sif ./run_OF4.sh
</code></pre>
<p dir="auto">下面的脚本内容</p>
<pre><code>#!/bin/bash

source /opt/openfoam4/etc/bashrc 
bash

rm -rf processor*
decomposePar
mpirun -np 32 reactingParcelFoam -parallel
</code></pre>
]]></description><link>https://cfd-china.com/post/44774</link><guid isPermaLink="true">https://cfd-china.com/post/44774</guid><dc:creator><![CDATA[星星星星晴]]></dc:creator><pubDate>Mon, 22 Sep 2025 08:44:41 GMT</pubDate></item></channel></rss>