CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OpenFOAM install on Suse 11.1 and 11.2 (https://www.cfd-online.com/Forums/openfoam-installation/69040-openfoam-install-suse-11-1-11-2-a.html)

mkt October 9, 2009 17:17

OpenFOAM install on Suse 11.1 and 11.2
 
The command in .bashrc causes the system to lockup during login.

I added the command . $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc to the .bashrc user file as shown in one of several setup instruction sets.

When I log in as that user, after entering the user name and password, a small window shows up in the upper left corner of the screen with the following in it. "kstartupconfig4 does not exist or fails". When I comment out this statement the user can log on without a problem.

My systems are Suse 11.1 and 11.2. I have the same problem on both. I have installed OpenFOAM both ways, binaries and source compiled. My system runs on an AMD dual core, 4+ GB memory, a Nvidia GeForce 8600 GTS graphics card.

Is there a way to work around this or?

Thank you.

olesen October 12, 2009 02:15

Quote:

Originally Posted by mkt (Post 232078)
The command in .bashrc causes the system to lockup during login.

I added the command . $HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc to the .bashrc user file as shown in one of several setup instruction sets.
...
Is there a way to work around this or?

It sounds like the file may not be located where you've claimed it to be.
Even if the file is normally there, it is a good idea to surround the sourcing with a file test. This catches any problems with a missing NFS-share, when you've moved directories, etc.
Code:

foamDotFile=$HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc
if [ -f "$foamDotFile" ]
then
    . $foamDotFile
fi

Or be even more paranoid and check that the file can also be read as well:
Code:

foamDotFile=$HOME/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc
if [ -f "$foamDotFile" -a -r "$foamDotFile" ]
then
    . $foamDotFile
fi


mkt October 13, 2009 12:03

Reply to Mark Olesen message
 
Mark,
I tested both of your suggested modifications. This causes my system to jump back to the user login screen. After giving me the message
"Call to lnusertemp failed (temporary directories full?) Check your installation."

I looked at the temp directories, they aren't full, and the user privileges are for the correct user. Is this a CFD program problem or a distribution program problem? Not sure.

olesen October 13, 2009 12:40

Quote:

Originally Posted by mkt (Post 232456)
Mark,
I tested both of your suggested modifications. This causes my system to jump back to the user login screen. After giving me the message
"Call to lnusertemp failed (temporary directories full?) Check your installation."

I looked at the temp directories, they aren't full, and the user privileges are for the correct user. Is this a CFD program problem or a distribution program problem? Not sure.

If you are having any sort of problems like this, then simply don't add these lines to your ~/.bashrc or ~/.profile scripts until you figure out what is going wrong.


Assume you are using bash, you can try these steps.
  1. Remove the offending line from your ~/.bashrc, and ~/.profile
  2. Start from a fresh terminal window.
  3. Check your current shell-level with 'echo $SHLVL'
  4. Go into a subshell (in case anything goes weird) with 'bash' and double-check the shell-level again.
  5. Source the OpenFOAM file.
  6. Check the shell-level again to make sure that it is still the same and didn't exit somehow.
If it works, then you need to investigate why it isn't working when inside a file. If if bombs out somewhere, you can try to trace what it is doing.
Code:

set -x
and
Code:

FOAM_VERBOSE=true
before repeating the process.

Maybe the problem is even as simple as the sourced script leaving $? as non-zero from its last command and that somehow bothering kde. In which case a 'true' command after the sourcing might fix things.

FWIW we use openSUSE 11.1 and OpenFOAM without any issues. But I always source the OpenFOAM settings via aliases anyhow - this provides a nicer way for me to switch between versions.

mkt October 13, 2009 21:46

OpenFOAM install on Suse 11.0 and 11.2 with aliases
 
Mark,
This is beginning to take to much time, so I have decided to scrub my OpenFOAM install and redo it. I think I want to try installing with aliases since you have done it that way and it is working. I know what an alias is but am not sure how to use it with OpenFOAM and if anything special is needed. Could you give me an idea on what I need to do special.

Thank you for your time and effort.

olesen October 14, 2009 02:20

Quote:

Originally Posted by mkt (Post 232505)
Mark,
This is beginning to take to much time, so I have decided to scrub my OpenFOAM install and redo it. I think I want to try installing with aliases since you have done it that way and it is working. I know what an alias is but am not sure how to use it with OpenFOAM and if anything special is needed. Could you give me an idea on what I need to do special.

Thank you for your time and effort.

There are reasonable examples of aliases in the Bash Beginners Guide
http://www.tldp.org/LDP/Bash-Beginne...ect_03_05.html

The section on functions would probably also be useful for you
http://www.tldp.org/LDP/Bash-Beginners-Guide/html/sect_11_01.html


All times are GMT -4. The time now is 15:54.