CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

Environment and wmake

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 8, 2009, 04:53
Default Environment and wmake
  #1
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17
wikstrom is on a distinguished road
Hi,

low seriousness but still:

Running Ubuntu 9.04, Jaunty

1) setting WM_NCOMPPROCS does not affect wmake. Probably since /bin/sh -> /bin/dash in ubuntu. Has to hard code into wmake.

2) the MANPATH set in etc/apps/cint/bashrc overrides the system MANPATH (which by default is empty) -> No manpages available (but cint).

N.
wikstrom is offline   Reply With Quote

Old   May 9, 2009, 06:18
Default
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Hi Niklas,

1) setting WM_NCOMPPROCS does not affect wmake. Probably since /bin/sh -> /bin/dash in ubuntu. Has to hard code into wmake.

I don't see why /bin/sh being /bin/dash should affect the setting of WM_NCOMPPROCS, could you elaborate?

2) the MANPATH set in etc/apps/cint/bashrc overrides the system MANPATH (which by default is empty) -> No manpages available (but cint).

in OpenFOAM-1.5.x/etc/apps/cint/bashrc the MANPATH is extended:

export MANPATH=$MANPATH:$CINTSYSDIR/doc

and this works fine for me, could you check to see why this is not working as expected for you?

H
henry is offline   Reply With Quote

Old   May 9, 2009, 16:00
Default Sorry. My error
  #3
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17
wikstrom is on a distinguished road
Hmm, I am sorry. At shame even! A misspelled "export ..." has obviously been following me for a while. I just blamed dash out of old habit I'm afraid...

About the MANPATH, however, there might be a changed behaviour of manpath lately (in some linux flavours or only Ubuntu?). Since Ubuntu 8.10, at least: In order to prepend the system manpath defined by /etc/manpath.config, the MANPATH variable must start with a colon :. Otherwise the system manpath is ignored.

From manual page:
Code:
If $MANPATH is set,  manpath  displays  its  value  rather  than
determining  it on the fly.  If $MANPATH is prefixed by a colon,
then the value of the variable is appended to  the  list  deter‐
mined from the content of the configuration files.  If the colon
comes at the end of the value in the variable, then  the  deter‐
mined  list  is appended to the content of the variable.  If the
value of the variable contains a double  colon  (::),  then  the
determined  list is inserted in the middle of the value, between
the two colons.
Hence, the problem probably occurs when foamCleanPath cleans the colon.

I'd say it's devious to destroy "man" by removing the access to all manpages. 22. ;-)

N
wikstrom is offline   Reply With Quote

Old   May 9, 2009, 19:58
Default
  #4
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
It is not quite clear what I should do, clearly we need to append to any existing MANPATH setting so

export MANPATH=$MANPATH:$CINTSYSDIR/doc

is necessary, but now you are saying that $MANPATH should start with a :, but whose responsibility is that? The above statement does not make any assumptions about what $MANPATH is initially set to. On my machine I set $MANPATH including all the system locations so I don't have a problem. What happens if you set MANPATH to : in your .bashrc or equivalent for dash file?

An alternative is I could set

export MANPATH=:$MANPATH:$CINTSYSDIR/doc

or

export MANPATH=:$CINTSYSDIR/doc:$MANPATH

assuming that the :: that $MANPATH might end up containing don't cause any problems. What is your preference?

H
henry is offline   Reply With Quote

Old   May 10, 2009, 02:33
Default Manpath
  #5
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17
wikstrom is on a distinguished road
Good morning Henry!
A simple, though not beautiful, solution would be to set

MANPATH=:$MANPATH

after the latest call to foamCleanPath in $WM_PROJECT_DIR/etc/bashrc
(cleanPath is the colon remover, obviously.)
or, more compact

cleanPath=`$cleanProg "$MANPATH"` && MANPATH=":$cleanPath"

around line 247 in bashrc
This works for me, but I am not sure if other linux flavours appreciate the initial colon? Please try.

On my systems MANPATH is unset unless the user sets it. The system man paths are instead governed by /etc/manpath.config

Cheers
N
wikstrom is offline   Reply With Quote

Old   May 10, 2009, 06:29
Default
  #6
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Hi Niklas,

OK I think it is sorted now. I have put the ":" at the end rather than the beginning to be consistent with the OpenFOAM additions to PATH; the OpenFOAM-dependent third-party executables must of course take precedence while OpenFOAM is being used. I have also made the equivalent change for csh so man should now work as expected in bash, dash, csh and tcsh. All these changes are now in the 1.5.x git repository, let me know if you have any further problems.

H
henry is offline   Reply With Quote

Old   May 10, 2009, 07:32
Default
  #7
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17
wikstrom is on a distinguished road
Great Henry.

Thanks

N.
wikstrom is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07


All times are GMT -4. The time now is 04:55.