CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   --showme errors (

ramcdougal February 20, 2012 21:51

--showme errors
I installed OpenFOAM on my 64-bit Ubuntu 11.10 system on campus today with no difficulty by following the instructions at

When I tried the same thing tonight at home (also 64-bit Ubuntu 11.10), the following happens

$ source /opt/openfoam210/etc/bashrc
gcc: error: unrecognized option ‘--showme:compile’
gcc: error: unrecognized option ‘--showme:link’

I'm not the only one who has had this problem. One bug report links it to openmpi:
but I'm not sure what they're doing with modules and their solution doesn't work verbatim in Ubuntu. I do have openmpi installed at home, but I'm not sure what the situation is on campus.

There was an earlier forum post presumed to involve Ubuntu, but no solution

I'm not sure where to start looking for a difference between the two machines. Any advice? Thanks!

wyldckat February 21, 2012 05:35

Greetings Robert and welcome to the forum!

Mmm... indeed, this is odd, but at least you've provided a lot more information than the other forum user ;)

OK, try running the following commands:

which mpirun
mpirun --version

The first one should show you where mpirun is located and the second one should show which version you've got installed.
If neither show any information, then it might not be working due to either one of several reasons:
  • Open-MPI didn't install properly, due to some strange reason. It's known to have a glitch during installation, since normal people don't have Infiniband on their computers, but it still comes with support for it pre-packaged...
  • Another reason for a bad installation is if the "alternatives" system failed to add an alternative for Open-MPI. I'm not sure what's the solution here, but I'd guess that reinstalling Open-MPI wouldn't hurt.
  • Yet another is for said "alternatives" system not having updated until you reboot.
And don't forget to have your system fully up-to-date, just in case...

Best regards,

ramcdougal February 21, 2012 11:25

Thanks Bruno, but there is no obvious difference in mpi setup. They are both setup through Ubuntu's repositories; I don't do anything unusual with MPI. Any other ideas?

At home:

robert@desktop-2010:~$ which mpirun
robert@desktop-2010:~$ mpirun --version
mpirun (Open MPI) 1.4.3

Report bugs to

At the office:

ramcdougal@ramcdougal-VirtualBox:~$ which mpirun
ramcdougal@ramcdougal-VirtualBox:~$ mpirun --version
mpirun (Open MPI) 1.4.3

Report bugs to

You'll notice that at the office I run in a virtual machine, so I suppose that could make some subtle differences in active kernel drivers.

I have a much longer $PATH at home. Are there any known conflicts? For example, does Enthought provide a conflicting MPI?

As an aside: Why does it need to call gcc every time I open a terminal?

wyldckat February 21, 2012 11:54

Hi Robert,

The code that is giving you that error message is this one (the two lines in the middle):

# Set compilation flags here instead of in wmake/rules/../mplibSYSTEMOPENMPI
    export PINC="`mpicc --showme:compile`"
    export PLIBS="`mpicc --showme:link`"
    libDir=`echo "$PLIBS" | sed -e 's/.*-L\([^ ]*\).*/\1/'`

Source: "etc/config/"
Therefore, perhaps it is Enthought that is disturbing OpenFOAM's thought process ;)

For further debugging:
Best regards,

ramcdougal February 22, 2012 09:25

Both machines report

robert@desktop-2010:~$ which mpicc
robert@desktop-2010:~$ mpicc --version
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1

Just to be safe, I reinstalled every package with mpi in it's name; that didn't fix things.

I commented out all of the non-standard lines at the end of my ~/.bashrc, added the OpenFOAM source line, and I still got the same problem as before. I think this means Enthought is innocent, but once again I'm out of ideas.

And, for the record, this is a problem I'm having with

robert@desktop-2010:~$ uname -a
Linux desktop-2010 3.0.0-16-generic #28-Ubuntu SMP Fri Jan 27 17:44:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

wyldckat February 22, 2012 10:10

Hi Robert,

I forgot to mention that looks can be deceiving:

ls -l `which mpicc`
If this shows that it is linking to another file, then check what that file is and if itself is yet another link!

Best regards,

Linse February 24, 2012 05:52

Just for the case there are any doubts about the problem being due to mpi:
Did you check in the OpenFOAM-2.1.x/etc/config/ (or the one corresponding to your shell) if the correct C++-compiler is set there?

I just had serious build problems because I had not set the gcc46 manually...

rnebot July 18, 2012 15:56


I am a newbie and had the same problem. I have Ubuntu 12.04 and OpenFoam 2.1.1

The post from wyldckat about looking "mpicc -v" output gave me the clue. I had installed both "mpich2" and "openmpi" and the former was the one controlling "mpicc". Uninstalled "mpich2" and now it works.

Hope it helps

iperetta September 22, 2012 11:28

Solving for MPICH2

I know it's an old post, but the problem is still there... I'm working with OpenFoam 2.1.1 and Ubuntu Precise Pangolin (12.04LTS) and have the same errors with "gcc --showme:compile" and "gcc --showme:link". I'm a fan of MPICH2, so I don't have Open-MPI installed.

Searching a little in the internet, I've found out that "--showme:compile" and "--showme:link" are Open-MPI options only. To change that to work with MPICH2, I've had to edit "/opt/openfoam211/etc/config/" file and exchange "mpicc --showme:compile" and "mpicc --showme:link" for "mpicc -compile-info" and "mpicc -link-info".

Hope this information is useful for somebody else.

Best wishes! :D

wyldckat September 22, 2012 16:07

Greetings Igor and welcome to the forum!

Many thanks for sharing this information about using the system's MPICH2! It would indeed be worth while sharing this at the bug tracker as well:

But I still have got one question: did you use the Debian package installation of OpenFOAM for Ubuntu, or did you build from source?

Best regards,

iperetta September 22, 2012 17:37

Hi, wyldckat (Bruno)

By the way, I'm using 64-bit Ubuntu...

I get it from apt-get, I suppose it is from an official Ubuntu repository... See what you get with this:


sudo apt-get install openfoam211 paraviewopenfoam3120
I'm also working with swap4Foam (groovyBC library) and this one I got to build from code...

I've already tried to post in, but the site doesn't let me post there (it seems that they're looking for bugs, not solutions :p).

Well... Keep it going! Hugs!

wyldckat September 23, 2012 11:10

Hi Igor,

Wait... you're using the system's MPICH2 with the pre-built installation of OpenFOAM that was built with Open-MPI?
How does it not crash when running in parallel? :eek:

Or did you at least re-build the Pstream library for using MPICH2?

Best regards,

iperetta September 24, 2012 11:25


Originally Posted by wyldckat (Post 383201)
Wait... you're using the system's MPICH2 with the pre-built installation of OpenFOAM that was built with Open-MPI?
How does it not crash when running in parallel? :eek:

Sorry, Bruno... I didn't mean to confuse you... :o The error I mentioned showed up when I was running terminals... Please, identify to me a source (or example from tutorials) that I could run with MPI to ensure what's going on here. Actually, I'm a sort of newbie and I'm not running MPI applications right now...

As far as I though, "apt-get install" gets the source and build it for your machine. Correct me if I'm wrong, please. I don't know what comes with MPI build options...

wyldckat September 24, 2012 11:51

In this case, apt-get will only install the packages, it doesn't build anything ;)

As for a tutorial: go to the folder "multiphase/interFoam/laminar" in your own copy of the tutorials and run Allrun like this:

When it's finished, check in the folder "damBreakFine" and see what the file "log.interFoam" provides.

mripepi December 1, 2012 12:53

Hello everybody,

I had the same problem about the gcc '--showme:compile' and '--showme:link' errors, when installing OpenFoam 2.0.0 on my 64-bit Ubuntu 12.04 LTS system.
I solved it by adding in the etc/ folder a file containing the following line:


The file will be automatically sourced by the OpenFOAM etc/bashrc, and it will replace the WM_MPLIB=SYSTEMOPENMPI setting.
Alternatively you can try with one of the following setting, depending on the MPI implementation you have on your system:


Hope this could help somebody else.


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