Jump to content
  • Announcements

    • admin

      PBS Forum Has Closed   06/12/17

      The PBS Works Support Forum is no longer active.  For PBS community-oriented questions and support, please join the discussion at http://community.pbspro.org.  Any new security advisories related to commercially-licensed products will be posted in the PBS User Area (https://secure.altair.com/UserArea/). 
Sign in to follow this  
akiladila

Recursion in /usr/pbs/bin/mpiexec

Recommended Posts

PBS Version: 9.2.2.82426

This may have been fixed in more recent versions of PBS, but I thought that I would raise this issue...

I recently ran into a situation where mpirun failed to start because the /usr/pbs/bin/mpiexec script went into an infinite loop trying to find the Intel mpiexec that it shadowed. The problem is at line 196:

for component in `echo $prepPATH | tr : " "`

do

if [ $component = `dirname $0` ]

then

continue

fi

if [ -x $component/mpiexec ]

then

exec $component/mpiexec ${1+"$@"}

fi

done

logerr "unexpected error - no non-PBS mpiexec in PATH"

else

testPATH=$PBS_O_PATH

pbsbindirID="`filestat $PBS_EXEC/bin`"

# make implicit "." in $testPATH explicit

prepPATH=`echo $testPATH | sed -e 's/^:/.:/' \

-e 's/:$/:./' \

-e 's/:::*/:.:/g'`

for component in `echo $prepPATH | tr : " "`

do

# Check to see whether . is $PBS_EXEC/bin

if [ $component = "." ]

then

if [ "`filestat .`" = $pbsbindirID ]

then

continue

fi

else

if [ $component = "$PBS_EXEC/bin" ]

then

continue

fi

fi

if [ -x $component/mpiexec ]

then

exec $component/mpiexec ${1+"$@"}

fi

done

logerr "unexpected error - no non-PBS mpiexec in PBS_O_PATH"

fi

exit 1

}

This fails if a user has placed /usr/pbs/bin/ in their path the trailing / prevents the pbs mpiexec script from finding the real mpiexec. Anyway, this was a nasty little thing that kept me chasing my tail for a couple of hours.

Share this post


Link to post
Share on other sites

I filed a support request for this. I will investigate this and make sure I can reproduce both the error and the fix. If I can confirm this it will be escalated to a product bug. This is listed in our tracking system as Spectrum #183490 if you ever need to call support to reference it.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×