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

[OpenFOAM.org] Build and install OpenFOAM Dev 64 bits

Register Blogs Community New Posts Updated Threads Search

Like Tree11Likes
  • 2 Post By echin
  • 2 Post By wyldckat
  • 3 Post By alexeym
  • 1 Post By wyldckat
  • 1 Post By echin
  • 1 Post By wyldckat
  • 1 Post By echin

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 16, 2015, 10:54
Default Build and install OpenFOAM Dev 64 bits
  #1
New Member
 
eric chin
Join Date: Nov 2014
Posts: 4
Rep Power: 12
echin is on a distinguished road
Hi

I downloaded OpenFOAM Dev from 'https://github.com/OpenFOAM/OpenFOAM-dev.git' and try to build 64 bits version of OpenFOAM.

I buld gcc 4.8.4, Boost 1.57.0, Binutils 2.25 , mp 5.1.2, mpfr 3.1.2 and mpc 1.0.1 and cmake 2.8.12.1 using instruction from http://openfoamwiki.net/index.php/In...CentOS_SL_RHEL. I set WM_LABEL_SIZE=64 in OpenFOAM/OpenFOAM-devetc/bashrc rather than using prefs.sh.

I get the following error when building OpenFOAM-dev 64 bits version:

Code:
.
.
Making dependency list for source file scotchDecomp.C
g++ -m64 -Dlinux64 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/cfd/apps/openmpi/openmpi-1.6.5/include -pthread -I/include -I/scratch/OpenFOAM/ThirdParty-dev/platforms/linux64Gcc48Int64/scotch_6.0.0/include -I/usr/include/scotch -I../decompositionMethods/lnInclude -IlnInclude -I. -I/scratch/OpenFOAM/OpenFOAM-dev/src/OpenFOAM/lnInclude -I/scratch/OpenFOAM/OpenFOAM-dev/src/OSspecific/POSIX/lnInclude   -fPIC -c scotchDecomp.C -o /scratch/OpenFOAM/OpenFOAM-dev/platforms/linux64Gcc48DPInt64Opt/src/parallel/decompose/scotchDecomp/scotchDecomp.o
scotchDecomp.C: In member function 'Foam::label Foam::scotchDecomp::decomposeOneProc(const Foam::fileName&, const Foam::List<long int>&, const Foam::List<long int>&, const scalarField&, Foam::List<long int>&)':
scotchDecomp.C:447:9: error: cannot convert 'Foam::UList<long int>::const_iterator {aka const long int*}' to 'const SCOTCH_Num* {aka const int*}' for argument '4' to 'int SCOTCH_graphBuild(SCOTCH_Graph*, SCOTCH_Num, SCOTCH_Num, const SCOTCH_Num*, const SCOTCH_Num*, const SCOTCH_Num*, const SCOTCH_Num*, SCOTCH_Num, const SCOTCH_Num*, const SCOTCH_Num*)'
         ),
         ^
scotchDecomp.C:477:79: error: cannot convert 'Foam::UList<long int>::iterator {aka long int*}' to 'const SCOTCH_Num* {aka const int*}' for argument '3' to 'int SCOTCH_archCmpltw(SCOTCH_Arch*, SCOTCH_Num, const SCOTCH_Num*)'
             SCOTCH_archCmpltw(&archdat, nProcessors_, processorWeights.begin()),
                                                                               ^
scotchDecomp.C:551:9: error: cannot convert 'Foam::UList<long int>::iterator {aka long int*}' to 'SCOTCH_Num* {aka int*}' for argument '4' to 'int SCOTCH_graphMap(SCOTCH_Graph*, const SCOTCH_Arch*, SCOTCH_Strat*, SCOTCH_Num*)'
         ),
         ^
make: *** [/scratch/OpenFOAM/OpenFOAM-dev/platforms/linux64Gcc48DPInt64Opt/src/parallel/decompose/scotchDecomp/scotchDecomp.o] Error 1


Building the 32 bits version was sucessfull without making changes other than by setting 'WM_LABEL_SIZE=32' in OpenFOAM/OpenFOAM-devetc/bashrc

Any idea what might be the problem and is there a patch available to fix OpenFOAM/OpenFOAM-dev/src/parallel/decompose/scotchDecomp/scotchDecomp.C ?

Any pointer appreciated.

Thank you

Eric
Saeng Kinley and Democritus like this.

Last edited by wyldckat; February 16, 2015 at 14:16. Reason: Added [CODE][/CODE]
echin is offline   Reply With Quote

Old   February 16, 2015, 14:22
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Greetings Eric,

Which specific Linux distribution and version are you using?

I ask this because I have both 32 and 64 Integer builds (both 64-bit Double Precision) successfully built on Ubuntu 12.04, and I didn't need any modifications to "Scotch" nor "scotchDecomp".

In addition, why didn't you guide yourself by the instructions for OpenFOAM 2.3.1? Namely these: http://openfoamwiki.net/index.php/In...CentOS_SL_RHEL

Best regards,
Bruno
Saeng Kinley and Democritus like this.
__________________
wyldckat is offline   Reply With Quote

Old   February 16, 2015, 14:59
Default
  #3
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

I guess it is a feature of -dev version:

Code:
#if WM_LABEL_SIZE == 32
const char* const Foam::pTraits<int64_t>::typeName = "int64";
const char* const Foam::pTraits<int32_t>::typeName = "label";
#elif WM_LABEL_SIZE == 64
const char* const Foam::pTraits<int64_t>::typeName = "label";
const char* const Foam::pTraits<int32_t>::typeName = "int32";
#endif
(in 2.3.0 and 2.3.1 label.H is different).

So after setting WM_LABEL_SIZE to 64, label becomes int64_t or long int while SCOTCH_Num rests int. And all List<label> which were passed to Scotch calls as lst.begin() fail to compile.

But as it is Git version, guess it will be fixed.
alexeym is offline   Reply With Quote

Old   February 17, 2015, 12:12
Default
  #4
New Member
 
eric chin
Join Date: Nov 2014
Posts: 4
Rep Power: 12
echin is on a distinguished road
Hi Bruno,

Thanks for the reply. I build OpenFOAM-dev on CentOS 6.5 (2.6.32-431.el6.x86_64). I have build OpenFOAM 2.3.1 successfully on CentOS 6.5 and CentOS 7 using the instruction link mentioned.

I also did a quick test build with OpenFOAM-dev on CentOS 7.0 (3.10.0-123.13.1.el7.x86_64), I get the same error "
scotchDecomp.C:447:9: error: cannot convert 'Foam::UList<long int>::const_iterator {aka const long int*}' to 'const SCOTCH_Num* {aka const int*}' for argument '4' to 'int SCOTCH_graphBuild(SCOTCH_Graph*, SCOTCH_Num, SCOTCH_Num, const SCOTCH_Num*, const SCOTCH_Num*, const SCOTCH_Num*, const SCOTCH_Num*, SCOTCH_Num, const SCOTCH_Num*, const SCOTCH_Num*)'
)

Reading through the instruction from http://openfoamwiki.net/index.php/In...CentOS_SL_RHEL, I pretty much do the exact steps apart from using newer boost (1.57.0) and binutils (2.25) packages.


Thank you

Eric
echin is offline   Reply With Quote

Old   February 17, 2015, 17:01
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Hi Eric,

Sorry, I completely forgot that this didn't work for me either on Ubuntu. Nonetheless, the feature of "stop on first error" is something new to "OpenFOAM-dev". You can bypass this by running Allwmake like this:
Code:
./Allwmake -k
And if you want to compile/build with the full power of your workstation (i.e. multi-core):
Code:
./Allwmake -k -j
As for the issue with Scotch, it was reported back by Henry himself when he was implementing this new feature: http://www.openfoam.org/mantisbt/view.php?id=1472#c3420 - but I think he accidentally switched the names "scotch" and "CGAL" on that comment.

Best regards,
Bruno
Democritus likes this.
__________________
wyldckat is offline   Reply With Quote

Old   February 18, 2015, 10:26
Default
  #6
New Member
 
eric chin
Join Date: Nov 2014
Posts: 4
Rep Power: 12
echin is on a distinguished road
Hi Bruno,

Thanks for the tips. Able to build OpenFOAM-dev 64 bits with the '-k' flag .

Thanks for your help

Thank you

Eric
Democritus likes this.
echin is offline   Reply With Quote

Old   February 18, 2015, 16:08
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
Greetings Eric,

I've finally put "two and two together", based on this bug report: http://www.openfoam.org/mantisbt/view.php?id=1537 - which essentially reports the same issue.
My problem was that I used the tarball from "ThirdParty-2.3.1" and completely forgot that the repository "ThirdParty-dev" even existed: https://github.com/OpenFOAM/ThirdParty-dev/

If somehow you did something similar to me, then I suggest you do the following commands:
Code:
cd $WM_PROJECT_DIR/..
git clone https://github.com/OpenFOAM/ThirdParty-dev.git ThirdParty-dev_git

rsync -a ThirdParty-dev_git/ ThirdParty-dev/
cd ThirdParty-dev/

ls -l $FOAM_EXT_LIBBIN
rm -r $FOAM_EXT_LIBBIN

./Allwmake > log.make 2>&1
Then check the contents of the file "log.make". You should find there several occurrences of what Henry stated that should appear, namely "-DINTSIZE64".

Note: the rsync command will ensure that everything that is needed is properly copied to the current 3rd party folder.

If all went well, then run:
Code:
foam
./Allwmake -j > log.make 2>&1
Hopefully it will now be able to successfully build the "scotchDecomp" libraries with 64-bit integers.

Best regards,
Bruno
Democritus likes this.
__________________
wyldckat is offline   Reply With Quote

Old   February 19, 2015, 13:17
Default
  #8
New Member
 
eric chin
Join Date: Nov 2014
Posts: 4
Rep Power: 12
echin is on a distinguished road
Hi Bruno,

Thanks for the pointer and info.

I indeed use ThirdParty-2.3.1 tarball rather than "ThirdParty-dev". With your instruction, building "scotchDecomp" was successful.

Thanks for your help.

Thank you

Eric
wyldckat likes this.
echin is offline   Reply With Quote

Old   June 24, 2016, 04:54
Default
  #9
New Member
 
Democritus's Avatar
 
Xiaoqiu HE
Join Date: Mar 2016
Location: Wuhan, China
Posts: 29
Rep Power: 10
Democritus is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings Eric,

I've finally put "two and two together", based on this bug report: http://www.openfoam.org/mantisbt/view.php?id=1537 - which essentially reports the same issue.
My problem was that I used the tarball from "ThirdParty-2.3.1" and completely forgot that the repository "ThirdParty-dev" even existed: https://github.com/OpenFOAM/ThirdParty-dev/

If somehow you did something similar to me, then I suggest you do the following commands:
Code:
cd $WM_PROJECT_DIR/..
git clone https://github.com/OpenFOAM/ThirdParty-dev.git ThirdParty-dev_git

rsync -a ThirdParty-dev_git/ ThirdParty-dev/
cd ThirdParty-dev/

ls -l $FOAM_EXT_LIBBIN
rm -r $FOAM_EXT_LIBBIN

./Allwmake > log.make 2>&1
Then check the contents of the file "log.make". You should find there several occurrences of what Henry stated that should appear, namely "-DINTSIZE64".

Note: the rsync command will ensure that everything that is needed is properly copied to the current 3rd party folder.

If all went well, then run:
Code:
foam
./Allwmake -j > log.make 2>&1
Hopefully it will now be able to successfully build the "scotchDecomp" libraries with 64-bit integers.

Best regards,
Bruno
Dear wyldckat,

When I tried to compile OF 3.0.x with $WM_LABEL_SIZE of 64bit. I met the same problem.
I have followed your way to compile the scotch tool. But I failed, the situation is a little different.:

My operation system is Ubuntu 16.04 LTS. In the Third-Party-3.0.x file folder I download scotch 6.0.4 source code and put it in file folder of name "scotch_6.0.3". I did that because I want to use new version of scotch (I can give up this demand). When I run ./Allmake in Third-Party-3.0.x folder, I got the -DINTSIZE64.
But when I run ./Allmake in folder OpenFOAM-3.0.x, I failed to getr -DINTSIZE64
Can you help me?
Thanks very much!

Update~!
I have sucessful compile the scotch as I use scotch 6.0.3 source code.
It seems that I shouldn't modify the installation steps.
Thanks you wyldckat!

Last edited by Democritus; June 24, 2016 at 05:00. Reason: Update the situation
Democritus 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
SU2 Parallel Build Install Issue jclegg SU2 4 October 20, 2020 05:28
[OpenFOAM.org] Trying to build and install OpenFOAM 2.4.0 on Lubuntu 14.04 ARM7 Hemanth OpenFOAM Installation 25 November 9, 2015 05:43
Install openFOAM from with proxy server Dhruval OpenFOAM Installation 3 October 18, 2014 16:38
How to Install OpenFOAM on 64 Ubuntu 9.04 hansel OpenFOAM Installation 62 March 19, 2010 15:43
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07


All times are GMT -4. The time now is 19:34.