CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] Cannot build swak4Foam with OpenFOAM-dev

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By pbachant
  • 1 Post By pbachant

Reply
 
LinkBack Thread Tools Display Modes
Old   February 8, 2016, 00:10
Default Cannot build swak4Foam with OpenFOAM-dev
  #1
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: NH, USA
Posts: 169
Rep Power: 7
pbachant is on a distinguished road
I was able to build for OpenFOAM-3.0.x a while back, but now it's failing with commit 23bcea0299 of dev. I have tried the master and port_of-dev branches of the swak repo to no avail. Are swak and dev incompatible?

Here's the error message I'm getting:

Code:
In file included from /home/pete/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/typeInfo.H:57:0,
                 from /home/pete/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/token.H:46,
                 from /home/pete/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/UListIO.C:28,
                 from /home/pete/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/UList.C:225,
                 from /home/pete/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/UList.H:462,
                 from /home/pete/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/List.H:43,
                 from /home/pete/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/labelList.H:48,
                 from /home/pete/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/UPstream.H:42,
                 from /home/pete/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/Pstream.H:42,
                 from lnInclude/DebugOStream.H:55,
                 from lnInclude/swak.H:333,
                 from makeSwakDataEntry.C:34:
/home/pete/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude/DataEntry.H:192:59: error: expected initializer before ‘<’ token
     defineNamedTemplateTypeNameAndDebug(DataEntryTypes::SS<Type>, 0);
Full log: https://gist.github.com/petebachant/...53168f8de43224
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   February 15, 2016, 18:38
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quick answer: OpenFOAM-dev is the bleeding-edge of the OpenFOAM development line.

If I remember correctly, about a week ago, "DataEntry" was renamed to "Function1something" in OpenFOAM-dev, so that it could contemplate other generic data types that are 1 argument input data types and give way for future 2 or more input data types.
Since it was done around a week ago, it's only natural that the swak4Foam development line isn't updated yet

May I suggest that since (if I remember correctly) you already have some experience with Travis-CI and if you want to contribute to swak4Foam, an automated reporting mechanism would come in handy for swak4Foam and other similar projects for keeping on-par to when they break building whenever OpenFOAM-dev gets such a similar upgrade!
__________________

Last edited by wyldckat; February 21, 2016 at 16:51. Reason: DataType -> DataEntry
wyldckat is offline   Reply With Quote

Old   February 15, 2016, 18:47
Default
  #3
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: NH, USA
Posts: 169
Rep Power: 7
pbachant is on a distinguished road
I figured it was something like that. I have a little experience with Travis CI. I believe it requires the project be on GitHub. Would it be advisable to submit a PR to the mirror at https://github.com/Unofficial-Extend...swak4Foam-dev?
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   February 15, 2016, 19:40
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quote:
Originally Posted by pbachant View Post
Would it be advisable to submit a PR to the mirror at https://github.com/Unofficial-Extend...swak4Foam-dev?
Quick answer: I believe that I can then convert the pull request into a Mercurial bundle package, at the very least manually and then submit it through swak4Foam's bug tracker.
wyldckat is offline   Reply With Quote

Old   February 16, 2016, 08:35
Default
  #5
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: NH, USA
Posts: 169
Rep Power: 7
pbachant is on a distinguished road
Oh, I meant to setup Travis. I guess there would be no harm in having a .travis.yml file back in the Mercurial repo on Sourceforge (?). If the mirror on GitHub is pushed to just as often, it can be cloned from there.
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   February 21, 2016, 13:49
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Oh, now I get it!
Well... the mirror system currently in place is a bit wonky, because the Mercurial-to-Git extension that is currently being used isn't 100% full-proof, since Mercurial sometimes lets some neat features to occur, which are not translated directly to Git by the extension.
And the mirror is using tiny VMs on OpenShift, which have to be manually woken up once in a while... therefore, if it's not awake, it won't mirror .

However, SourceForge.net does support webhooks: https://forge-allura.apache.org/p/allura/wiki/Webhooks/
wyldckat is offline   Reply With Quote

Old   February 21, 2016, 14:24
Default
  #7
Member
 
Ruggero Poletto
Join Date: Nov 2013
Posts: 33
Rep Power: 6
rupole1185 is on a distinguished road
I am interested into the same thing as well ... Did you manage to install swak4foam on the dev version? What did you change and have you commit it to some repo?
__________________
___________________________

President of CONSELF, the new CFD company with a great cloud solution. Try for free it here!
rupole1185 is offline   Reply With Quote

Old   February 21, 2016, 20:52
Default
  #8
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: NH, USA
Posts: 169
Rep Power: 7
pbachant is on a distinguished road
So... I think setting up Travis for swak would be a lot easier if there were nightly deb pack builds of OF-dev. I am working on getting Travis to build OF-dev right now. Is there a recipe for building a deb pack?
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   February 22, 2016, 12:56
Default
  #9
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: NH, USA
Posts: 169
Rep Power: 7
pbachant is on a distinguished road
I started playing a bit with Travis for checking swak can build with OF-dev, but for some reason, it can't find the Pstream.H file. Any idea why this is happening?

Full log: https://travis-ci.org/petebachant/op...ilds/110993952
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   February 27, 2016, 11:11
Default
  #10
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quick answers:
Quote:
Originally Posted by rupole1185 View Post
I am interested into the same thing as well ... Did you manage to install swak4foam on the dev version? What did you change and have you commit it to some repo?
OpenFOAM-dev is undergoing a ton of changes in the past few weeks. Syncing swk4Foam with the latest changes will likely only be done when OpenFOAM-dev stabilizes for at least 1 or 2 weeks, otherwise it might build today and break tomorrow

Quote:
Originally Posted by pbachant View Post
So... I think setting up Travis for swak would be a lot easier if there were nightly deb pack builds of OF-dev. I am working on getting Travis to build OF-dev right now. Is there a recipe for building a deb pack?
Deb pack specs are not yet publicly available. There's a bug report where the team told us that the Deb specs weren't in a state that could be mad public.
It's easier if you do a local build, tarball it, upload to your own fork on a tag-release as a binary package and then download and unpack it from the Travis bot.

Quote:
Originally Posted by pbachant View Post
I started playing a bit with Travis for checking swak can build with OF-dev, but for some reason, it can't find the Pstream.H file. Any idea why this is happening?

Full log: https://travis-ci.org/petebachant/op...ilds/110993952
Several issues, but according to the logs on builds #5 and #6, you did source the shell script for loading the OpenFOAM environment, but you didn't run "Allwmake -j" afterwards. Therefore, there is no OpenFOAM built for swak4Foam to link to.

OK, Travis-CI has Ubuntu 12.04 as production default and Ubuntu 14.04 as beta. I'll try to build OpenFOAM-dev on a VM (or maybe in Docker) with 14.04 and then I'll upload the build snapshot, so you can use it as well.
__________________
wyldckat is offline   Reply With Quote

Old   February 27, 2016, 11:13
Default
  #11
Member
 
Ruggero Poletto
Join Date: Nov 2013
Posts: 33
Rep Power: 6
rupole1185 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answers:

OpenFOAM-dev is undergoing a ton of changes in the past few weeks. Syncing swk4Foam with the latest changes will likely only be done when OpenFOAM-dev stabilizes for at least 1 or 2 weeks, otherwise it might build today and break tomorrow


Deb pack specs are not yet publicly available. There's a bug report where the team told us that the Deb specs weren't in a state that could be mad public.
It's easier if you do a local build, tarball it, upload to your own fork on a tag-release as a binary package and then download and unpack it from the Travis bot.


Several issues, but according to the logs on builds #5 and #6, you did source the shell script for loading the OpenFOAM environment, but you didn't run "Allwmake -j" afterwards. Therefore, there is no OpenFOAM built for swak4Foam to link to.

OK, Travis-CI has Ubuntu 12.04 as production default and Ubuntu 14.04 as beta. I'll try to build OpenFOAM-dev on a VM (or maybe in Docker) with 14.04 and then I'll upload the build snapshot, so you can use it as well.

Ok. Please keep me up to date please.

All the best
rupole1185 is offline   Reply With Quote

Old   February 27, 2016, 16:34
Default
  #12
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: NH, USA
Posts: 169
Rep Power: 7
pbachant is on a distinguished road
I was able to at least setup Travis to try building OpenFOAM-dev, but it just takes too long. Do you know off-hand which parts I could build for a barebones check of swak compatibility, or a smart way to split OpenFOAM's Allwmake script into smaller jobs?
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   February 27, 2016, 18:29
Default
  #13
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quote:
Originally Posted by pbachant View Post
I was able to at least setup Travis to try building OpenFOAM-dev, but it just takes too long. Do you know off-hand which parts I could build for a barebones check of swak compatibility, or a smart way to split OpenFOAM's Allwmake script into smaller jobs?
This is not an easy feat. swak4Foam is hooked up to a lot of features in OpenFOAM. The simplest would be to only build the libraries in "src", by running something like this:
Code:
(cd wmake/src && make)
src/Allwmake -j 2 > log.make.src 2>&1
But it will still take a ton of time to build.


But worry not, I've got the first (complete) build up, although it's only 64-bit + Double Precision + 32-bit labels (integers) (and no ParaView ):
To use them, after you do this:
Code:
git clone https://github.com/OpenFOAM/OpenFOAM-dev.git
git clone https://github.com/OpenFOAM/ThirdParty-dev.git
you then do something like this (please get the actual links from the ):
Code:
wget https://....../OpenFOAM-dev.linux64GccDPInt32Opt_2016-02-27.tbz
wget https://....../ThirdParty-dev.linux64GccDPInt32Opt_2016-02-27.tbz

tar -xf OpenFOAM-dev.linux64GccDPInt32Opt_2016-02-27.tbz
tar -xf ThirdParty-dev.linux64GccDPInt32Opt_2016-02-27.tbz
Note: If the "-xf" option doesn't work, try "-xjf", since it's compressed with bzip2.

Then use the source command:
Code:
source $HOME/OpenFOAM/OpenFOAM-dev/etc/bashrc
Et voilà, instant OpenFOAM-dev installation ready to go.


But keep in mind that this is built with Ubuntu 14.04.4... which I certainly hope this will work with Travis-CI's "Ubuntu 14.04.3 LTS" that the log states in your builds that it's using.


By the way, the steps I used in Docker are here: https://github.com/wyldckat/wyldckat...cker-on-Ubuntu


If we can get prove this concept, then we can later streamline the build system. By the way, the build with 64-bit labels will be up possibly only tomorrow morning... with any luck.
wyldckat is offline   Reply With Quote

Old   February 27, 2016, 19:11
Default
  #14
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: NH, USA
Posts: 169
Rep Power: 7
pbachant is on a distinguished road
I am getting the same error now actually, and I have even tested with `icoFoam -help` that OpenFOAM is installed correctly. It still can't find "Pstream.H":

https://travis-ci.org/petebachant/op...12319371#L3016
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   February 27, 2016, 19:32
Default
  #15
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Sorry about that .
There is one very important command missing for rebuilding all of the "lnInclude" folders, which are not packaged into the binary packages:
Code:
wmakeLnIncludeAll
So I would suggest adding after the source command doing the following steps:
Code:
cd OpenFOAM-dev
wmakeLnIncludeAll
Then, proceed as you have so far.

Hopefully I didn't miss anything else.
wyldckat is offline   Reply With Quote

Old   February 27, 2016, 20:42
Default
  #16
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: NH, USA
Posts: 169
Rep Power: 7
pbachant is on a distinguished road
Alright! The requirements can build now. Is there a plan for automatically building OpenFOAM-dev/ThirdParty-dev so those binaries can stay up to date?
wyldckat likes this.
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   February 27, 2016, 22:18
Default
  #17
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Hi Pete,

Quote:
Originally Posted by pbachant View Post
Nice! Congrats! Great work on this!

Quote:
Originally Posted by pbachant View Post
Is there a plan for automatically building OpenFOAM-dev/ThirdParty-dev so those binaries can stay up to date?
Well, the next step is to first get swak4Foam getting built properly with the latest OpenFOAM-dev commits.

The latest issue for swak4Foam to build is related to the revamp recently made by Henry Weller to the "tmp" class, which has now been made a lot more consistent on object accesses by reference.
The downside is that it's going to be a bit annoying to provide yet another compatibility layer to swak4Foam The most likely scenario is to use a template wrapper class that reproduces the OpenFOAM-dev format into the older OpenFOAM versions/forks. I still believe that something akin to Python Six will have to be created to make it easier to compensate for all of these changes throughout all versions and forks... given that more projects are coming forward that have compatibility issues between versions/forks

Anyway, after the issues are resolved, there are a few details that need to be taken care of:
  1. Will the build system be possible using an online machine, which can deliver timely builds?
    • One possibility is to piggyback on Launchpad's facilities, but that still requires creating a proper Debian spec folder.
    • Another is relying on Travis-CI, but it would probably take a few days for it to manage to finish each build... which isn't entirely bad, but a bit annoying if the continuous-integration loop is meant to have a diagnosis on all covered projects within 12-24h or so...
    • The other possibility is to get the OpenFOAM Foundation some funding to get this system going...
  2. Still need to check if it's possible to use Github's API for automatic uploads of builds.
  3. Should a single tag be used for these builds? And/or should new tags be created and then gradually kill off outdated tags?
  4. Last but not least, then we will have to hook up the uploaded builds into automatically triggering the swak4Foam-dev builds onto Travis-CI as well.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 28, 2016, 00:24
Default
  #18
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: NH, USA
Posts: 169
Rep Power: 7
pbachant is on a distinguished road
If swak is to be compatible with every version/fork of OpenFOAM, including old versions, that will be quite the build matrix. Building against older versions with deb packs should be pretty straightforward though.
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   February 28, 2016, 01:19
Default
  #19
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: NH, USA
Posts: 169
Rep Power: 7
pbachant is on a distinguished road
A little more progress... I setup the build matrix to compile against OpenFOAM 3.0 as well, which passes: https://travis-ci.org/petebachant/op...ilds/112353517
wyldckat likes this.
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   March 6, 2016, 11:16
Default
  #20
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quote:
Originally Posted by pbachant View Post
If swak is to be compatible with every version/fork of OpenFOAM, including old versions, that will be quite the build matrix. Building against older versions with deb packs should be pretty straightforward though.
We're limited on how far we can get with OpenFOAM versions, given that OpenFOAM deb packages are only supported for a few specific Ubuntu versions and the open-source Travis CI service seems to be for a single Ubuntu version. But I guess that having a proof of concept for OpenFOAM 3.0 is a good start.

Quote:
Originally Posted by pbachant View Post
A little more progress... I setup the build matrix to compile against OpenFOAM 3.0 as well, which passes: https://travis-ci.org/petebachant/op...ilds/112353517
This is great! There is a way to have a quick and dirty way of creating a Debian folder for making builds of OpenFOAM on Launchpad that would be similar to those done by the OpenFOAM Foundation, but I don't want to go in head first and risk breaking the Ubuntu-play-nice-agreement on Launchpad, given that placing everything on a single folder at "/opt" isn't the Debian-way of making things happen.

My advice: Document what you've done so far, at least on your wiki and we can get back to this once other higher/critical priority tasks are out of the way

In the meantime, OpenFOAM-dev is going through a lot of internal changes and syncing swak4Foam-dev right now to it as well can be a bit... distressing
wyldckat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 79 January 22, 2018 21:57
OpenFOAM build on Intel Xeon Phi asaijo OpenFOAM Installation 31 July 26, 2017 10:35
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 9 March 30, 2017 05:19
OpenFoam 1.6-ext - RPM build errors preibie OpenFOAM 12 September 8, 2011 03:12
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21


All times are GMT -4. The time now is 09:50.