Thanks to a fair amount of googling and a few days on and off of testing I seem to have a working setup for doing distributed processing using Apple Qmaster – for Shake, Maya and Compressor.
Here is my effort at explaining what I did to get it working – big apologies, it’s poorly written. I’ll revisit this post soon.
some notes on our workflow
(See further down for setting up the ENV variables.)
Centralised $NR_INCLUDE_PATH
I setup an env variable for $NR_INCLUDE_PATH for all Shake machines and the xserve – to look at a sharepoint (the nreal folder) on the xServe and automatically mount it – so all the Shake machines would be using the same macros/plugins and settings. I setup a new user on the xserve “shake” that can only mount the nreal directory.
After some googling around I found a way to automount volumes:
OS X 10.5 (fstab)
/etc/fstab – to automount sharepoint on xServe
LINK: http://blogs.sun.com/lowbit/entry/easy_afp_autmount_on_os
# ————————————————————————————-
# Mount AFP share from xServe via AFP
# ————————————————————————————-
ourserver.local:/nreal /Network/nreal url auto,url==afp://nreal:password@ourserver.local/nreal 0 0
# ————————————————————————————-
how to refresh automount(login as root/su):
sudo automount -cv
OS X 10.4 (netinfo manager)
LINK: http://ask.metafilter.com/54223/Help-me-automount-my-smb-share-in-Apple-OS-X-reward-inside
in terminal.app:
nidump fstab . > /tmp/fstab
echo “ourservernreal /Network/nreal url url==cifs://nreal:password@ourserver/nreal 0 0” >> /tmp/fstab
sudo niload fstab . < /tmp/fstab sudo killall -HUP automount
how to refresh automount(login as root/su):
sudo killall -HUP automount
QMASTER
I had tried for some time to get shake scripts to render over our network using Qmaster but it just wouldn’t work. The QMaster logs were where I found all my errors. ‘frame 0021 could not be found’, ‘UNIX error 3 file could not be found’
things to check
What seemed strange was that if I logged into the xServe and executed a script via terminal with shake (to render just on the xserve) the render would complete successfully. Then it clicked that maybe the environment variables I was using in my scripts ($xxx) might not be getting recognised by Qmaster or the way Qmaster launches Shake??
The big tip-off
I googled for the errors I kept seeing and luckily enough this forum post popped up:
http://www.highend3d.com/boards/index.php?showtopic=204342
“I have pinned this down to at least one reason – that the shake qmaster isn’t picking up the NR_INCLUDE_PATH environment variable. Does anyone know where you need to set this up on a cluster node (I can get the qmasterd to pick it up but that doesn’t solve the problem!) “
If you are trying to use Qmaster, and need to set environment variables, then you need to create a wrapper script that sets the variables and then calls the appropriate version of shake.
For example, (this was from Apple)
NR_INCLUDE_PATH=/Network_Applications/Shake Plugins/nreal/include;export NR_INCLUDE_PATH
NR_ICON_PATH=/Network_Applications/Shake Plugins/nreal/icons;export NR_ICON_PATHumask 000
/Applications/Shake3.50/shake.app/Contents/MacOS/shake $*
status=$?
if [ $status -ne 0 ]
then
exit $status
fiThen when using Qmaster, you run the application using this
script (saved for example as /usr/bin/shakeWrapper) which must be
installed on all nodes in the cluster.Regards
Nell
Cheers Nell!
I took Nell’s script, added a few lines to it and stuck it in /usr/bin/
/usr/bin/shakeWrapper – create a file to launch Shake respecting ENV variables – later alias ‘shake’ to this file
echo
echo “Shake 4 running through a wrapper script – /usr/bin/shakeWrapper”
echoumask 000
/Applications/Shake/shake.app/Contents/MacOS/shake $*
status=$?
if [ $status -ne 0 ]
then
exit $status
fi
I added the first few lines there so when I later made an alias to this script the Shake user would have some idea what is going on when launching Shake via the terminal.
Setting up the ENV (environment) variables…
/etc/profile – to declare system-wide Environment variables / aliases
(alias shake to use a wrapper to make it launch respecting/recognising the env variables)# System-wide .profile for sh(1)
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fiif [ “${BASH-no}” != “no” ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fiJOBS_LOCAL=”/Volumes/otherdrive/jobs”;
export JOBS_LOCALJOBS_SERVER=”/Volumes/ourserversharepoint/jobs”;
export JOBS_SERVERNR_INCLUDE_PATH=”$HOME/nreal/include”:”/Network/nreal/include/”;
export NR_INCLUDE_PATHalias shake=”/usr/bin/shakeWrapper”
*remember to enter into terminal:
source /etc/profile
excellent detail. nice job!!
$what_the/ hell/ are_$you talkin bout(?) -x