All entries for Friday 15 December 2023
December 15, 2023
Gnu Parallel without root
A quick post for future reference: GNU parallel, the command line app to allow parallel running of multiple copies of a program etc, is designed to work just about anywhere. This means we can install it without needing any root access.
DISCLAIMER: This is intended for something like a managed laptop with Linux on. If you are working on shared systems, anything run through parallel would count as computationally intensive - please pay attention to where you are allowed to run such work! Also, check the package or module system for an existing parallel install! It's likely to exist already!
Here's the recipe:
# Do all this in our home directory. If you change to somewhere else, replace $HOME with that path where it occurs
cd $HOME
# Grab that latest source
wget https://ftp.gnu.org/gnu/parallel/parallel-latest.tar.bz2
# We could check the signature of this now, but since we'd grab the sig from where we grabbed the file, there is no point...
# Create an install directory called pllel - change this if you like
mkdir pllel
# Unpack and change to that folder
tar -xvf parallel-latest.tar.bz2
cd parallel-latest
# Configure to install into the directory we just created
./configure --prefix=$HOME/pllel
make
make install
# Now we add the location of the parallel program to our path
# Putting it first (before we repeat $PATH) means it will take priority over any other program called parallel
export PATH=$HOME/pllel/bin:$PATH
# Test everything
parallel echo ::: A B C D
Now, if you want this to be available in all your shells or sessions, you can add the export PATH line to your .bashrc, .bash_profile etc and then you don't have to do that every time.