CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Installation problem (http://www.cfd-online.com/Forums/openfoam-installation/57548-installation-problem.html)

Andrei Smirnov (Smirnov) January 29, 2005 15:19

I was trying to install the O
 
I was trying to install the OpenFOAM on Linux P4 Dell computer:

$ uname -a
Linux smirnov 2.4.21-4.ELsmp #1 SMP Fri Oct 3 17:52:56 EDT 2003 i686 i686 i386 GNU/Linux

It did not work. First, running
bin/foamInstallationTest
reports a critical error, which I don't know how to correct:

-------------------------------------------------
Software Version Location
-------------------------------------------------
gcc 3.2.3 /usr/bin/gcc
java 1.4.2_05 /usr/java/j2sdk1.4.2_05/bin/java
gzip 1.3.3 /usr/bin/gzip
tar 1.3.3 /bin/tar
icoFoam *** not installed ***
CRITICAL ERROR
----------------------------------------------

Secondly, running Allmake produces these errors:

/usr/bin/ld: cannot find -lOpenFOAM
collect2: ld returned 1 exit status

I also wonder if it is possible not to install
the package into $HOME/OpenFOAM as recommended
in README, but to use /usr/local/OpenFOAM instead?
If so, how to do that?

I would appreciate your help very much. Thanks,

A.Smirnov

Eugene de Villiers (Eugene) January 29, 2005 18:28

The downloadable binaries of
 
The downloadable binaries of OpenFOAM have been compiled using gcc-3.4.3 with Glibc-2.3+. This means you need a relatively new version of linux (Redhat 9+, Suse 9+, etc.) on which you also need to install gcc-3.4.3 as instructed on the download page. Alternatively you have to compile the source code yourself.

To install OpenFOAM in a directory other than the default one, you need to edit 2 things. First change the enviromental variable WM_PROJECT_INST_DIR= in OpenFOAM-1.0.2/.OpenFOAM-1.0.2/bashrc (cshrc if you are using tc- or cshell) to your new install directory. Secondly, you need to source this bashrc file from you personal configuration file i.e.
". /usr/local/OpenFOAM/OpenFOAM-1.0.2/.OpenFOAM-1.0.2/bashrc"
to set up your OpenFOAM enviroment.

Andrei Smirnov (Smirnov) January 30, 2005 16:32

> Alternatively you have to co
 
> Alternatively you have to compile the source
> code yourself.

That's exactly what I was trying to do. But
running Allmake would produce many errors with
unresolved libraries. Here are examples of the last ones I could see in the Allmake terminal output:

....
/usr/bin/ld: cannot find -lfoamUtil
collect2: ld returned 1 exit status
make: *** [/home/andrei/OpenFOAM/OpenFOAM-1.0.2/applications/bin/linuxOpt/foamDebugSwitches] Error 1

For this one I tried to locate foamUtil inside the OpenFOAM directory, but did not find any libraries, only sources:

[OpenFOAM-1.0.2]$ find . -name "*foamUtil*"
./src/foamUtil
./src/foamUtil/lnInclude/libfoamUtil.C
./src/foamUtil/libfoamUtil.C

Another set of errors relates to lam:

....
/home/andrei/OpenFOAM/OpenFOAM-1.0.2/lib/linuxOpt/lam-7.1.1/libPstream.so: undefined reference to `lam_mpi_comm_world'
/home/andrei/OpenFOAM/OpenFOAM-1.0.2/lib/linuxOpt/lam-7.1.1/libPstream.so: undefined reference to `lam_mpi_packed'
collect2: ld returned 1 exit status
make: ***
[/home/andrei/OpenFOAM/OpenFOAM-1.0.2/applications/bin/linuxOpt/chemkinToFoam] Error 1

I checked on the lam package, and it is instanlled:
[andrei@smirnov OpenFOAM-1.0.2]$ lamboot -V

LAM 6.5.9/MPI 2 C++ - Indiana University

Arch: i386-redhat-linux-gnu
RPI: usysv

However, $LAMHOME points to the lam-7.1.1 inside
$HOME/OpenFOAM tree:
/home/andrei/OpenFOAM/OpenFOAM-1.0.2/src/lam-7.1.1

It appears to be the sourses. However, the installed version comes in binaries. I'm not sure what I should do about this.

Also, after the compilation the
foamInstallationTest only one
critical error:

icoFoam *** not installed ***
CRITICAL ERROR

Again, I saw icoFoam.C source, bu could not find any *icoFoam*.so library files.

Do you think it will still be partially working given all these problems? Any suggestions on how to correct these?

Best regards,

Andrei

Hrvoje Jasak (Hjasak) January 31, 2005 08:52

Heya, It looks like the sh
 
Heya,

It looks like the shell did not pick up the new libraries. Open another shell, update the environment and run Allwmake again:

source ~/.login ; source ~/.cshrc ; rehash
foam ; Allwmake

icoFoam is a top-level code and will produce an executable, not a library. Mine lives in:

/home/coyote/hjasak/OpenFOAM/OpenFOAM-1.0/applications/bin/linuxOpt/icoFoam

Good luck,

Hrv

Andrei Smirnov (Smirnov) January 31, 2005 12:10

I saw you were using csh, so
 
I saw you were using csh, so I switched to tcsh,
and sourced
$HOME/OpenFOAM/OpenFOAM-1.0/.OpenFOAM-1.0/cshrc
as recommended in README.
After this ./Allmake worked without a glitch and
bin/foamInstallationTest did not produce any errors.
It appears that something must be wrong with
bschrc files. I wonder if anyone really used bash
during the installation?

Andrei

Norma McKee (Mckee) January 31, 2005 15:41

I am attempting to use bash.
 
I am attempting to use bash. I am building from source now. Is it ok to use bash?

Hrvoje Jasak (Hjasak) January 31, 2005 17:36

Foam should build both with t
 
Foam should build both with tcsh and bash. The deal in the old days was that Henry was using bash and I'm using tcsh, i.e. both environments are used and updated regularly.

To my knowledge, both shells should build and run fine - any errors (with as much details as possible) would be appreciated.

Hrv

Ervin Adorean (Adorean) February 22, 2005 14:23

Hello. I'm new to OpenFOAM. Th
 
Hello. I'm new to OpenFOAM. The installationtest gives 1 critical error: icoFoam *** not installed *** . Can anybody help me? Thanks.
Ervin

Checking basic setup...
-------------------------------------------------------------------------------
Shell: bash
Host: isi014.mot.upv.es
OS: Linux version 2.6.3-7mdk
User: ervin
User_config: /home/ervin/.bashrc
Foam_config: /home/ervin/.OpenFOAM-1.0.2/bashrc sourced correctly.
-------------------------------------------------------------------------------


Checking main FOAM env variables...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Crit
-------------------------------------------------------------------------------
$WM_PROJECT_INST_DIR /home/ervin/OpenFOAM yes yes
$WM_PROJECT_USER_DIR /home/ervin/OpenFOAM/ervin-1.0.2 no no
$FOAM_JOB_DIR /home/ervin/OpenFOAM/jobControl no yes
-------------------------------------------------------------------------------


Checking the FOAM env variables set on the PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Path Crit
-------------------------------------------------------------------------------
$WM_PROJECT_DIR /home/ervin/OpenFOAM/OpenFOAM-1.0.2 yes yes yes

$FOAM_USER_APPBIN ...rvin-1.0.2/applications/bin/linuxOpt no no
$FOAM_APPBIN ...FOAM-1.0.2/applications/bin/linuxOpt yes yes yes
$WM_DIR .../ervin/OpenFOAM/OpenFOAM-1.0.2/wmake yes yes yes
$FOAMX_PATH ...ations/utilities/preProcessing/FoamX yes yes yes
$CEI_HOME /usr/local/ensight/CEI no no

$JAVA_PATH /home/ervin/OpenFOAM/linux/j2sdk1.4.2_05 yes yes no
$MICO_ARCH_PATH ...2/src/mico-2.3.11/platforms/linuxOpt no yes
$LAM_ARCH_PATH ...0.2/src/lam-7.1.1/platforms/linuxOpt no yes
$MPICH_ARCH_PATH --------- env variable not set --------- no
-------------------------------------------------------------------------------


Checking the FOAM env variables set on the LD_LIBRARY_PATH...
-------------------------------------------------------------------------------
Environment_variable Set_to_file_or_directory Valid Path Crit
-------------------------------------------------------------------------------
$FOAM_LIBBIN ...OpenFOAM/OpenFOAM-1.0.2/lib/linuxOpt yes yes yes
$FOAM_USER_LIBBIN ...in/OpenFOAM/ervin-1.0.2/lib/linuxOpt no no
$LAM_ARCH_PATH ...0.2/src/lam-7.1.1/platforms/linuxOpt no yes
-------------------------------------------------------------------------------


Software versions
-------------------------------------------------------------------------------
Software Version Location
-------------------------------------------------------------------------------
gcc 3.4.3 /home/ervin/OpenFOAM/linux/gcc-3.4.3/bin/gcc
java 1.4.2_05 /home/ervin/OpenFOAM/linux/j2sdk1.4.2_05/bin/java
gzip 1.2.4 (18 Aug 93)
Compilation options:
DIRENT UTIME STDC_HEADERS HAVE_UNISTD_H
gzip /bin/gzip
tar /bin/tar
icoFoam *** not installed ***
CRITICAL ERROR

-------------------------------------------------------------------------------


Checking file/directory permissions...
-------------------------------------------------------------------------------
File/directory Set Reqd Crit
-------------------------------------------------------------------------------


Checking networking...
-------------------------------------------------------------------------------
Action Result Crit
-------------------------------------------------------------------------------
Pinging_isi014.mot.upv.es Successful yes
Pinging_localHost Successful yes
Test_rsh: Unsuccessful_connection_refused* yes
Test_ssh: Successful yes
(*) Only one of rsh or ssh is required by the Foam enviroment.

-------------------------------------------------------------------------------

Base configuration ok.

The foam installation contains 1 critical error(s).

Review the output for warning messages and consult
the installation guide for trouble shooting.

[ervin@isi014 bin]$

anton322322 April 6, 2005 08:11

i have the same problem, i hav
 
i have the same problem, i have
bash, RH9-standard installation

eugene April 6, 2005 08:36

Have you installed both the so
 
Have you installed both the source and the binaries?

roncresswell April 6, 2005 23:18

I have the same issue. I have
 
I have the same issue. I have installed source, binaries and third party tools (except paraview). Is it possible that the binary distribution for 1.1 is incomplete? Does one *have* to compile everything just to get icoFoam to be recognized?

(I'm running on Fedora Core 3 and using bash, btw)

henry April 7, 2005 02:50

The binary distribution of 1.1
 
The binary distribution of 1.1 is complete and has been installed successfully by a large number of people. However, it was compiled on a SuSE 9.1 machine not particularly for RedHat but this has not caused problems for RedHat users in the past.

komel April 7, 2005 02:54

I have installed OpenFoam on F
 
I have installed OpenFoam on Fedora Core 3 using bash and I didn't encounter any problems.

eugene April 7, 2005 19:56

Could one of you having this p
 
Could one of you having this problem please type:

ls -la $FOAM_APPBIN
ls -la $FOAM_LIBBIN
ls -la $LAM_ARCH_PATH

And let me know what the outcome of each is. If you are not picking up icoFoam, either your path is wrong (unlikely) or your binaries are installed incorrectly or incompletely.

I noticed in one of the test outputs above, the $LAM_ARCH_PATH is missing as well. This is a pretty critical component as well.

roncresswell April 8, 2005 00:46

I went through foamInstallatio
 
I went through foamInstallationTest last night to see what it was looking for, and saw that it was looking in $FOAM_APPBIN, so I checked that and it *is* set correctly, however, the directory was empty.

I then looked back through my bash history - and this is where it gets embarrasing - I'd upacked the source distribution but only *listed* the binary distribution - doh. A quick "tar xvf" later and she seems to be happy ;^)

So for the record, "icoFoam - not found CRITICAL ERROR" probably means the binary distribution hasn't been unpacked, even if you think you remember doing it!

vlabez April 28, 2005 16:17

Attempt runFoamX causes system
 
Attempt runFoamX causes system crash.

amadou May 3, 2005 12:08

Does any one have good notes o
 
Does any one have good notes on installing openFoam on RedHat Enterprise. It is clear to me that I should unpack OpenFoam-1-1.general.gtgz in $HOME/OpenFoam. But it is not clear as to where to unpack the rest of the files like OpenFoam-1.1-linuxOpt.gtgz, gcc-3.4.3.tgz,paraview-1.8.5.tgz, and j2sdk1.4.2_05.tgz,
Regards,
Amadou

mattijs May 3, 2005 12:19

See http://www.opencfd.co.u
 
See

http://www.opencfd.co.uk/openfoam/linux.html

(accessible through Download and click on Linux)

mss October 23, 2006 02:30

Hi, I have problem with ico
 
Hi,

I have problem with icoFoam. I installed the OpenFoam-1.3(essential to all platforms) on the Linux Suse 10.1 (x86-64).

Software versions
-------------------------------------------------------------------------------
Software Version Location
-------------------------------------------------------------------------------
gcc 4.1.0 /home/margst/OpenFOAM/linuxAMD64/gcc-4.1.0/bin/gcc
java 1.4.2_05 /home/margst/OpenFOAM/linuxAMD64/j2sdk1.4.2_05/bin/java
gzip 1.3.5 /usr/bin/gzip
tar 1.3.5 /bin/tar
icoFoam *** not installed ***
CRITICAL ERRROR

-------------------------------------------------

I would appreciate your help very much. Thanks,
Rita

ranjan_1947yahoocom May 6, 2007 06:56

I have tried to install OpenFO
 
I have tried to install OpenFOAM -1.3, but got this error
I am using bash and

. ~/.bashrc
Executing: /home/ranjan/OpenFOAM/OpenFOAM-1.3/.bashrc
Executing: /home/ranjan/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/apps/ensightFoam/bashrc
Executing: /home/ranjan/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/apps/paraview/bashrc

uname -a
Linux ged 2.6.18-4-686 #1 SMP Wed Feb 21 16:06:54 UTC 2007 i686 GNU/Linux

gcc-v
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

and i got this error
/usr/bin/ld: cannot find -lOpenFOAM
collect2: ld returned 1 exit status

make: *** [/home/ranjan/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPOpt/foamInfoExec ] Error 1


All times are GMT -4. The time now is 09:29.