Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

  1. CFD中文网
  2. OpenFOAM
  3. ubuntu 24 使用OF4

ubuntu 24 使用OF4

已定时 已固定 已锁定 已移动 OpenFOAM
2 帖子 1 发布者 211 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • 星 离线
    星 离线
    星星星星晴
    写于 最后由 编辑
    #1

    用docker~

    回来了,都回来了~

    1 条回复 最后回复
  • 星 离线
    星 离线
    星星星星晴
    写于 最后由 编辑
    #2

    最近开始用正经超算跑程序了,记录一下Singularity配置和运行OF4。
    下面是为什么不能使用docker的原因

    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".
    

    根据说明,Singularity 可以无痛转换docker 镜像

    因此,
    OF4的原生docker地址
    https://hub.docker.com/r/openfoam/openfoam4-paraview50

    执行下面命令即可,然后就是等待

    singularity pull docker://openfoam/openfoam4-paraview50
    

    然后就可以得到openfoam4-paraview50_latest.sif 文件

    执行和测试运行下面命令即可。

    singularity run ./openfoam4-paraview50_latest.sif
    

    但是如果使用自己编译的程序的话,会有寻找不到路径的情况,就要根据自己的情况处理。

    可以在.bashrc文件中添加下面的内容

    # User specific aliases and functions
    export WM_PROJECT_USER_DIR="/xxxxx/xxx/path"
    

    配合SLRUM的话,因为OF4版本太老,没有找到其他使用外部系统高版本的MPI的解决办法。所以只能使用自带的内部MPI运行。

    #!/bin/bash
    #SBATCH ... 根据自己情况配置
    
    module 自己配置
    
    singularity exec ~/openfoam4-paraview50_latest.sif ./run_OF4.sh
    

    下面的脚本内容

    #!/bin/bash
    
    source /opt/openfoam4/etc/bashrc 
    bash
    
    rm -rf processor*
    decomposePar
    mpirun -np 32 reactingParcelFoam -parallel
    

    回来了,都回来了~

    1 条回复 最后回复

京ICP备15017992号-2

  • 登录

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]