Compiling and Installing the Globus Toolkit Software on Windows with Cygwin


Scripts Included:

  • gt5.0.2-patch
    • Globus Toolkit 5.0.2 patch to enable compilation using Cygwin (Dr. Peter Li)
  • setupTeraGrid.sh
    • script to set up environment for SSO on TeraGrid

This is a brief guide to compiling and installing the Globus Toolkit software on Windows using Cygwin.

I am using Cygwin 2.721 and Globus Toolkit 5.0.2 under Windows Vista 64-bit.

The patches and command line parameters are originally from Dr. Peter Li at the Salk Institute (his original posts can be found here and here).

Installing Necessary Cygwin Packages

You will need the following packages in order to compile the Globus Toolkit:

CATEGORY --> PACKAGE NAME

Devel --> gcc-core
Devel --> gcc-g++
Devel --> gcc4-core
Devel --> gcc4-g++
Devel --> make
Editors --> vim
Net --> OpenSSH
Net --> libopenssl098
Net --> openssl
Text --> less
Utils --> diffutils
Utils --> patch
Web --> wget

For those who do not know, you can install additional packages to your existing Cygwin installation by running the setup program again. To set up Cygwin (and Console2), see these instructions.

Downloading and Patching the Globus Toolkit

Open Cygwin and go to your HOME directory:

cd

Get the latest source tarball (5.0.2, in my case):

wget http://www.globus.org/ftppub/gt5/5.0/5.0.2/installers/src/gt5.0.2-all-source-installer.tar.bz2

If this doesn't work, go to http://www.globus.org/toolkit/downloads/ and download it manually.

Unpack it (this will take a bit):

tar -xvf gt5.0.2-all-source-installer.tar.bz2

We need to apply a patch first (written by Dr. Peter Li from the Salk Institute). Normally, I would list the patch in the instructions, but since patch is picky about formatting, I would suggest you just download it here. Alternatively, just use wget:

wget http://internet2.binghamton.edu/teragrid/docs/gt5.0.2-patch

Once you have the patch, apply it:

patch -i gt5.0.2-patch --verbose -p0

If you see any errors, email me at intrnt2@binghamton.edu.

Compiling the Globus Toolkit

Now we are ready to compile. BE WARNED: this will take a VERY, VERY, VERY LONG TIME. It took me somewhere around 6 to 8 hours for me to compile this on a respectable laptop.

In either event, we are going to install everything into $HOME/globus, so:

makedir $HOME/globus
cd gt5*-installer
./configure --prefix=$HOME/globus --with-buildopts="-verbose -static=1"
make gsi-myproxy gsi-openssh gridftp

If this should fail near the end, try just recompiling the last one:

make gridftp

If it fails earlier, try again:

make gsi-myproxy gsi-openssh gridftp

If you get conflicts with sys/types.h and winsock.h, try deleting your $HOME/globus folder and trying again:

rm -rf $HOME/globus
make clean
./configure --prefix=$HOME/globus --with-buildopts="-verbose -static=1"
make gsi-myproxy gsi-openssh gridftp

If it still fails, email me at intrnt2@binghamton.edu.

Finally, add the Globus bin directory to your path:

export PATH=$HOME/globus/bin:$PATH

You can get rid of the source directory and tarball when you're done. The installed software takes about 91MB of space.

Logging In

Let us assume that the Globus Toolkit is installed in $HOME/globus. The following script will set up your environment for logging into TeraGrid sites:

#!/bin/bash

export LD_LIBRARY_PATH=$HOME/globus/lib

GLOBUS_LOCATION=$HOME/globus
MYPROXY_SERVER=myproxy.teragrid.org
MYPROXY_SERVER_PORT=7514
export GLOBUS_LOCATION MYPROXY_SERVER MYPROXY_SERVER_PORT
. $GLOBUS_LOCATION/etc/globus-user-env.sh

echo "Cleaning up old proxy information..."
grid-proxy-destroy
unset X509_CERT_DIR
unset X509_USER_CERT
unset X509_USER_KEY
unset X509_USER_PROXY

myproxy-logon -T -l $1

export X509_CERT_DIR=$HOME/.globus/certificates
export X509_USER_CERT=`(grid-proxy-info -path)`
export X509_USER_KEY=`(grid-proxy-info -path)`
export X509_USER_PROXY=`(grid-proxy-info -path)`

You can download this script here. To use it, you would call the following with your TeraGrid portal username:

source setupTG.sh <username>

After entering your TeraGrid portal password, you should be able to log into any TeraGrid site using gsissh:

gsissh tg-login.ranger.tacc.teragrid.org

Transferring Data

You will also have access to globus-url-copy, so you can do large data transfers using the GridFTP protocol:

export POPLE_HOME=`gsissh tg-login.pople.psc.teragrid.org 'cd $HOME; pwd'`
export RANGER_HOME=`gsissh tg-login.ranger.tacc.teragrid.org 'cd $HOME; pwd'`
globus-url-copy -vb -fast -stripe -tcp-bs 8M -p 8 file://$POPLE_HOME/gaussian/water.cube gsiftp://gridftp.ranger.tacc.teragrid.org//$RANGER_HOME/water2.cube

Here is an explanation of the parameters:

-vb = display bytes transferred and average performance

-fast = Recommended when using GridFTP servers. Use MODE E for all data transfers, including reusing data channels between list and transfer operations.

-stripe = enable striped transfers on supported servers

-tcp-bs <size> = specifies the size (in bytes) of the TCP buffer to be used by the underlying ftp data channels 8M is a good value, although technically the best is determined by: bandwidth in Megabits per second (Mbs) * RTT in milliseconds (ms) * 1000 / 8 RTT = roundtrip time it takes a packet to get from the source to the destination (use ping to determine this)

-p <count> = specifies the number of parallel data connections that should be used

Conclusion

This document has outlined how to install (and briefly how to use) the Globus Toolkit softare under Windows using Cygwin. If you have any questions or comments, please don't hesitate to contact me at intrnt2@binghamton.edu.


Last updated December 7, 2010