Simbiosis

Communiques from the wilderness

Grouped Plone keywords

 The keywords system is plone is ok, but it’s not great. There is a few alternative such as Portal Taxonomy, and it is quite well discussed elsewhere. However, most systems I’ve seen replace the keywords system entirely, meaning that only modified/new products can use the improved system. All I wanted was something a little better than the list box, and a 2 level hierarchy would also be nice. Using the existing keyword infrastructure was pretty much a must, so it will tie in to any future core changes to Plone.

So, I devised a widget to replace the keywords widget, which provided a simple hierarchy, and check boxes to select the keywords. It is constructed off the keywords list, with a / used as the separator. ie Group1/KeyWord1. Sooner or later I’ll put it on Plone.org, but until then it is available from SVN at https://www.hpc.jcu.edu.au/projects/plone/svn/GroupedKeywords/trunk/

July 5, 2007 Posted by Nigel | plone | | 1 Comment

Multi-node PBS script for non-mpi jobs

A PBS script I wrote to allow me to spawn across multiple nodes, much like mpirun does, except without the MPI.

#!/bin/sh
#PBS -l nodes=3:ppn=1
NODES=`sort $PBS_NODEFILE`
echo $NODES

function spawn() {
  NODE=$1
  COUNT=$2
  echo Spawning $COUNT on $NODE
  rsh $NODE -n "~/mark.sh" &
  #rsh $NODE -n "cd $PWD ; ./run.sh --agent --threads $COUNT" &

}

LAST=
COUNT=0
for N in $NODES ; do
        if [ "$N" = "$LAST" ] ; then
                COUNT=$[COUNT+1]
        else
                if [ 0 -ne $COUNT ] ; then
                        spawn $LAST $COUNT
                fi
                COUNT=1
                LAST=$N
        fi
done

if [ 0 -ne $COUNT ] ; then
        spawn $LAST $COUNT
fi

# Wait for children to exit
wait

July 5, 2007 Posted by Nigel | programming | | No Comments Yet