CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Using native MPI libraries (https://www.cfd-online.com/Forums/openfoam-installation/57474-using-native-mpi-libraries.html)

arkangel October 26, 2007 05:35

I was trying to build for Al
 
I was trying to build for Altix 4000, i found a patch for compiling with intel icc10 , i dont want to build the WM.../lib/openmpi/libPstrem.so nor link with the WM../src/openmpi/lib/*,

Instead we have our own mpi implementation (sgi mpi libraries) , any idea which files/lines I have to change or create (in rules or bashrc and .bashrc ) ...

Any help will be greatly appreciated http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

olesen October 26, 2007 06:14

In the bashrc you'll have to s
 
In the bashrc you'll have to see another default mpi implementation.

In the .bashrc you'll have to set the path/libs accordingly and set variables such as SGIMPI_ARCH_PATH=...

In the wmake/rule/linuxXXXX/
you'll need to add a rule for mplibSGIMPI

In src/Pstream/Allwmake you'll need to ajust the if [ ... ] to include your implementation.


Good luck with rebuilding.

arkangel October 26, 2007 07:36

thanks I never will guess the
 
thanks I never will guess the src/Pstream/Allwmake part i will try during the weekend i hope it works !

arkangel October 28, 2007 13:42

Hi foamers i am follow your s
 
Hi foamers i am follow your steps , lets see

I think i am close, to test I link with the mpi implented by altix and the gcc 4.2.0


the Pstream is built using our libmpi from sgi altix
ldd libPstream.so returns
...
libmpi.so => /lrz/sys/mpi_altix/lib/libmpi.so (0x2000000800080000)
...

It compiles the whole buch of libraries in lib/linuxIA64Gcc with no error -- all of them --
and these are linked in turn with the new libPstream.so. However, when it tries to compile the applications (cd solver; ./wmake all ...)it dies with the 1st one (i tried to compile some others at ramdon )

i get the following from the linker
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `MPI::Is_initialized()'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `op_intercept(void*, void*, int*, unsigned int*)'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Comm::mpi_comm_map'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `MPI:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifp::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `MPI:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifp::Free()'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Comm::ignored_status'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Intracomm::current_op'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Request::ignored_status'
collect2: ld returned 1 exit status

It is clear that libPstream is missing some functions, any idea how come this happened and if there is a solution

arkangel October 28, 2007 13:42

Hi foamers i am following you
 
Hi foamers i am following your steps , lets see

I think i am close, to test I link with the mpi implented by altix and the gcc 4.2.0


the Pstream is built using our libmpi from sgi altix
ldd libPstream.so returns
...
libmpi.so => /lrz/sys/mpi_altix/lib/libmpi.so (0x2000000800080000)
...

It compiles the whole buch of libraries in lib/linuxIA64Gcc with no error -- all of them --
and these are linked in turn with the new libPstream.so. However, when it tries to compile the applications (cd solver; ./wmake all ...)it dies with the 1st one (i tried to compile some others at ramdon )

i get the following from the linker
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `MPI::Is_initialized()'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `op_intercept(void*, void*, int*, unsigned int*)'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Comm::mpi_comm_map'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `MPI:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifp::Init(void (*)(void const*, void*, int, MPI::Datatype const&), bool)'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `MPI:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifp::Free()'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Comm::ignored_status'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Intracomm::current_op'
/lrz/sys/mpi_altix/lib/libPstream.so: undefined reference to `PMPI::Request::ignored_status'
collect2: ld returned 1 exit status

It is clear that libPstream is missing some functions, any idea how come this happened and if there is a solution

gschaider October 28, 2007 15:55

This (linking the libraries, n
 
This (linking the libraries, not linking the applications) happens because when linking a library the linker says "can't find this symbol, propably someone else will take care of it", but when linking an application it must find a definition for _every_ symbol.

Maybe there are some additionaly libs that have to be linked to PStream (mip_cxx.so or such stuff). Check the examples that come with your MPI-implementation

Another brute force-way to find the offenders is
grep PMPI::Comm::ignored_status /usr/lib
(or wherever you expect them to be found)

arkangel October 29, 2007 08:43

thanks i found which librari
 
[SOlVED] thanks i found which libraries were missing for c++ http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

lakeat June 2, 2009 06:35

How did you solve that?

misakagan March 2, 2011 08:39

Similar error here whilie trying the compile applications with intel mpi:

Code:

/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Waitall'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Abort'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Get_count'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Init'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Probe'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Send'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Allreduce'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Buffer_detach'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Bsend'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Irecv'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Recv'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Get_processor_name'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Test'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Isend'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Finalize'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Buffer_attach'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Comm_size'
/data/leuven/300/vsc30098/OpenFOAM/OpenFOAM-1.7.x/lib/linux64IccDPOpt/intel_mpi/libPstream.so: undefined reference to `MPI_Comm_rank'

Any suggestions?

Thanks.

rahulksoni December 3, 2016 12:12

How Solved
 
Quote:

Originally Posted by arkangel (Post 182433)
[SOlVED] thanks i found which libraries were missing for c++ http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

Hi, how did you solve it. Please share.

wyldckat December 3, 2016 17:12

Quote:

Originally Posted by rahulksoni (Post 628116)
Hi, how did you solve it. Please share.

Quick answer: That was almost a lifetime ago, in an Internet temporal reference...

It's easier if you provide more details about your problem. Specifically which MPI version and OpenFOAM versions that you're using, along with any changes you might have already done in trying to fix this, so that it's easier to diagnose the problem.

rahulksoni December 4, 2016 01:22

Linking libraries
 
4 Attachment(s)
Quote:

Originally Posted by wyldckat (Post 628153)
Quick answer: That was almost a lifetime ago, in an Internet temporal reference...

It's easier if you provide more details about your problem. Specifically which MPI version and OpenFOAM versions that you're using, along with any changes you might have already done in trying to fix this, so that it's easier to diagnose the problem.

Thanks wyldckat for a quick response.
I would provide the max possible details for your convenience.

My Foam version of 2.3.0.

Major settings in /OpenFOAM/etc/cshrc (file attached) are:
Code:

set foamInstall = /lustre/scratch/rsoni/$WM_PROJECT
set foamCompiler=system
setenv WM_COMPILER Gcc
setenv WM_MPLIB SGIMPI

I believe the MPI libraries are taken from /opt/sgi/mpt/mpt-2.01 as I can see following line in compilation screen output:
Code:

wmake libso mpi
SOURCE=UOPwrite.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -DSGIMPI -DMPI_NO_CPPBIND -I/opt/sgi/mpt/mpt-2.01/include -IlnInclude -I. -I/lustre/scratch/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/lustre/scratch/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude  -fPIC -c $SOURCE -o Make/linux64GccDPOptSGIMPI/UOPwrite.o

The files included from /opt/sgi/mpt/mpt-2.01 are shown in attached screenshot.

Other files settings related file such as /OpenFOAM/etc/config/settings.csh, ~/.cshrc etc.

System is having intel compiler by default. So, I execute following command before compiling to avoid error of type 'This intel math.h is for intel compilers only'.
Code:

module unload intel_11.1.073
Compilation log is attached at https://www.dropbox.com/s/b4np7p7ctp...g_new.txt?dl=0
Compilation screen output log is attached at https://www.dropbox.com/s/6754u4qxm4...utLog.txt?dl=0

Other system configuration:
uname -m
Code:

x86_64
echo $WM_ARCH
Code:

linux64
icc --version
Code:

icc (ICC) 11.1 20100806
Copyright (C) 1985-2010 Intel Corporation.  All rights reserved.

icc --version
Code:

gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


wyldckat December 4, 2016 05:38

Greetings Rahul,

The first note I want to make is that you can redirect all of the output (standard+error outputs) into a single file in csh by using ">&", for example:
Code:

./Allwmake >& log.make
I say this because the file "make_log_new.txt" that you provided via Dropbox does not have any warning messages nor error messages, which seems to imply that something went wrong and wasn't logged. The other detail in that file is that it's using Open-MPI and not SGI's MPI; the reason seems to be related to the detail I refer to later below.


From the "screenOutputLog.txt", the following error is still occurring:
Code:

/opt/intel/Compiler/11.1/073/include/math.h:27:3: error: #error "This Intel <math.h> is for use with only the Intel compilers!"\
make: *** [Make/linux64GccDPOptSGIMPI/UOPwrite.o] Error 1\

Which seems to imply that you didn't unload Intel's compiler before this build.


As for the other files, in the file "system-cshrc.txt" that you provided, has the following line:
Code:

setenv FOAM_SETTINGS 'WM_NCOMPPROCS=4 WM_MPLIB=OPENMPI WM_ARCH_OPTION=64'
You should either change "WM_MPLIB=OPENMPI" to "WM_MPLIB=SGIMPI", or simply remove it from that line.

Another detail in that file "system-cshrc.txt", is that these lines will not work from here:
Code:

setenv WM_CC 'mpicc'
setenv WM_CXX 'mpicxx'

setenv PATH $PATH:/lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64GccDPOpt/bin/
setenv LD_LIBRARY_PATH /lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64GccDPO/lib:$LD_LIBRARY_PATH

  • and there is a typo in the last line "linux64GccDPO", which probably should be "linux64GccDPOpt".
The reason why it will not work from here is because these will be replaced/removed when you source OpenFOAM's "cshrc" file. Which means that if you want to do these changes, you need to place them at the end of "OpenFOAM-2.3.0/etc/cshrc".


Another detail that is intriguing me is that the files you've provided have a log of backslashes '\'. Is that because of how you copied the information from the remote connection or perhaps due to the text editor that you are using remotely?
Because the original lines above are shown as follows from the files you've provided:
Code:

setenv WM_CC 'mpicc'\
setenv WM_CXX 'mpicxx'\
\
\
#setenv PATH $PATH\\:/home1/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64Icc/openmpi-1.6.5/bin/\
#setenv LD_LIBRARY_PATH /home1/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64Icc/openmpi-1.6.5/lib64:$LD_LIBRARY_PATH\
\
setenv PATH $PATH\\:/lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64GccDPOpt/bin/\
setenv LD_LIBRARY_PATH /lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64GccDPO/lib:$LD_LIBRARY_PATH\


After you've solved these details, hopefully the build will work as intended.

Best regards,
Bruno

rahulksoni December 4, 2016 07:40

Results after suggested changes
 
Quote:

Originally Posted by wyldckat (Post 628189)
Greetings Rahul,

The first note I want to make is that you can redirect all of the output (standard+error outputs) into a single file in csh by using ">&", for example:
Code:

./Allwmake >& log.make
I say this because the file "make_log_new.txt" that you provided via Dropbox does not have any warning messages nor error messages, which seems to imply that something went wrong and wasn't logged. The other detail in that file is that it's using Open-MPI and not SGI's MPI; the reason seems to be related to the detail I refer to later below.


From the "screenOutputLog.txt", the following error is still occurring:
Code:

/opt/intel/Compiler/11.1/073/include/math.h:27:3: error: #error "This Intel <math.h> is for use with only the Intel compilers!"\
make: *** [Make/linux64GccDPOptSGIMPI/UOPwrite.o] Error 1\

Which seems to imply that you didn't unload Intel's compiler before this build.


As for the other files, in the file "system-cshrc.txt" that you provided, has the following line:
Code:

setenv FOAM_SETTINGS 'WM_NCOMPPROCS=4 WM_MPLIB=OPENMPI WM_ARCH_OPTION=64'
You should either change "WM_MPLIB=OPENMPI" to "WM_MPLIB=SGIMPI", or simply remove it from that line.

Another detail in that file "system-cshrc.txt", is that these lines will not work from here:
Code:

setenv WM_CC 'mpicc'
setenv WM_CXX 'mpicxx'

setenv PATH $PATH:/lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64GccDPOpt/bin/
setenv LD_LIBRARY_PATH /lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64GccDPO/lib:$LD_LIBRARY_PATH

  • and there is a typo in the last line "linux64GccDPO", which probably should be "linux64GccDPOpt".
The reason why it will not work from here is because these will be replaced/removed when you source OpenFOAM's "cshrc" file. Which means that if you want to do these changes, you need to place them at the end of "OpenFOAM-2.3.0/etc/cshrc".


Another detail that is intriguing me is that the files you've provided have a log of backslashes '\'. Is that because of how you copied the information from the remote connection or perhaps due to the text editor that you are using remotely?
Because the original lines above are shown as follows from the files you've provided:
Code:

setenv WM_CC 'mpicc'\
setenv WM_CXX 'mpicxx'\
\
\
#setenv PATH $PATH\\:/home1/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64Icc/openmpi-1.6.5/bin/\
#setenv LD_LIBRARY_PATH /home1/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64Icc/openmpi-1.6.5/lib64:$LD_LIBRARY_PATH\
\
setenv PATH $PATH\\:/lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64GccDPOpt/bin/\
setenv LD_LIBRARY_PATH /lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64GccDPO/lib:$LD_LIBRARY_PATH\


After you've solved these details, hopefully the build will work as intended.

Best regards,
Bruno

Thanks Bruno for a quick response. Yes, you are right I am trying to compile on a remote system.


Following things I have done:
1. unloaded the intel compiler, In fact marked it to not to load later as well.

2. Changed
Code:

setenv FOAM_SETTINGS 'WM_NCOMPPROCS=4 WM_MPLIB=SGIMPI WM_ARCH_OPTION=64'
3. Commented following lines
Code:

#setenv WM_CC 'mpicc'\
#setenv WM_CXX 'mpicxx'\

#setenv PATH $PATH\\:/home1/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64Icc/openmpi-1.6.5/bin/\
#setenv LD_LIBRARY_PATH /home1/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64Icc/openmpi-1.6.5/lib64:$LD_LIBRARY_PATH\

#setenv PATH $PATH\\:/lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64GccDPOpt/bin/\
#setenv LD_LIBRARY_PATH /lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64GccDPO/lib:$LD_LIBRARY_PATH\

4. After that I executed following two commands for precaution
Code:

csh
of230

5. used mpi-selector-menu command which to setup following:
Code:

service0 OpenFOAM/OpenFOAM-2.3.0> mpi-selector-menu
Current system default: mpt-2.00
Current user default:  mpt-2.05

    "u" and "s" modifiers can be added to numeric and "U"
    commands to specify "user" or "system-wide".

1. mpt-2.00
2. mpt-2.05
3. openmpi-1.3.2
U. Unset default
Q. Quit

Selection (1-3[us], U[us], Q):

and

echo $MPI_ROOT
/opt/sgi/mpt/mpt-2.01

6. Created the logfile by following command:
Code:

./Allwmake >& make.log
The file is attached at https://www.dropbox.com/s/24degn98hhvib7d/make.log?dl=0

Still logfile is showing several errors especially related to openmpi, undefined references and declarations. Also, it still shows inclusion of openmpi-1.6.5.

wyldckat December 4, 2016 10:29

Quick answer: Whenever you change the main ".cshrc" or ".bashrc" files, you should start a new terminal, to ensure you have a clean environment. Therefore, when you executed csh, it very likely inherited the shell environment from the parent csh shell from which you launched the new one.

OK, but a new error rose up, which is due to the old GCC version that you're trying to use (GCC 4.3):
Code:

primitives/triad/triad.C:36: error: expected initializer before ‘<’ token
primitives/triad/triad.C:39: error: expected initializer before ‘<’ token
make: *** [Make/linux64GccDPOpt/triad.o] Error 1

If you check this page: http://openfoamwiki.net/index.php/In...ibility_Matrix - er, the wiki page is having a rendering problem at the moment... This specific error is explained here: http://www.cfd-online.com/Forums/ope...edhat-el5.html


Based on the GCC version and environment that you're using, I'm guessing that you're dealing with CentOS 5.x or RHEL 5.x. You can find detailed instructions on how to build a custom GCC version with OpenFOAM 2.3.0 here: http://openfoamwiki.net/index.php/In...EL#CentOS_5.10
From there you will need to:
  • Use step #7.
  • Use the option "foamCompiler=ThirdParty" from the step #8.
  • Use steps #9 to #15, which will solve several of the problems that you are having right now.

rahulksoni December 4, 2016 11:49

SUSE Enterprise OS
 
Quote:

Originally Posted by wyldckat (Post 628223)
Quick answer: Whenever you change the main ".cshrc" or ".bashrc" files, you should start a new terminal, to ensure you have a clean environment. Therefore, when you executed csh, it very likely inherited the shell environment from the parent csh shell from which you launched the new one.

OK, but a new error rose up, which is due to the old GCC version that you're trying to use (GCC 4.3):
Code:

primitives/triad/triad.C:36: error: expected initializer before ‘<’ token
primitives/triad/triad.C:39: error: expected initializer before ‘<’ token
make: *** [Make/linux64GccDPOpt/triad.o] Error 1

If you check this page: http://openfoamwiki.net/index.php/In...ibility_Matrix - er, the wiki page is having a rendering problem at the moment... This specific error is explained here: http://www.cfd-online.com/Forums/ope...edhat-el5.html


Based on the GCC version and environment that you're using, I'm guessing that you're dealing with CentOS 5.x or RHEL 5.x. You can find detailed instructions on how to build a custom GCC version with OpenFOAM 2.3.0 here: http://openfoamwiki.net/index.php/In...EL#CentOS_5.10
From there you will need to:
  • Use step #7.
  • Use the option "foamCompiler=ThirdParty" from the step #8.
  • Use steps #9 to #15, which will solve several of the problems that you are having right now.

Thanks wyldckat for a quick answer. I got some lead towards the further attempts. I will try with your suggestion for CentOS and will update in the post soon. Anyway my remote cluster is SUSE Enterprise, details are here:

cat /proc/version
Code:

Linux version 2.6.32.12-0.7-default (geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP 2010-05-20 11:14:20 +0200
icc --version
Code:

icc (ICC) 11.1 20100806
Copyright (C) 1985-2010 Intel Corporation.  All rights reserved.

lsb_release -a
Code:

LSB Version:    core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
Distributor ID: SUSE LINUX
Description:    SUSE Linux Enterprise Server 11 (x86_64)
Release:        11
Codename:      n/a

uname -m
Code:

x86_64

wyldckat December 4, 2016 19:11

Quick answer: Sorry, I didn't manage to get my hands on a trial version of SLES or SLED 11, I only managed SLED/SLES 12 (which have GCC 4.4), for which I wrote instructions here: http://openfoamwiki.net/index.php/In...nux_Enterprise

rahulksoni December 9, 2016 02:22

Incompatible file inclusion issue
 
2 Attachment(s)
Quote:

Originally Posted by wyldckat (Post 628223)
Quick answer: Whenever you change the main ".cshrc" or ".bashrc" files, you should start a new terminal, to ensure you have a clean environment. Therefore, when you executed csh, it very likely inherited the shell environment from the parent csh shell from which you launched the new one.

OK, but a new error rose up, which is due to the old GCC version that you're trying to use (GCC 4.3):
Code:

primitives/triad/triad.C:36: error: expected initializer before ‘<’ token
primitives/triad/triad.C:39: error: expected initializer before ‘<’ token
make: *** [Make/linux64GccDPOpt/triad.o] Error 1

If you check this page: http://openfoamwiki.net/index.php/In...ibility_Matrix - er, the wiki page is having a rendering problem at the moment... This specific error is explained here: http://www.cfd-online.com/Forums/ope...edhat-el5.html


Based on the GCC version and environment that you're using, I'm guessing that you're dealing with CentOS 5.x or RHEL 5.x. You can find detailed instructions on how to build a custom GCC version with OpenFOAM 2.3.0 here: http://openfoamwiki.net/index.php/In...EL#CentOS_5.10
From there you will need to:
  • Use step #7.
  • Use the option "foamCompiler=ThirdParty" from the step #8.
  • Use steps #9 to #15, which will solve several of the problems that you are having right now.

Hi wyldckat and Bruno

Sorry to bother again.

As per the link http://openfoamwiki.net/index.php/In...EL#CentOS_5.10, I have successfully moved up to step 13. However, stucking at step 14 while doing makeCGAL with
Code:

./makeCGAL gmp-5.1.2 mpfr-3.1.2 > & log.CGAL
I think its attempting to include libXext.so from /usr/lib/, but libXext.so.6 is also available in /usr/lib64/. Therefore, resulting in issue related to incompatible library files as files in /usr/lib/ are 32 bit. But system is trying to built in 64 bit. I can say this because it also included /usr/lib64/libX11.so and /usr/lib64/libQtOpenGL.so;/usr/lib64/libQtGui.so
How, to force it to use only 64 libraries.

The prominent snippets of log are:
Code:

-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib/libXext.so - not found

-- Looking for IceConnectionNumber in ICE - not found

/lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64/gcc-4.8.1/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lXext
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTryCompileExec3128768811] Error 1
gmake[1]: Leaving directory `/lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/build/linux64Gcc48/CGAL-4.3/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec3128768811/fast] Error 2

-- WARNING: QT found but could not compile print_QT_version.cpp:

/lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64/gcc-4.8.1/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lXext
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTryCompileExec2757025913] Error 1
gmake[1]: Leaving directory `/lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/build/linux64Gcc48/CGAL-4.3/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec2757025913/fast] Error 2

-- USING QT_VERSION = 'unknown'

I have made several attempts to resolve the issue by taking help from internet. But no luck.
The make and log file for your reference is attached. Please take a look.
Attachment 52399

Attachment 52400

rahulksoni December 9, 2016 18:38

Partially Solved
 
Quote:

Originally Posted by rahulksoni (Post 628885)
Hi wyldckat and Bruno

Sorry to bother again.

As per the link http://openfoamwiki.net/index.php/In...EL#CentOS_5.10, I have successfully moved up to step 13. However, stucking at step 14 while doing makeCGAL with
Code:

./makeCGAL gmp-5.1.2 mpfr-3.1.2 > & log.CGAL
I think its attempting to include libXext.so from /usr/lib/, but libXext.so.6 is also available in /usr/lib64/. Therefore, resulting in issue related to incompatible library files as files in /usr/lib/ are 32 bit. But system is trying to built in 64 bit. I can say this because it also included /usr/lib64/libX11.so and /usr/lib64/libQtOpenGL.so;/usr/lib64/libQtGui.so
How, to force it to use only 64 libraries.

The prominent snippets of log are:
Code:

-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib/libXext.so - not found

-- Looking for IceConnectionNumber in ICE - not found

/lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64/gcc-4.8.1/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lXext
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTryCompileExec3128768811] Error 1
gmake[1]: Leaving directory `/lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/build/linux64Gcc48/CGAL-4.3/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec3128768811/fast] Error 2

-- WARNING: QT found but could not compile print_QT_version.cpp:

/lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/platforms/linux64/gcc-4.8.1/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lXext
collect2: error: ld returned 1 exit status
gmake[1]: *** [cmTryCompileExec2757025913] Error 1
gmake[1]: Leaving directory `/lustre/scratch/rsoni/OpenFOAM/ThirdParty-2.3.0/build/linux64Gcc48/CGAL-4.3/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec2757025913/fast] Error 2

-- USING QT_VERSION = 'unknown'

I have made several attempts to resolve the issue by taking help from internet. But no luck.
The make and log file for your reference is attached. Please take a look.
Attachment 52399

Attachment 52400



Some nice person's previous post in the forum helped me handling the error. Actually, I am installing OpenFOAM in remote cluster. And, there I need minimal installation. Pre/post processing I have to do locally. So, I believed most of the thirdparty packages that are troubling me are not actually required. And, troubling because of not having root/administrative privilege.

Here https://www.cfd-online.com/Forums/op...myhexmesh.html, I found that troublemaking CGAL package which eventually requires gmp and mpfr are required for foamHexMesh tutorial which I don't require at least for time being at least. So, tried some hacks to prevent make of foamyHexMesh. Certainly, commented following lines in OpenFOAM/OpenFOAM-2.3.0/applications/utilities/mesh/generation/Allwmake file:

Code:

#    wmake libso foamyHexMesh/conformalVoronoiMesh
#    wmake all foamyHexMesh
#    wmake all foamyQuadMesh

Proceeding further with the steps suggested by wyldckat, I did:

Code:


cd $WM_PROJECT_DIR
sed -i -e 's/LINK_FLAGS="\-lreadline"/LINK_FLAGS="-lreadline -lncurses"/' \
  $FOAM_UTILITIES/mesh/manipulation/setSet/Allwmake
wcleanAll
./Allwmake >& log.foam

Now, there is a new issue:
Code:

'/lustre/scratch/rsoni/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64Gcc48DPOpt/lib/libcompressibleTwoPhaseSystem.so' is up to date.
+ wmake libso interfacialModels
'/lustre/scratch/rsoni/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64Gcc48DPOpt/lib/libcompressibleEulerianInterfacialModels.so' is up to date.
+ wmake libso phaseIncompressibleTurbulenceModels
'/lustre/scratch/rsoni/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64Gcc48DPOpt/lib/libphaseIncompressibleTurbulenceModels.so' is up to date.
+ wmake
make[2]: `/lustre/scratch/rsoni/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64Gcc48DPOpt/bin/twoPhaseEulerFoam' is up to date.
SRFIcoFoam.C: In function ‘int main(int, char**)’:
SRFIcoFoam.C:84:13: error: no match for call to ‘(Foam::fvVectorMatrix {aka Foam::fvMatrix<Foam::Vector<double> >}) ()’
    UrelEqn().relax();
            ^
SRFIcoFoam.C:86:33: error: no match for call to ‘(Foam::fvVectorMatrix {aka Foam::fvMatrix<Foam::Vector<double> >}) ()’
    fvOptions.constrain(UrelEqn());
                                ^
SRFIcoFoam.C:88:19: error: no match for call to ‘(Foam::fvVectorMatrix {aka Foam::fvMatrix<Foam::Vector<double> >}) ()’
    solve(UrelEqn() == -fvc::grad(p));
                  ^
In file included from SRFIcoFoam.C:63:0:
/lustre/scratch/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
    const int nOuterCorr =
              ^
/lustre/scratch/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/readPISOControls.H:12:16: warning: unused variable ‘momentumPredictor’ [-Wunused-variable]
    const bool momentumPredictor =
                ^
/lustre/scratch/rsoni/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’ [-Wunused-variable]
    const bool transonic =
                ^
make[2]: *** [Make/linux64Gcc48DPOpt/SRFIcoFoam.o] Error 1
make[2]: Target `/lustre/scratch/rsoni/OpenFOAM/rsoni-2.3.0/platforms/linux64Gcc48DPOpt/bin/SRFIcoFoam' not remade because of errors.
make[1]: *** [SRFIcoFoam] Error 2
make[1]: Target `application' not remade because of errors.
make: *** [incompressible] Error 2
make: Target `application' not remade because of errors.



All times are GMT -4. The time now is 05:59.