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

[OpenFOAM.com] Compiling v2006, mpicc -- broken

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 2 Post By fertinaz
  • 3 Post By aendres

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 3, 2020, 07:31
Cool Compiling v2006, mpicc -- broken
  #1
New Member
 
Henrik
Join Date: Jan 2016
Posts: 5
Rep Power: 10
broccolibadger is on a distinguished road
Hi,

Hopyfully this is the right place to ask such a question as a beginner.

I'm trying to compile the source code for v2006 and openmpi on a Ubuntu 20.04 machine, getting this error:

Everything beforehand works just fine, it is this part just at the start of the OpenFOAM compiling process that a problem occurs.

Code:
========================================
Done ThirdParty Allwmake
========================================

========================================
Compile OpenFOAM libraries

    ln: OpenFOAM/lnInclude
    ln: OSspecific/POSIX/lnInclude


...



OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32OptOPENMPI/lib \
    -L/home/henrik/OpenFOAM/ThirdParty-v2006/platforms/linux64Gcc/openmpi-4.0.3/lib64 -L/home/henrik/OpenFOAM/ThirdParty-v2006/platforms/linux64Gcc/openmpi-4.0.3/lib -lmpi  -o /home/henrik/OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32Opt/lib/openmpi-4.0.3/libPstream.so
g++: error: /home/henrik/OpenFOAM/OpenFOAM-v2006/build/linux64GccDPInt32OptOPENMPI/src/Pstream/mpi/UOPwrite.o: No such file or directory
g++: error: /home/henrik/OpenFOAM/OpenFOAM-v2006/build/linux64GccDPInt32OptOPENMPI/src/Pstream/mpi/UIPread.o: No such file or directory
g++: error: /home/henrik/OpenFOAM/OpenFOAM-v2006/build/linux64GccDPInt32OptOPENMPI/src/Pstream/mpi/UPstream.o: No such file or directory
g++: error: /home/henrik/OpenFOAM/OpenFOAM-v2006/build/linux64GccDPInt32OptOPENMPI/src/Pstream/mpi/PstreamGlobals.o: No such file or directory
make: *** [/home/henrik/OpenFOAM/OpenFOAM-v2006/wmake/makefiles/general:184: /home/henrik/OpenFOAM/OpenFOAM-v2006/platforms/linux64GccDPInt32Opt/lib/openmpi-4.0.3/libPstream.so] Error 1
Any help or hint on how to proceed would make my day.

Some trouble regarding AIDOS compilation was alleviated by:
Code:
sudo apt install --reinstall #_mpi libraries here_#
perhaps it is related?

Compilation has previously worked fine for OF version 19.06, though since then the ubuntu distro has been upgraded.

Cheers
broccolibadger is offline   Reply With Quote

Old   July 4, 2020, 15:48
Default
  #2
Member
 
Fatih Ertinaz
Join Date: Feb 2011
Location: Istanbul
Posts: 64
Rep Power: 15
fertinaz is on a distinguished road
Hello Henrik,

The problem is the objects under Pstream is not created properly which indicates an MPI related problem.

I recently compiled OF-2006, but I did by installing openmpi manually. New OF is shipped with openmpi-4.0.3, which I believe is not the version installed using the package manager. I assumed that's what you did.

So you got two options here:
  1. Manually install openmpi-4.0.3: You'll have to download and build it by yourself. If you're a beginner this may sound daunting, but I assure you it's not. One thing that you need to be careful with is updating the OS environment variables PATH and LD_LIBRARY_PATH. If you choose to do this, you don't need to change anything in the OF configuration files. But I guess you might have set "MPI_ARCH_PATH" to your MPI installation path.
  2. Use openmpi-4.0.3 that is shipped with ThirdParty: If you want OF to install openmpi for you, then you need to find the following line in the etc/bashrc:
    export WM_MPLIB=SYSTEMOPENMPI
    and change it to
    export WM_MPLIB=OPENMPI
    This is gonna (supposedly, haven't tried myself) find the openmpi-4.0.3 directory under the ThirdParty folder, and build openmpi from scratch. I don't think you need to change anything else if you follow this approach.

Hope this helps
broccolibadger and TonyZ like this.
fertinaz is offline   Reply With Quote

Old   July 5, 2020, 06:31
Default
  #3
New Member
 
Henrik
Join Date: Jan 2016
Posts: 5
Rep Power: 10
broccolibadger is on a distinguished road
Hi again, and thanks!

I solved the problem by compiling the MPI that comes in ThirdParty. Apparently compiling the package with the flag -k such as below is what's needed for the libraries to be built fully.

Code:
./Allwmake -k
broccolibadger is offline   Reply With Quote

Old   July 9, 2020, 12:35
Default
  #4
New Member
 
Miguel Castellano
Join Date: Jun 2020
Posts: 4
Rep Power: 6
michu5696 is on a distinguished road
No that just skips the errors so compilation is not interrupted but you still have to build it again without -k option to make sure everything went fine.
michu5696 is offline   Reply With Quote

Old   July 14, 2020, 07:09
Default
  #5
New Member
 
Aaron Endres
Join Date: Jun 2016
Posts: 13
Rep Power: 10
aendres is on a distinguished road
Hi Henrik,



I just had the same issue. In my case, it was caused by the -q flag for Allwmake, which is recommended in the build guide. When omitting the -q flag (just running ./Allwmake -j -s -l), the compilation even worked with the systems openmpi (WM_MPLIB=SYSTEMOPENMPI). This could explain why "./Allwmake -k" resolved the issue in your case.
olesen, broccolibadger and TonyZ like this.
aendres is offline   Reply With Quote

Old   January 22, 2021, 22:15
Default
  #6
Senior Member
 
starter
Join Date: Sep 2012
Posts: 125
Rep Power: 16
sihaqqi is on a distinguished road
Hi
What does these flags -s, -l, -j mean. Can some one please advise a resource link where I can understand these bash scripts.
sihaqqi is offline   Reply With Quote

Old   January 23, 2021, 01:41
Default
  #7
Member
 
Fatih Ertinaz
Join Date: Feb 2011
Location: Istanbul
Posts: 64
Rep Power: 15
fertinaz is on a distinguished road
Sihaqqi
  • -s is silent mode. It doesn't echo command outputs.
  • -j is specified compilation is executed in parallel.
  • -l is used to redirect outputs to a log file.
  • -k enables ignoring errors which is why it causes confusion in some cases.
  • -q enables wmakeCollect which is wmake scheduler for efficient parallel compilations.

All of this information can be found in the scripts located under wmake folder.
fertinaz is offline   Reply With Quote

Old   January 23, 2021, 06:28
Default
  #8
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by sihaqqi View Post
Hi
What does these flags -s, -l, -j mean. Can some one please advise a resource link where I can understand these bash scripts.
Self-documented:
'wmake -help' or even './Allwmake -help'
olesen 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
[OpenFOAM.org] Cannot open configuration file mpicc-wrapper-data.txt mpicc: Not found wenjuny OpenFOAM Installation 0 November 25, 2019 10:01
OpenFOAM 1.6 ext fportela OpenFOAM Installation 11 December 26, 2013 19:55
mpirun fails achim OpenFOAM Installation 16 August 27, 2013 09:00
OpenFoam 1.6-ext - RPM build errors preibie OpenFOAM 12 September 8, 2011 04:12
Help with KIVA4 source code compiling geothokar Main CFD Forum 0 September 3, 2010 06:40


All times are GMT -4. The time now is 14:16.