CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   OpenFOAM1.7.1 (

pere July 20, 2011 03:24

I'm trying to compile Openfoam 1.7.1 in a Altix UV with gcc 4.5.3 and this error appears and the end of the compilation:

/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lOpenFOAM
collect2: ld returned 1 exit status
make[2]: *** [/prod/OPENFOAM1.7.1/OpenFOAM-1.7.1-SGI/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/mixtureAdiabaticFlameT] Error 1
make[2]: Leaving directory `/prod/OPENFOAM1.7.1/OpenFOAM-1.7.1-SGI/OpenFOAM-1.7.1/applications/utilities/thermophysical/mixtureAdiabaticFlameT'
make[1]: *** [mixtureAdiabaticFlameT] Error 2
make[1]: Target `application' not remade because of errors.
make[1]: Leaving directory `/prod/OPENFOAM1.7.1/OpenFOAM-1.7.1-SGI/OpenFOAM-1.7.1/applications/utilities/thermophysical'
make: *** [thermophysical] Error 2
make: Target `application' not remade because of errors.

and in applications/bin/linux.../ there is nothing...

Does anyone can help me?

wyldckat July 20, 2011 03:42

Hi Pere!

OK, you better post the log file... run Allwmake like this:

./Allwmake > make.log 2>&1
Then you can pack the file like this:

tar -czf make.log.tar.gz make.log
Then attach make.log.tar.gz on your next post.

Usually the first error is the one you should be looking for.

Best regards,

pere July 20, 2011 07:04

1 Attachment(s)
ok here is the log....

wyldckat July 20, 2011 07:20

Hi Pere,

OK, you've done a few modifications to Allwmake and that sort-of damaged the normal build process of OpenFOAM. In other words:
  1. The MPI version of libPstream is being sent to:

    When it should go to:

  2. The dummy version of isn't being built. This might be the reason why isn't being built either.
OK, lets try this:
  1. Please attach your modified file on your next post. This way it'll be easier to spot anything that might be damaging things.
  2. If possible, put Allwmake for Pstream the way it was originally.
  3. Last but not least, did you modify anything on any of the Pstream files?
Best regards,

pere July 21, 2011 03:35


1..... is attached...

2......I've modified Allwmake in Pstream ....I attach it... This was because I want to use mpt-2.03 and an error appears before that says dummy libraries can't be used in parallel mode.

3...No I don't modified nothing in Pstream lines.

pere July 21, 2011 03:37

1 Attachment(s)
sorry I attash it this time

pere July 21, 2011 03:40

1 Attachment(s)
Allwmake in /Pstream

pere July 21, 2011 04:23

I've put
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi

wyldckat July 21, 2011 05:10

Hi Pere,

There are some minor details to be fixed, but this way we'll get closer to the real problem. So here are the fixes I propose:
  1. In, in the part about SGIMPI, change it to this:

        export MPI_ARCH_PATH=/prod/OPENFOAM1.7.1/OpenFOAM-1.7.1-SGI/OpenFOAM-1.7.1/mpt-2.03

        _foamAddPath    $MPI_ARCH_PATH/bin
        _foamAddLib    $MPI_ARCH_PATH/lib
        _foamAddMan    $MPI_ARCH_PATH/man

        export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/mpt-2.03


    I'm assuming you have SGIMPI installed in the folder indicated by MPI_ARCH_PATH.
  2. In that Allwmake, change it back to the way it was. I understand that it was giving you problems, but for now lets do it the way OpenFOAM needs things to be.
  3. In mplibSGIMPI, remove the option "-DOMPI_SKIP_MPICXX". This is something specific for OpenMPI and I suppose it shouldn't be used for SGIMPI.
Now run the main Allwmake again the same way as before and we'll see if it builds or not.

Good luck!

pere July 22, 2011 03:24

1 Attachment(s)
Ok I've compiled once again and :

pere July 22, 2011 04:01

if I made wmake libso OpenFOAM :

/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lPstream
collect2: ld returned 1 exit status
make: *** [/prod/OPENFOAM1.7.1/OpenFOAM-1.7.1-SGI/OpenFOAM-1.7.1/lib/linux64GccDPOpt/] Error 1

wyldckat July 22, 2011 07:21

Hi Pere,

According to the log, you've only done part of the changes I wrote about :(

But I also forgot to write down an important step: start a new terminal! Otherwise, most things will still be the same as before.

  1. start a new terminal and to start with a new environment;
  2. change Pstream's Allwmake back to the way it was, i.e. let it build the dummy version.
  3. run the main Allwmake once again.
Best regards,

pere July 25, 2011 06:32

1 Attachment(s)
Ok now I think I've made tha changes you tell me...but the error is the same:

wyldckat July 25, 2011 06:37

:eek: You changed both "wmake libso mpi" to "dummy" :( Only the first one should be changed...

pere July 26, 2011 03:37

1 Attachment(s)
Ok here it is:

wyldckat July 26, 2011 04:02

Hi Pere,

OK, I think now I know what the problem is, or so I hope. Update the files c++ and c at "wmake/rules/linux64Gcc/" with these ones:
Hopefully this will fix the problem. (Er, wait, you are using Icc, correct? If so, try the next fix.)

And if it didn't fix the problem, undo the previous change and then try this:
  1. Edit the general file at the rule folder for the compiler you've chosen;
  2. On the line that says:

    Edit to also include the MPI:

    PROJECT_LIBS = -l$(WM_PROJECT) -ldl -L/opt/sgi/mpt/mpt-2.03/lib -lmpi
    (Adapt where necessary.)
  3. Save and close.
Hopefully this will fix the problem, since the MPI library is directly indicated to be always used when linking!

Good luck!

pere July 26, 2011 04:07

no I'm using gcc...

wyldckat July 26, 2011 04:11


Originally Posted by pere (Post 317502)
no I'm using gcc...

Then both possible solutions should still apply. If you were using Icc, then only the second one would apply.

pere July 26, 2011 04:12

ok thanks a lot .... I 'm gonna try...

pere July 27, 2011 07:25

ok make5.log is chaning c and c++ and make6.log is changing general file.... I think the error is the same as it was before in the two cases.

All times are GMT -4. The time now is 08:43.