Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    在WSL里用源码包安装openfoam失败

    OpenFOAM
    5
    22
    10822
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • .J.
      .J. last edited by 李东岳

      所有依赖库都安装完毕

      0_1514382278815_57f3c941-c944-4357-9068-f87bb71d9842-image.png

      在~/.bashrc末尾添加了

      0_1514382496762_3e72860e-6f29-48bb-8f6d-f3f7f1fbd152-image.png

      错误信息为:

      ywj123450@DESKTOP-7HCQCPV:/mnt/f/OpenFOAM-5.x$ source ~/.bashrc
      ywj123450@DESKTOP-7HCQCPV:/mnt/f/OpenFOAM-5.x$ ./Allwmake
      Allwmake /mnt/f/OpenFOAM-5.x
      make: Nothing to be done for `all'.
      
      ========================================
      Start ThirdParty Allwmake
      ========================================
      
      ========================================
      Build MPI libraries if required
      
      ========================================
      Build Scotch decomposition library scotch_6.0.3
          /mnt/f/ThirdParty-5.x/platforms/linux64GccDPInt32/scotch_6.0.3
          scotch header in /mnt/f/ThirdParty-5.x/platforms/linux64GccDPInt32/scotch_6.0.3/include
          scotch libs   in /mnt/f/ThirdParty-5.x/platforms/linux64GccDPInt32/lib
      
      ========================================
      Build PTScotch decomposition library scotch_6.0.3 (uses MPI)
          /mnt/f/ThirdParty-5.x/platforms/linux64GccDPInt32/scotch_6.0.3
      
          ptscotch header in /mnt/f/ThirdParty-5.x/platforms/linux64GccDPInt32/scotch_6.0.3/include/openmpi-system
          ptscotch libs   in /mnt/f/ThirdParty-5.x/platforms/linux64GccDPInt32/lib/openmpi-system
      
      ========================================
      Build Metis decomposition
          optional component Metis was not found
      ========================================
      Build CGAL
          optional component was not found
      
      ========================================
      Done ThirdParty Allwmake
      ========================================
      
      Allwmake src
      no git description found
      Allwmake src/Pstream
      wmake dummy
      wclean mpi
      wmake mpi
      ....省略中间部分(这部分应该没问题)...
      UPstream.C: In static member function ‘static bool Foam::UPstream::finishedRequest(Foam::label)’:
      /usr/lib/openmpi/include/mpi.h:632:43: warning: use of old-style cast [-Wold-style-cast]
       #define MPI_STATUS_IGNORE ((MPI_Status *) 0)
                                                 ^
      UPstream.C:787:9: note: in expansion of macro ‘MPI_STATUS_IGNORE’
               MPI_STATUS_IGNORE
               ^
      g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -pthread -IlnInclude -I. -I/mnt/f/OpenFOAM-5.x/src/OpenFOAM/lnInclude -I/mnt/f/OpenFOAM-5.x/src/OSspecific/POSIX/lnInclude   -fPIC -shared -Xlinker --add-needed -Xlinker --no-as-needed /mnt/f/OpenFOAM-5.x/platforms/linux64GccDPInt32OptSYSTEMOPENMPI/src/Pstream/mpi/UOPwrite.o /mnt/f/OpenFOAM-5.x/platforms/linux64GccDPInt32OptSYSTEMOPENMPI/src/Pstream/mpi/UIPread.o /mnt/f/OpenFOAM-5.x/platforms/linux64GccDPInt32OptSYSTEMOPENMPI/src/Pstream/mpi/UPstream.o /mnt/f/OpenFOAM-5.x/platforms/linux64GccDPInt32OptSYSTEMOPENMPI/src/Pstream/mpi/PstreamGlobals.o -L/mnt/f/OpenFOAM-5.x/platforms/linux64GccDPInt32OptSYSTEMOPENMPI/lib \
                  -pthread -L/usr//lib -L/usr/lib/openmpi/lib -lmpi -ldl -lhwloc  -o /mnt/f/OpenFOAM-5.x/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libPstream.so
      touch: setting times of ‘/mnt/f/OpenFOAM-5.x/platforms/linux64GccDPInt32OptSYSTEMOPENMPI/src/Pstream/mpi/using:openmpi-system’: No such file or directory
      
      

      求助大家!感谢!

      Blog: http://www.cnblogs.com/Jay-CFD/
      Research Gate: https://www.researchgate.net/profile/Weijie_Yin2

      1 Reply Last reply Reply Quote
      • 李东岳
        李东岳 管理员 last edited by

        Wsl是什么?

        CFD课程 改成线上了 http://dyfluid.com/class.html
        CFD高性能服务器 http://dyfluid.com/servers.html

        .J. 1 Reply Last reply Reply Quote
        • .J.
          .J. @李东岳 last edited by

          @李东岳 就是win10下的bash

          Blog: http://www.cnblogs.com/Jay-CFD/
          Research Gate: https://www.researchgate.net/profile/Weijie_Yin2

          1 Reply Last reply Reply Quote
          • 李东岳
            李东岳 管理员 last edited by

            没看到错误啊?

            CFD课程 改成线上了 http://dyfluid.com/class.html
            CFD高性能服务器 http://dyfluid.com/servers.html

            .J. 1 Reply Last reply Reply Quote
            • .J.
              .J. @李东岳 last edited by

              @李东岳 但是blockMesh命令找不到

              ywj123450@DESKTOP-7HCQCPV:/mnt/f/BaiduYunDownload$ blockMesh
              blockMesh: command not found
              

              我看编译信息最后有一段

              touch: setting times of ‘/mnt/f/OpenFOAM-5.x/platforms/linux64GccDPInt32OptSYSTEMOPENMPI/src/Pstream/mpi/using:openmpi-system’: No such file or directory
              

              是不是代表缺少文件啊?

              Blog: http://www.cnblogs.com/Jay-CFD/
              Research Gate: https://www.researchgate.net/profile/Weijie_Yin2

              1 Reply Last reply Reply Quote
              • 李东岳
                李东岳 管理员 last edited by

                你openfoam编译完了么,一楼那个log不全

                CFD课程 改成线上了 http://dyfluid.com/class.html
                CFD高性能服务器 http://dyfluid.com/servers.html

                .J. 1 Reply Last reply Reply Quote
                • .J.
                  .J. @李东岳 last edited by

                  @李东岳 又试了下,用命令安装成功了,源码包直接编译有问题。
                  不过又有个新问题paraFoam这个命令运行的时候说无法连接到x server

                  Created temporary 'cavity.OpenFOAM'
                  paraview: cannot connect to X server
                  

                  x server是啥东西?

                  Blog: http://www.cnblogs.com/Jay-CFD/
                  Research Gate: https://www.researchgate.net/profile/Weijie_Yin2

                  1 Reply Last reply Reply Quote
                  • 李东岳
                    李东岳 管理员 last edited by

                    你直接下崽pataview win版本,直接用啊,用paraview win直接打开xxx.foam文件

                    CFD课程 改成线上了 http://dyfluid.com/class.html
                    CFD高性能服务器 http://dyfluid.com/servers.html

                    1 Reply Last reply Reply Quote
                    • bestucan
                      bestucan 版主 副教授 last edited by

                      x server 是linux的图形界面服务。不同于windows的图形界面嵌入到系统中,linux的图形界面对于系统而言是个可有可无的软件。win10自带的linux系统没有图形界面。

                      滚来滚去……~(~o ̄▽ ̄)~o 滚来滚去都不能让大家看出来我不是老师么 O_o

                      异步沟通方式(《posting style》from wiki)(下载后打开):
                      https://www.jianguoyun.com/p/Dc52X2sQsLv2BRiqnKYD
                      提问的智慧(github在gitee的镜像):
                      https://gitee.com/bestucan/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md

                      1 Reply Last reply Reply Quote
                      • 李东岳
                        李东岳 管理员 last edited by 李东岳

                        楼上说的很到位。

                        • 对了,对于Windows下面开Linux文件,可以参考这个帖子,https://albertopassalacqua.com/?p=1650 有人试过么?
                        • bash那个颜色,还是做不到完美的地步

                        CFD课程 改成线上了 http://dyfluid.com/class.html
                        CFD高性能服务器 http://dyfluid.com/servers.html

                        1 Reply Last reply Reply Quote
                        • bestucan
                          bestucan 版主 副教授 last edited by

                          两个系统互相读文件就两种错误。

                          • 换行ASCII码不一样,windows系统用“回车”+“换行”表示光标到下一行首部。linux和mac,一个用“回车”,一个用“换行”,表示光标到下一行首部。(忘了哪个用回车那个用换行了)
                            所以linux的文件在windows里是一整行,不会换行。windows的文件在linux能换行,每行末会多个ASCII码。

                          • 编码不一样,一般linux默认utf8编码,windows默认gbk编码。所以互相读取会有乱码。

                          比较专业的编辑器应该都能解决这俩个问题。我用的emacs。

                          • revert-buffer-with-coding-system 能用任意编码换行格式显示文件
                            0_1515151005149_linux.png

                          • universal-coding-system-argument 能用任意编码换行格式储存文件
                            0_1515151017442_linux2.png

                          那个文章里说不能在windows里编辑linux的文件,因为windows软件,比如记事本,的保存格式(换行ASCII码,文件结尾ASCII码之类的)不一样,在windows里用emacs编辑保存就没事。

                          详细配色可以在.bashrc里修改,不过太繁琐,用户名浅色,文件夹深色,所以,选个中间色当背景
                          0_1515151750116_Capture.PNG
                          screen text 第五种颜色(暗红),和debian的主题色挺接近
                          screen background 第八种颜色(浅灰)

                          对颜色没兴趣的可以mv ~/.bashrc ~/.bashrc_backup; touch ~/.bashrc.
                          再重新登录,所有的彩色都消失。不过要在新的bashrc里输入一些常用快捷命令alias ll='ls -alF'啥的。
                          或者到.bashrc里搜索color,带color的代码块都#注释掉。

                          --------------------------------------------------------分割线----------------------------------------------

                          那个错误前前后后看都是openmpi的问题。openfoam文件夹下的bashrc默认使用系统的openmpi。git源里指引的教程在编译完第三方软件后,要wmRefresh一下,更新环境变量就是哉source一次那个bashrc,指向如果有现编的用现编的第三方软件。

                          你的命令记录里应该是自己编译了openmpi的,可能中间缺个刷新环境变量的命令?
                          openfoam5挺新的刚发布。windows自带的ubuntu版本是14的,可能14版的源最新的openmpi对于openfoam5不够新。自己编译的又没用上,最后一条g++还在调用/usr/lib/openmpi

                          /usr/lib/openmpi/include/mpi.h:632:43: warning: use of old-style cast [-Wold-style-cast]

                          这不就是说系统的openmpi有点老么:confused: 然后后面就忽略忽略(IGNORE)的,略死了。。。我猜是这样:confused:

                          滚来滚去……~(~o ̄▽ ̄)~o 滚来滚去都不能让大家看出来我不是老师么 O_o

                          异步沟通方式(《posting style》from wiki)(下载后打开):
                          https://www.jianguoyun.com/p/Dc52X2sQsLv2BRiqnKYD
                          提问的智慧(github在gitee的镜像):
                          https://gitee.com/bestucan/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md

                          R 1 Reply Last reply Reply Quote
                          • 李东岳
                            李东岳 管理员 last edited by

                            @bestucan

                            专业,你主要用windows玩?我一直想换windows,但有些小细节总是不好处理,就比如那个界面颜色问题,按照网上说的颜色好了点,但是每次重新打开都要改字体。

                            你模拟什么的,气溶胶?aerosol?

                            CFD课程 改成线上了 http://dyfluid.com/class.html
                            CFD高性能服务器 http://dyfluid.com/servers.html

                            bestucan W 2 Replies Last reply Reply Quote
                            • bestucan
                              bestucan 版主 副教授 @李东岳 last edited by

                              @李东岳 控制理论与控制工程专业:lol: ,不过导师是流体力学方向的。主要用linux,因为大学就开始用linux做主力操作系统,同时又经常帮人处理windows问题,所以两个都挺熟悉。
                              刚研一,课业重,还没开始模拟:sad: ,openfoam就看了四五个自带算例视频。。。
                              气溶胶是我导师的实验室的名字。

                              那个字体,对窗口点右键,最下面是属性(properties),倒数第二个就是默认(defaults),属性只改当前的,把默认里的设置改了就行了。

                              滚来滚去……~(~o ̄▽ ̄)~o 滚来滚去都不能让大家看出来我不是老师么 O_o

                              异步沟通方式(《posting style》from wiki)(下载后打开):
                              https://www.jianguoyun.com/p/Dc52X2sQsLv2BRiqnKYD
                              提问的智慧(github在gitee的镜像):
                              https://gitee.com/bestucan/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md

                              李东岳 1 Reply Last reply Reply Quote
                              • W
                                wwzhao 教授 @李东岳 last edited by

                                @李东岳 在 在WSL里用源码包安装openfoam失败 中说:

                                每次重新打开都要改字体。

                                字体的问题。下载这个字体安装,然后把bash设为这个字体就好了。

                                1 Reply Last reply Reply Quote
                                • 李东岳
                                  李东岳 管理员 last edited by

                                  回国的时候,我彻底的用bash一个星期试试,看看能不能习惯。Windows怎么都拜托不了。虚拟机的话需要个大的SSD太贵。真系统的话还得装个Windows虚拟机。:big_mouth:

                                  CFD课程 改成线上了 http://dyfluid.com/class.html
                                  CFD高性能服务器 http://dyfluid.com/servers.html

                                  1 Reply Last reply Reply Quote
                                  • 李东岳
                                    李东岳 管理员 @bestucan last edited by

                                    @bestucan 在 在WSL里用源码包安装openfoam失败 中说:

                                    控制理论与控制工程专业 :lol:

                                    笑的很给力..

                                    CFD课程 改成线上了 http://dyfluid.com/class.html
                                    CFD高性能服务器 http://dyfluid.com/servers.html

                                    bestucan 1 Reply Last reply Reply Quote
                                    • bestucan
                                      bestucan 版主 副教授 @李东岳 last edited by

                                      @李东岳 笑自己,明明考的本专业,学起来比跨专业的都带劲,表情包没有笑哭的头像,差评:upset:

                                      滚来滚去……~(~o ̄▽ ̄)~o 滚来滚去都不能让大家看出来我不是老师么 O_o

                                      异步沟通方式(《posting style》from wiki)(下载后打开):
                                      https://www.jianguoyun.com/p/Dc52X2sQsLv2BRiqnKYD
                                      提问的智慧(github在gitee的镜像):
                                      https://gitee.com/bestucan/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md

                                      1 Reply Last reply Reply Quote
                                      • R
                                        random_ran 副教授 @bestucan last edited by

                                        @bestucan

                                        居然同时用 emacs 和 vim :angry: :angry: :angry: :angry:

                                        Yours in CFD,

                                        Ran

                                        bestucan 1 Reply Last reply Reply Quote
                                        • bestucan
                                          bestucan 版主 副教授 @random_ran last edited by

                                          @random_ran 生活所迫,生活所迫:sad: :sad: :sad: :sad:

                                          滚来滚去……~(~o ̄▽ ̄)~o 滚来滚去都不能让大家看出来我不是老师么 O_o

                                          异步沟通方式(《posting style》from wiki)(下载后打开):
                                          https://www.jianguoyun.com/p/Dc52X2sQsLv2BRiqnKYD
                                          提问的智慧(github在gitee的镜像):
                                          https://gitee.com/bestucan/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md

                                          R 1 Reply Last reply Reply Quote
                                          • 李东岳
                                            李东岳 管理员 last edited by 李东岳

                                            回国的时候,我彻底的用bash一个星期试试,看看能不能习惯。Windows怎么都拜托不了。虚拟机的话需要个大的SSD太贵。真系统的话还得装个Windows虚拟机。

                                            还是换回了虚拟机。bash用不习惯。买了个250的SSD,虽然还是觉得小,500GSSD有点贵了。

                                            另一种是装Ubuntu真系统,但是这个OFFICE一直用不了不知道咋处理,在国内OFFICE还是脱离不了啊。

                                            CFD课程 改成线上了 http://dyfluid.com/class.html
                                            CFD高性能服务器 http://dyfluid.com/servers.html

                                            bestucan 1 Reply Last reply Reply Quote
                                            • bestucan
                                              bestucan 版主 副教授 @李东岳 last edited by

                                              @李东岳 bash用不惯可以试试fish和zsh(oh-my-zsh)。我是在虚拟机(virtualbox)里装了个win7然后qq、office都在里面。linux的家目录挂载成win7的一个盘;用的机械硬盘,速度还是可以接受的。把不用的更新和服务、动画效果关了,还挺快。。。每次不用win了就保存虚拟机状态。再开连win的开机时间都省了,挺快的。

                                              还有一个好处,windows会越用越慢。装好windows、软件后把虚拟硬盘备份,系统慢了,把备份的硬盘拉回来覆盖一下,比ghost什么的的装系统快多了:sunglasses:
                                              0_1516690908269_zzz.png

                                              滚来滚去……~(~o ̄▽ ̄)~o 滚来滚去都不能让大家看出来我不是老师么 O_o

                                              异步沟通方式(《posting style》from wiki)(下载后打开):
                                              https://www.jianguoyun.com/p/Dc52X2sQsLv2BRiqnKYD
                                              提问的智慧(github在gitee的镜像):
                                              https://gitee.com/bestucan/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md

                                              1 Reply Last reply Reply Quote
                                              • R
                                                random_ran 副教授 @bestucan last edited by

                                                @bestucan

                                                @quotation
                                                People sometimes ask me if it is a sin in the Church of Emacs to use
                                                vi. Using a free version of vi is not a sin; it is a penance. So happy
                                                hacking.
                                                @author Richard Stallman
                                                @end quotation

                                                Yours in CFD,

                                                Ran

                                                1 Reply Last reply Reply Quote
                                                • First post
                                                  Last post

                                                CFD中文网 | 东岳流体 | 京ICP备15017992号-2