CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   error in installation openfoam 1.6ext (https://www.cfd-online.com/Forums/openfoam-installation/125443-error-installation-openfoam-1-6ext.html)

mary mor October 25, 2013 10:18

error in installation openfoam 1.6ext
 
Hi
I installed the debian pack of openfoam1.6-ext based on the instructions on openfoamwiki on Ubuntu 10.04. After I add alias in .bashrc and run startOF16ext it says that :
bash: /opt/OpenFOAM-1.6-ext/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/etc/settings.sh: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory

There's no file named by OpenFOAM-1.6-ext in opt directory. Besides I have installed another versions of OpenFOAM 2.0.1 and OpenFOAM 2.1.0.
What's the problem?
I appreciate any help...
Thanks

nimasam October 26, 2013 00:22

type
Quote:

which icoFoam
to see whether you install OpenFOAM-1.6-ext or not?

Also it should be noted OpenFOAM-1.6-ext is not placed in /opt directory, as i remember (im not sure) it should be in /usr

mary mor October 26, 2013 06:45

Thanks for reply
openfoam 2.1.0 has been installed.
Yes it exists in /usr/lib directory, but after I want to call it from terminal it gives the errors I mentioned in my previous post. It seems it hasn't been installed.

Doesn't it need to run wmake or anything else? The instruction says it's enough to add alias... to .bashrc

Regards

wyldckat October 26, 2013 08:41

Greetings to all!

@Maryam:
Quote:

Originally Posted by mary mor (Post 459102)
Doesn't it need to run wmake or anything else? The instruction says it's enough to add alias... to .bashrc

It would come in handy which exact steps you've taken to create said alias. And if you created aliases for the other OpenFOAM versions as well?

In addition, have you started a new terminal after installing 1.6-ext?

For more information, I suggest the following blog post: Advanced tips for working with the OpenFOAM shell environment

Best regards,
Bruno

mary mor October 26, 2013 16:36

Hi Bruno,
As I mentioned, I followed the instructions in openfoamwiki,installation of debian pack linked by below:
http://openfoamwiki.net/index.php/In...ucid_10.04_LTS

For 1.6ext verision i added :alias startOF16ext="source /usr/lib/OpenFOAM-1.6-ext/etc/bashrc" to the end of line.

As well for OpenFoam2.1.0 I added . opt/openfoam210/etc/bashrc and it works.

And yes. I started a new terminal after installing! How can I check that it has been installed?!

Thanks,
Best Regards

wyldckat October 26, 2013 16:44

Hi Maryam,

Uhm... OK. So I'm guessing you have something like this at the end of your "~/.bashrc" file:
Code:

. /opt/openfoam210/etc/bashrc
alias startOF16ext="source /usr/lib/OpenFOAM-1.6-ext/etc/bashrc"

Change it to this:
Code:

alias startOF210="source /opt/openfoam210/etc/bashrc"
alias startOF16ext="source /usr/lib/OpenFOAM-1.6-ext/etc/bashrc"

You will need a new terminal window whenever you want the other OpenFOAM version. For example:
  • To use OpenFOAM 1.6-ext, start a new terminal and run:
    Code:

    startOF16ext
  • To use OpenFOAM 2.1.0, start a new terminal and run:
    Code:

    startOF210
Best regards,
Bruno

mary mor October 26, 2013 17:39

thanks Bruno, I changed the code as you said.
Now after entering startOF16ext it says:
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status

and when I try to run 2.1.0 version it gives the same error! as in my post #1:
bash: /usr/lib/openfoam210/bin/foamEtcFile: No such file or directory
bash: /usr/lib/openfoam210/bin/foamCleanPath: No such file or directory
bash: /usr/lib/openfoam210/bin/foamCleanPath: No such file or directory
bash: /usr/lib/openfoam210/bin/foamCleanPath: No such file or directory
bash: /usr/lib/openfoam210/etc/config/settings.sh: No such file or directory
bash: /usr/lib/openfoam210/etc/config/aliases.sh: No such file or directory
bash: /usr/lib/openfoam210/bin/foamEtcFile: No such file or directory
bash: /usr/lib/openfoam210/bin/foamEtcFile: No such file or directory
bash: /usr/lib/openfoam210/bin/foamCleanPath: No such file or directory
bash: /usr/lib/openfoam210/bin/foamCleanPath: No such file or directory
bash: /usr/lib/openfoam210/bin/foamCleanPath: No such file or directory

regards

wyldckat October 26, 2013 17:49

Quote:

Originally Posted by mary mor (Post 459178)
thanks Bruno, I changed the code as you said.
Now after entering startOF16ext it says:
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'

That's strange... which Ubuntu version and architecture do you have?
You can check by running:
Code:

uname -m
cat /etc/lsb-release

Quote:

Originally Posted by mary mor (Post 459178)
and when I try to run 2.1.0 version it gives the same error! as in my post #1:
bash: /usr/lib/openfoam210/bin/foamEtcFile: No such file or directory

I'm guessing that you did not start a new terminal window...

mary mor October 26, 2013 18:00

I started a new terminal:(
I don't know what happened by I once changed the line alias startOF210="source /opt/openfoam210/etc/bashrc" to alias startOF210='. /opt/openfoam210/etc/bashrc" and ran the terminal again and the following happened:

maryam@maryam-desktop:~$ startOF210
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status


maryam@maryam-desktop:~$ startOF16ext
bash: /opt/OpenFOAM-1.6-ext/bin/foamEtcFile: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/etc/settings.sh: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory
bash: /opt/OpenFOAM-1.6-ext/bin/foamCleanPath: No such file or directory

and the same is happening when I changed to the one you mentioned for alias.


I'm using Ubuntu 10.04.3 LTS lucid i686.

Regards

wyldckat October 26, 2013 18:02

What does this give you?
Code:

tail ~/.bashrc

mary mor October 27, 2013 06:53

sorry for late answer. It was time for bed and then university!

It says"

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi

alias startOF210="source /opt/openfoam210/etc/bashrc"
alias startOF16ext="source /usr/lib/OpenFOAM-1.6-ext/etc/bashrc"

Regards
Maryam

wyldckat October 27, 2013 07:53

Hi Maryam,

I've finished installing the same packages on a virtual machine with an up-to-date Ubuntu 10.04 i686 and I do not get the same error as you do.

But I suspect I know what the problem really is. Run the following command:
Code:

ls -l $(which mpicc) /etc/alternatives/mpicc
It should show you this:
Code:

lrwxrwxrwx 1 root root 22 2012-09-28 15:10 /etc/alternatives/mpicc -> /usr/bin/mpicc.openmpi
lrwxrwxrwx 1 root root 23 2012-09-28 15:10 /usr/bin/mpicc -> /etc/alternatives/mpicc

If it does not show you this, then that is the reason why you're getting these problems.

Best regards,
Bruno

mary mor October 27, 2013 12:12

Hi Bruno,
It says:
Code:

lrwxrwxrwx 1 root root 21 2013-10-19 16:29 /etc/alternatives/mpicc -> /usr/bin/mpicc.mpich2
lrwxrwxrwx 1 root root 23 2013-10-19 16:30 /usr/bin/mpicc -> /etc/alternatives/mpicc

I have mpicc.mpich2 instead of you having mpicc.openmpi. Is this the problem?

Best regards,
Maryam

wyldckat October 27, 2013 13:38

Hi Maryam,

In theory, yes, that's the problem. Do you need MPICH2 or can it be switched to Open-MPI as the default MPI?

Best regards,
Bruno

mary mor October 27, 2013 14:36

Hi Bruno,
No I don't need it.But I don't know how to change it.

Besides I have another question. Does the debian pack have any difference with source installation? If not why it is said in wiki that debian installation is better for beginners?

The svn and git seems not to work. So can I use the openfoamwiki.net instruction at http://openfoamwiki.net/index.php/In...1.6-ext/Ubuntu or not?
If not from which repository I should use?
Sorry for asking too much...

Best regards,
Maryam

wyldckat October 27, 2013 14:59

Hi Maryam,

Quote:

Originally Posted by mary mor (Post 459273)
Besides I have another question. Does the debian pack have any difference with source installation? If not why it is said in wiki that debian installation is better for beginners?

Well, it's better for beginners, if they have not already installed other software first ;)
And if they have, it's sort-of assumed they have some experience with that other software.


Let's try taking care of fixing this problem with MPICH2. If it doesn't work, then you can try building from source.
Quote:

Originally Posted by mary mor (Post 459273)
No I don't need it.But I don't know how to change it.

OK, it's fairly simple. Run this command:
Code:

sudo update-alternatives --set mpi /usr/lib/openmpi/include
Now start a new terminal and try one of the alias commands, namely startOF16ext or startOF210.
Do not forget that you can only use 1 of these alias commands per terminal window!!


If later on you want to switch back to MPICH2 (quoting http://stackoverflow.com/a/18728955), run:
Code:

sudo update-alternatives --set mpi /usr/include/mpich2
Best regards,
Bruno

mary mor October 27, 2013 16:04

Yesss. It doesn't give any error, now. Thanks so much.

But I have another problem!
How can I get access to solvers and tutorial files:D It's different with the other version I had previously:confused:

Thanks for your patiance...

Best regards,
Maryam

wyldckat October 28, 2013 02:49

Hi Maryam,

Run:
Code:

echo $FOAM_TUTORIALS
echo $FOAM_SOLVERS

And those two lines should tell you where they are.

For more, try:
Code:

export | grep FOAM
Best regards,
Bruno

mary mor October 28, 2013 03:07

Thanks Bruno
Yes I found the solvers folder but when I run echo for tutorials it says:
/usr/lib/OpenFOAM-1.6-ext/tutorials

But there's no such a folder in this directory. when I run : ls -a It doesn't show there's a tutorials folder:)

Regards,
Maryam

wyldckat October 28, 2013 15:57

Hi Maryam,

Sorry, I forgot that the 1.6-ext available in the PPA has a very restructured installation, with some missing parts.

Almost 2 years ago I wrote this:
Quote:

Originally Posted by wyldckat (Post 330283)
edit2: these packages are really crazy... the tutorials aren't in the "-doc" package, they are placed in the folder: "/usr/share/doc/openfoam-1.6-ext/examples"

Have a look in that folder. And if it's not in that folder, check this post: http://www.cfd-online.com/Forums/ope...tml#post330283 post #44.

Best regards,
Bruno


All times are GMT -4. The time now is 07:47.