|
[Sponsors] |
May 8, 2009, 04:53 |
Environment and wmake
|
#1 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
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. |
|
May 9, 2009, 06:18 |
|
#2 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
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 |
|
May 9, 2009, 16:00 |
Sorry. My error
|
#3 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
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. I'd say it's devious to destroy "man" by removing the access to all manpages. 22. ;-) N |
|
May 9, 2009, 19:58 |
|
#4 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
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 |
|
May 10, 2009, 02:33 |
Manpath
|
#5 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
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 |
|
May 10, 2009, 06:29 |
|
#6 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
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 |
|
May 10, 2009, 07:32 |
|
#7 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
Great Henry.
Thanks N. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |