[Rocks-Discuss] MANPATH on Rocks 5.4.3

13 views
Skip to first unread message

Bart Brashers

unread,
Dec 9, 2011, 12:10:17 PM12/9/11
to Rocks List (npaci-rocks-discussion@sdsc.edu)
Has anyone else had problems with $MANPATH not being set correctly on Rocks 5.4.3 with CentOS 5.6? If you've already solved it, it would save me some time...

Bart

________________________________
This message contains information that may be confidential, privileged or otherwise protected by law from disclosure. It is intended for the exclusive use of the Addressee(s). Unless you are the addressee or authorized agent of the addressee, you may not review, copy, distribute or disclose to anyone the message or any information contained within. If you have received this message in error, please contact the sender by electronic reply to em...@environcorp.com and immediately delete all copies of the message.

Larry Baker

unread,
Dec 9, 2011, 2:27:32 PM12/9/11
to Bart Brashers, Discussion of Rocks Clusters
Bart,

I'm not yet running Rocks 5.4.3. But, I can tell you what I would
look for, based on $MANPATH screwups on other systems: when MANPATH is
not defined, people forget to expand `manpath` before adding their own
custom paths. Such as:

MANPATH=my_manpath:$MANPATH

Here's the portions of my /etc/profile.d login scripts that setup
MANPATH for the PGI compilers (which also first checks if MANPATH has
already been setup for PGI):

From pgi.sh:

> if [ ${#MANPATH} = 0 ] ; then
> export MANPATH="`manpath`:${PGI_MAN}"
> else
> if ! echo ":${MANPATH}:" | \
> /bin/grep -q ":${PGI_MAN}:" ; then
> export MANPATH="${PGI_MAN}:${MANPATH}"
> fi
> fi


From pgi.csh:

> if !( $?MANPATH ) then
> setenv MANPATH "`manpath`:${PGI_MAN}"
> else
> echo ":${MANPATH}:" | /bin/grep -q ":${PGI_MAN}:"
> if ( $? ) then
> setenv MANPATH "${PGI_MAN}:${MANPATH}"
> endif
> endif


Larry Baker
US Geological Survey
650-329-5608
ba...@usgs.gov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.sdsc.edu/pipermail/npaci-rocks-discussion/attachments/20111209/82b549c9/attachment.html

Gustavo Correa

unread,
Dec 9, 2011, 2:27:45 PM12/9/11
to Discussion of Rocks Clusters
Hi Bart

Wild guess:

Not on CentOS or Rocks, but on recent Fedora releases,
and related to how Fedora now sets up the man search path.
I don't have CentOS 5.6, only older, so I cannot confirm this applies to you.
Hence, please check this information out to see if CentOS also adopted this feature.
'man manpath' is a good start.
The symptom was an annoying message when one logs in:
'What manual page do you want?'
Do you get this?
I thought it was coming from motd, but it was the manpath problem.

IIRR, on Fedora I think what used to be 'man -w'
became a command in itself, called 'manpath', which when first called seems to
create the MANPATH environment variable with whatever the OS puts in the man search path.
This 'new feature' broke a bunch of my /etc/profile.d scripts,
MANPATH setup in .profile/.[t]cshrc, etc.

The fix was basically to replace 'man -w' by 'manpath'.

Anyway, I don't know if this is the problem you are facing.
I hope this helps.

Gus Correa

Rayson Ho

unread,
Dec 9, 2011, 3:40:51 PM12/9/11
to Discussion of Rocks Clusters
In Open Grid Scheduler/Grid Engine, we always use the "manpath" command to determine the current effective MANPATH before appending the man page directory that contains the SGE manpages.


See:

https://lists.sdsc.edu/pipermail/npaci-rocks-discussion/2011-September/054640.html

Rayson

=================================
Open Grid Scheduler / Grid Engine
http://gridscheduler.sourceforge.net/

Scalable Grid Engine Support Program
http://www.scalablelogic.com/

Bart Brashers

unread,
Dec 9, 2011, 4:44:40 PM12/9/11
to Discussion of Rocks Clusters
Great catch, Gus! Larry's fix to /etc/profile.d/pgi.csh helped. And yet, the problem remained. I only had

# echo $MANPATH
/opt/torque/man:/usr/local/pgi/linux86-64/2011/man

when I logged in using tcsh. The real problem comes from /etc/profile.d/pbs-maui-path.csh.

Roy, would you be willing to make a change for the next release of the Torque roll? A working (and less redundant) version of /etc/profile.d/pbs-maui-path.csh has the following lines:

foreach part ( /opt/maui/bin /opt/torque/bin /opt/torque/sbin )
if ( "$path" !~ *${part}* ) then
set path = ( $path $part)
endif

if ( $?MANPATH ) then
if ( "$MANPATH" !~ */opt/torque/man* ) then
setenv MANPATH /opt/torque/man:`manpath`
endif
else
setenv MANPATH `manpath`:/opt/torque/man
endif

Bart


> -----Original Message-----
> From: npaci-rocks-dis...@sdsc.edu [mailto:npaci-rocks-
> discussio...@sdsc.edu] On Behalf Of Gustavo Correa
> Sent: Friday, December 09, 2011 11:28 AM
> To: Discussion of Rocks Clusters
> Subject: Re: [Rocks-Discuss] MANPATH on Rocks 5.4.3
>

Bart Brashers

unread,
Dec 9, 2011, 5:06:42 PM12/9/11
to Discussion of Rocks Clusters
Roy, a slight change, a mis-management of my cut-n-paste abilities..

# tail -13 /etc/profile.d/pbs-maui-path.csh


foreach part ( /opt/maui/bin /opt/torque/bin /opt/torque/sbin )
if ( "$path" !~ *${part}* ) then
set path = ( $path $part)
endif

end

Gustavo Correa

unread,
Dec 9, 2011, 5:55:52 PM12/9/11
to Discussion of Rocks Clusters
We use scripts similar to Larry's and Rayson's.
Only that they had the old fashioned `man -w`, which is now mostly dead,
and replaced by `manpath`.

We need MANPATH because the standard man configuration in Linux is not really
enough to get all the man pages for compilers, MPI, various libraries, etc.
One can add those to the man configuration file, I guess, but this may be painful to maintain.
In addition, it may cause conflict in situations where you want to switch environment
[i.e. environment modules], and switch the man pages along with the environment.

I guess, it may be simpler to use `manpath` at the outset, perhaps in /etc/profile
and /etc/csh.cshrc, to create the environment variable MANPATH,
Then append to it as needed,
which includes the various scripts in /etc/profile.d, and environment modules, for
those who use that [great] package.

Gus

Reply all
Reply to author
Forward
0 new messages