{"id":135,"date":"2022-07-12T20:38:51","date_gmt":"2022-07-12T15:08:51","guid":{"rendered":"https:\/\/varuna.aero.iitb.ac.in\/ace\/?p=135"},"modified":"2022-09-18T11:27:10","modified_gmt":"2022-09-18T05:57:10","slug":"openfoam-v2112-compilation-from-source-code","status":"publish","type":"post","link":"https:\/\/varuna.aero.iitb.ac.in\/ace\/index.php\/2022\/07\/12\/openfoam-v2112-compilation-from-source-code\/","title":{"rendered":"OpenFoam v2112 compilation from source code."},"content":{"rendered":"\n<p class=\"has-black-color has-text-color\" style=\"font-size:16px\">OpenFoam v2112 compilation on CentOs7. We have tested with gcc7 and openmpi 4+ . We have not tested paraview with this version.<br>Please note, Infiniband network in SOUMYA does not support openmpi greater than version 2.<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:16px\"><code>1. #OpenFOAM downloading and installation\ncd ~\nmkdir OpenFOAM\ncd OpenFOAM\nwget -O - ftp:\/\/ftp.aero.iitb.ac.in\/ace\/openfoam\/OpenFOAM-v2112.tgz | tar -xvz\nwget -O - ftp:\/\/ftp.aero.iitb.ac.in\/ace\/openfoam\/ThirdParty-v2112.tgz | tar -xvz\n\n\n2. #Add source paths in your bashrc before proceeding with the installation , add in the end of the bashrc file -\n\nvi ~\/.bashrc\n\n#openfoam2112\nsource \/opt\/rh\/python27\/enable\nsource \/opt\/rh\/devtoolset-7\/enable\nsource $HOME\/OpenFOAM\/OpenFOAM-v2112\/etc\/bashrc\n\n3. #Source your bashrc\nsource ~\/.bashrc\n\n4. #OpenMPI Version 4.1.4 is the latest version supported by cluster SOUMYA. Download and extract from here <a rel=\"noreferrer noopener\" href=\"https:\/\/www.open-mpi.org\/software\/ompi\/v4.1\/\" target=\"_blank\">OpenMPI<\/a> (Download File tar.gz - openmpi-4.1.4.tar.gz)\n\nwget https:\/\/download.open-mpi.org\/release\/open-mpi\/v4.1\/openmpi-4.1.4.tar.gz\ntar -xvf openmpi-4.1.4.tar.gz\n\n5. Run the command \".\/configure\" in the openmpi folder and run \"make all install\" after the configuration. This will enable the openmpi and certainly will add the mpicc command.\n\n.\/configure --prefix=$HOME\/OpenFOAM\/openmpi-4.1.4\nmake all install\n\nAfter it's compiled, add it in your bashrc and source it, to override system openmpi -\n\nexport PATH=$HOME\/OpenFOAM\/openmpi-4.1.4\/bin:$PATH\nsource ~\/.bashrc\n\n7. We can now start to install OpenFoam now. Navigate to OpenFoam directory\n\ncd ..\/OpenFOAM-v2112\n\n8. Run the command \"export WM_NCOMPPROCS=ncpus\" for multithreading compilation. Below command will set 16 Cores\nexport WM_NCOMPPROCS=16\n\n9. Start installation\n.\/Allwmake -j \n\nYou can run it again just to verify -\n.\/Allwmake -j \n\n10. If it is compiled without any errors, then it is done. You can check \nicoFoam -help<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>OpenFoam v2112 compilation on CentOs7. We have tested with gcc7 and openmpi 4+ . We have not tested paraview with this version.Please note, Infiniband network in SOUMYA does not support openmpi greater than version 2.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[1],"tags":[19,18,4],"class_list":["post-135","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-cfd","tag-ofv2112","tag-openfoam"],"_links":{"self":[{"href":"https:\/\/varuna.aero.iitb.ac.in\/ace\/index.php\/wp-json\/wp\/v2\/posts\/135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/varuna.aero.iitb.ac.in\/ace\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/varuna.aero.iitb.ac.in\/ace\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/varuna.aero.iitb.ac.in\/ace\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/varuna.aero.iitb.ac.in\/ace\/index.php\/wp-json\/wp\/v2\/comments?post=135"}],"version-history":[{"count":9,"href":"https:\/\/varuna.aero.iitb.ac.in\/ace\/index.php\/wp-json\/wp\/v2\/posts\/135\/revisions"}],"predecessor-version":[{"id":256,"href":"https:\/\/varuna.aero.iitb.ac.in\/ace\/index.php\/wp-json\/wp\/v2\/posts\/135\/revisions\/256"}],"wp:attachment":[{"href":"https:\/\/varuna.aero.iitb.ac.in\/ace\/index.php\/wp-json\/wp\/v2\/media?parent=135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/varuna.aero.iitb.ac.in\/ace\/index.php\/wp-json\/wp\/v2\/categories?post=135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/varuna.aero.iitb.ac.in\/ace\/index.php\/wp-json\/wp\/v2\/tags?post=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}