|
[Sponsors] |
May 3, 2017, 13:15 |
"Universal buildscript" based on Ansible
|
#1 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Wanted to draw you attention on my latest project: a "script" to compile OpenFOAM-variants on different Linux-versions. It makes sure that the required software is installed.
The script is implemented with Ansible a tool for automating adminsitrative tasks. Currently supported Foam-versions are OpenFOAM 4.1, OpenFOAM+ v1612 and Foam-extend 4.0 Implemented Linux-versions are Centos /, ArchLinux, Ubuntu 1604 and Fedora 25. For details see the project page https://sourceforge.net/p/openfoam-e...tree/README.md and the Wiki-page https://openfoamwiki.net/index.php/Installation/Ansible The project should be currently be considered in the Alpha-phase: it was only run on my machines, worked there but nobody else has tried it. So if you are new to OpenFOAM don't try it yet Feedback and contributions are welcome Have fun Bernhard Gschaider
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
August 26, 2017, 11:03 |
|
#2 |
Senior Member
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17 |
Hi Bernhard,
this is really a nice tool and application of it! I tried to modify it in order to make it work with CentOS6. I just copied all CentOS7 content. Do you know if any further modifications are necessary? I appended my error log. The first foam compilation that occurs is Code:
"/home/openfoam/OpenFOAM/OpenFOAM-4.1/etc/config.sh/mpi: Zeile 46: mpicc: Kommando nicht gefunden." |
|
August 26, 2017, 15:07 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answer @Markus: I haven't managed yet to study this installation mechanism that Bernhard created, but the error message that you're getting seems to be because the correct module was not loaded in time and/or because the environment isn't up-to-date yet (logout + login might be necessary).
However, check the step by step instructions for when doing the installation manually: https://openfoamwiki.net/index.php/I...HEL#CentOS_6.8 The trick used there for when the environment isn't ready yet (logout+login hasn't been done yet) is to run the following command (this is for 64-bit): Code:
module load openmpi-x86_64 || export PATH=$PATH:/usr/lib64/openmpi/bin
__________________
|
|
August 28, 2017, 07:50 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
I started porting it to CentOS 6 already but it is currently not very high priority. There are two problems with CentOS6
Code:
ansible-playbook exampleConfigs/buildfoam.yml -i sampleConfigs/workstation010 -u root -k For the compiler I make the script compile its own OF-compiler (Gcc 6.1) and use that. For OpenMPI I do the same Currently this only compiles OF 5.0. The problem with v1706+ is that the download of the tarball fails (seems that the Python 2.6 TLS-libraries have a problem). I pushed the branch to both repos: https://sourceforge.net/p/openfoam-e...tos6/%7E/tree/ and https://bitbucket.org/bgschaid/ansib...e/port/centos6 (pull requests are welcome on both) These are work-in-progress and I can't promise that the issue will be fixed this week (something like https://bitbucket.org/bgschaid/ansib...e/port/centos6 might fix the 1706+ problem. But I'd like to look at this more closely). Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
September 1, 2017, 17:11 |
|
#5 |
Senior Member
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17 |
Hi Bernhard,
it worked. I have to check more thoroughly but it seems that only 1606 and 1706 were not installed. Anyway, a really great tool that kept my poor i3-Notebook busy for days . However, I needed to do some changes. Not sure if this makes sense, but that's how it worked for me: Code:
hg clone https://bitbucket.org/bgschaid/ansiblefoaminstallation hg branch feature/port/centos6 sed 's:python2-pip:python-pip:' /home/openfoam/ansible_bb/ansiblefoaminstallation/roles/pyfoam/tasks/install_centos7.yml /home/openfoam/ansible_bb/ansiblefoaminstallation/roles/pyfoam/tasks/install_centos6.yml yum install glibc-devel*.i686 libgcc.i686 Best regards, Markus. |
|
September 8, 2017, 08:23 |
|
#6 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Thanks. Your changes are correct. I know because I did them indepently in changes that I hadn't pushed yet. Also your problem with 1706 is probably fixed. The problem is that the sources were untarred as root but then the openfoam-user could not write into the created directories I pushed the missing changes and merged them into the develop-branch Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 03:36 |
Pressure based vs density based solver | newbie384 | FLUENT | 2 | July 5, 2013 03:04 |
Strange residuals of the Density Based Solver | Pat84 | FLUENT | 0 | October 22, 2012 16:59 |
incorrect temperature in pressure based solution | Kian | FLUENT | 1 | July 6, 2009 06:59 |
Absorption coeff:Cell or domain based for boiler | DEV | FLUENT | 1 | October 1, 2008 07:57 |