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

[OpenFOAM.org] How to avoid using ThirdParty directory?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 6, 2018, 12:39
Default How to avoid using ThirdParty directory?
  #1
New Member
 
Join Date: Aug 2018
Posts: 2
Rep Power: 0
jamanfred is on a distinguished road
I'm using Fedora 28 and would like to compile OpenFOAM from source. While following the instructions on the OpenFOAM website, I realized that the software provided in the ThirdParty repository were provided as packages in the Fedora repositories.

I'd like to use these packages with OpenFOAM, but the compilation fails at
Code:
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3  -DNoRepository -ftemplate-depth-100 -DOMPI_SKIP_MPICXX -I/usr/include/openmpi-x86_64 -pthread -I.../OpenFOAM-6/src/Pstream/mpi/lnInclude -I.../ThirdParty-6/platforms/linux64GccDPInt32/scotch_6.0.3/include/openmpi-system -I.../ThirdParty-6/platforms/linux64GccDPInt32/scotch_6.0.3/include -I/usr/include/scotch -I../decompositionMethods/lnInclude -IlnInclude -I. -I.../OpenFOAM-6/src/OpenFOAM/lnInclude -I.../OpenFOAM-6/src/OSspecific/POSIX/lnInclude   -fPIC -shared -Xlinker --add-needed -Xlinker --no-as-needed .../OpenFOAM-6/platforms/linux64GccDPInt32OptSYSTEMOPENMPI/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.o -L.../OpenFOAM-6/platforms/linux64GccDPInt32OptSYSTEMOPENMPI/lib \
    -L.../ThirdParty-6/platforms/linux64GccDPInt32/scotch_6.0.3/lib -L.../ThirdParty-6/platforms/linux64GccDPInt32/lib/openmpi-system -lptscotch -lptscotcherrexit -lscotch -lrt  -o .../OpenFOAM-6/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libptscotchDecomp.so
/usr/bin/ld: cannot find -lptscotch
/usr/bin/ld: cannot find -lptscotcherrexit
collect2: error: ld returned 1 exit status
make: *** [.../OpenFOAM-6/wmake/makefiles/general:169: .../OpenFOAM-6/platforms/linux64GccDPInt32Opt/lib/openmpi-system/libptscotchDecomp.so] Error 1
where ... is my general git repo directory ~/repos/ and I have modified my .bashrc accordingly.

How can I stop the make script from trying to use the ThirdParty directory over system packages?
jamanfred is offline   Reply With Quote

Old   August 17, 2018, 15:16
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
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: There are several ways to compile Scotch and some of them are not compatible with the default build options in OpenFOAM.
I haven't checked Fedora 28, but sometime ago there was a report on how to make OpenFOAM more permissive regarding which Scotch build it is using: https://bugs.openfoam.org/view.php?id=2330 - however, the the core of the feature for allowing any Scotch build was not accepted.


That said, if you can figure out which Integer/FloatingPoint combo Scotch in Fedora 28 is using, you can configure the file "OpenFOAM-6/etc/config.sh/scotch" and then use:
  1. The respective 32 or 64 "WM_LABEL_SIZE" value in "OpenFOAM-6/etc/bashrc" for the 32 or 64 bit integer mode in Scotch.
  2. Use DP or SP in "WM_PRECISION_OPTION".
However, I don't know if Fedora 28 provides the development package for ParaView, without which you will not be able to build the ".OpenFOAM" file/case reader for ParaView.
__________________
wyldckat is offline   Reply With Quote

Old   August 19, 2018, 01:58
Default
  #3
New Member
 
Join Date: Aug 2018
Posts: 2
Rep Power: 0
jamanfred is on a distinguished road
Fedora does include a paraview-devel package, so I don't think that'll be a problem.

As for Scotch, I'm not sure how to find out what combination of bit representations it's using. The only hint I can find is in the Scotch header file. Maybe this part is relevant?

Code:
/*+ Integer type. +*/

typedef int64_t SCOTCH_Idx;

typedef int SCOTCH_Num;
Everything else declared in the Scotch header files (scotch and ptscotch) is of the following types:
int and void (for C headers)
double (for C opaque objects)
INTEGER (for Fortran headers)

Is this the correct way to go about finding this information?
jamanfred is offline   Reply With Quote

Old   August 20, 2018, 15:15
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
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 answers:

Quote:
Originally Posted by jamanfred View Post
Fedora does include a paraview-devel package, so I don't think that'll be a problem.
Nice! I'll have to look into that!


I haven't tried that, but in principle it's just a matter of configuring the environment variable "ParaView_DIR" to point to the base folder where ParaView has its folders... which on Fedora may be "/usr", e.g. setting:
Code:
export ParaView_DIR=/usr
You can edit the file "OpenFOAM-*/etc/config.sh/paraview" accordingly.


It's later used in the folder "$FOAM_UTILITIES/postProcessing/graphics/PVReaders":
Code:
echo $FOAM_UTILITIES/postProcessing/graphics/PVReaders
to see where that is.


Quote:
Originally Posted by jamanfred View Post
As for Scotch, I'm not sure how to find out what combination of bit representations it's using. The only hint I can find is in the Scotch header file. Maybe this part is relevant?

Code:
/*+ Integer type. +*/

typedef int64_t SCOTCH_Idx;

 typedef int SCOTCH_Num;
OK, it seems that it's meant to be used with 64-bit labels in OpenFOAM. Namely you need to set "WM_LABEL_SIZE=64" in "OpenFOAM-*/etc/bashrc".
And possibly edit the file "OpenFOAM-*/etc/config.sh/scotch" accordingly.


Quote:
Originally Posted by jamanfred View Post
Is this the correct way to go about finding this information?
The RPM script used by Fedora to build the package... but am not certain where to find it.
wyldckat is offline   Reply With Quote

Reply

Tags
compile, fedora, fedora 28, openfoam


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
how to calculate mass flow rate on patches and summation of that during the run? immortality OpenFOAM Post-Processing 104 February 16, 2021 09:46
[swak4Foam] Installation Problem with OF 6 version Aurel OpenFOAM Community Contributions 14 November 18, 2020 17:18
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 tlcoons OpenFOAM Installation 13 April 20, 2016 18:34
OpenFoam install script Error during paraFoam installation SePe OpenFOAM Installation 10 June 19, 2010 16:15
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 04:01


All times are GMT -4. The time now is 13:06.