CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM News & Announcements > OpenFOAM Announcements from Other Sources

"Universal buildscript" based on Ansible

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 6 Post By gschaider

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 3, 2017, 12:15
Default "Universal buildscript" based on Ansible
  #1
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
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
elvis, wyldckat, Ohbuchi and 3 others like this.
__________________
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
gschaider is offline   Reply With Quote

Old   August 26, 2017, 10:03
Default
  #2
Senior Member
 
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17
markusrehm is on a distinguished road
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."
Best regards, Markus.
Attached Files
File Type: txt log.txt (57.8 KB, 2 views)
markusrehm is offline   Reply With Quote

Old   August 26, 2017, 14:07
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   August 28, 2017, 06:50
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by markusrehm View Post
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."
Best regards, Markus.
Hello Markus!

I started porting it to CentOS 6 already but it is currently not very high priority. There are two problems with CentOS6
  • The old (Python 2.6) Python version
  • The old compiler that doesn't compile OF 5.0 and 1706+
  • Installation of MPI is different on Centos 6 than 7 (see Brunos post).
To work around the old Python I currently run Ansible on a Centos7 machine and tell it to apply the Playbook on the target machine
Code:
ansible-playbook exampleConfigs/buildfoam.yml -i sampleConfigs/workstation010 -u root -k
(use your own inventory-file)
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
gschaider is offline   Reply With Quote

Old   September 1, 2017, 16:11
Default
  #5
Senior Member
 
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17
markusrehm is on a distinguished road
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
I also quickly appended the error from 1706 compilation. I will have a closer look when I find more time.

Best regards, Markus.
Attached Files
File Type: txt error_v1706.txt (4.2 KB, 1 views)
markusrehm is offline   Reply With Quote

Old   September 8, 2017, 07:23
Default
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by markusrehm View Post
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
I also quickly appended the error from 1706 compilation. I will have a closer look when I find more time.

Best regards, Markus.
Hello Markus!

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
gschaider is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 02:36
Pressure based vs density based solver newbie384 FLUENT 2 July 5, 2013 02:04
Strange residuals of the Density Based Solver Pat84 FLUENT 0 October 22, 2012 15:59
incorrect temperature in pressure based solution Kian FLUENT 1 July 6, 2009 05:59
Absorption coeff:Cell or domain based for boiler DEV FLUENT 1 October 1, 2008 06:57


All times are GMT -4. The time now is 12:31.