1. 2012
    Nov
    18

    Quick start with TORQUE on Gentoo

    If you do a lot of computational work, you’re probably familiar with PBS, the Portable Batch System. PBS is a specification for software that allows you to submit jobs to a computer cluster and have them executed. While it’s usually used on large, highly parallel cluster computers (with hundreds or thousands of processors), sometimes you might want a copy on a home computer for testing or just to queue up your own personal tasks.

    Some time ago I installed TORQUE, an open-source PBS implementation, on my main desktop which runs Gentoo. Here are some tips on the basic procedure I followed.

    Enable the server USE flag and emerge the package:

    echo "sys-cluster/torque server" >> /etc/portage/package.use
    emerge sys-cluster/torque
    emerge --config sys-cluster/torque
    

    Check the contents of /var/spool/torque/server_name to make sure it matches your hostname (output of hostname), and /var/spool/torque/server_priv/nodes to make sure that your computer is listed.

    your_hostname np=1
    

    where np is the number of processors on your system.

    Then start it up!

    /etc/init.d/pbs_server start
    /etc/init.d/pbs_mom start
    /etc/init.d/pbs_sched start
    

    At this point you’re good to go. You …

  2. 2009
    Dec
    18

    Unarmed and unharmed

    This is one of those really cool things that I’ve often wondered about: can you really shoot a gun out of an outlaw’s hand? Last week on Mythbusters, Adam and Jamie decided to test it out. Sure, it’s not the kind of thing you’d think would be easy (or safe) — unless you have access to that classic Mythbusters creativity. Their first idea involved a Velcro-like gripping arm to hold the gun, and although it may not be clear just how exactly that compares to a real hand, they obtained some interesting results from comparing the different gripping positions.

    Anyone who’s ever tried to pry an object out of somebody’s hand knows that the easiest way to do it is to twist it to apply stress on the thumb, the weakest point of the grip — not just to hit it as hard as possible. And whenever an object is twisting or rotating, the operational physical principle is torque, the rotational analogue of force. Torque can be calculated from the formula

    $$\vec{\tau} = \vec{r}\times\vec{F}$$

    but in most simple cases, we can identify an axis of rotation and then calculate the torque around …