ANL FAQ
From Java CoG Kit
Computers
Kronos
To use Kronos::
- Ensure you are on ANL's private network (i.e. use the VPN)
- Go to the following URL http://www.inside.anl.gov/resources/business_systems/kronos.html
- Follow their online instructions
Cog Wiki Questions
Q. I lost my changes in the Wiki for some reason it tells me someone else is editing the page. What do I do?
As we have so many people being able to edit the wiki at the same time the likelyhood for conflicts is high. If you detect a conflict coordinate with your peers.
Q. I do not find the question or an answer to it in this FAQ?
Please add your question, we try to answer them once we know about it.
Q. I am confused with so many versions of the Globus Toolkit and versions of the CoG Kit.
There are far fewer CoG Kit versions than Globus releases.
Interns
Q. What do I do first when I join ANL as an intern?
Pick up your id from the visitor reception center and goto the orientation program. ANL orientation will be on June 1st and June 2nd mornings. MCS division will conduct its individual orientation on June 1st afternoon.
Q. Will I be given any training? When do I setup the account?
Not much. We expect you to come prepared. Apply for your accounts before coming here. During orientation you will be given two sealed envelopes: one containing the ANL domain account and the other containing password for MCS workstation and windows accounts. Reset your password when you login the first time.
Q. How and when do I start?
You start by meeting with your supervisor.
Q. What forms do I have to turn in?
You will be given a lot of paperwork during the orientation to be submitted to different divisions. Keep track of what needs to be turned in and turn it in time.
Q. How do I apply for a Certificate so I can use the resources at ANL to run Grid software?
1. Get a valid mcs account. Apply for a 'personal DOE certificate' at http://www.doegrids.org/. Select virtual organization 'ANL' and sponsor 'Gregor von Laszewski'. Follow the browser specific steps provided in the application page to save the keys. You will get an email in 2 or 3 days.
2. Download the certificate following the link mailed to you. Use the same machine and browser you first used to fill the application.
3. Extract the private and public keys using commands given in bottom of the doegrids applicaiton page.
4. Create .globus directory in your homedirectory and copy the userkey.pem and usercert.pem here.
5. Send Charles Bacon (bacon@mcs.anl.gov) an email requesting addition to the gridmap file. He will want the subject line (or Distinguished Name [DN]) from your certificate to add you to the gridmap.
6. If there is any delay in obtaining a DOE certificate please call CIS Helpdesk, 630-252-9999 (opt 2), and either Denice DiGiacomo or Elsie will expedite your request. Also, inform Gregor about expediting your request.
7. You can find the resources (grid) you can use from The Grid Testbeds link on the New wiki.
Q. Where can I find information about how to use computers at ANL?
Q. How do I submit jobs to Grid with cogkit?
Software Prerequisites
- JAVA - Download the latest version of java. If you are using cygwin/Linux then download and set the JAVA_HOME environment variable in your .bashrc file for bash shell and .cshrc for tcshell.
- Apache ANT - Download the latest version of ant and install using directions from the installation guide. Set the ANT_HOME environment variable also in your .bashrc or .cshrc.
Other Prerequisites
- A DOE certificate. Details of how to apply have been provided in this FAQ.
- An account on the ANL machines. You need to get a windows account also if you need to log onto the VPN for accessing ANL network.
- Need to be added to the gridmap file for the machine that you want to submit jobs to[It needs to have the GlobusToolkit [GT] installed on it. Take a look at the Grid Testbeds page on new Wiki for the port nos.]
- Firewall needs to be disabled or allow some ports in. Details are in the FAQ.
Process
- Download the latest version of cogkit from cvs. Details are in this FAQ.
- Do a 'ant dist' to build the project from src/cog directory. Goto cog/dist/cog-[version no.]/bin and run cog-setup or cog-setup.bat if using cygwin/Windows.
- You will be mailed a certificates.tar file which you need to download and add to your cog.properties while running cog-setup.
- If you have problems building cog, contact Kaizar at amin@mcs.anl.gov. Run the launchers in the modules/core/dist/cog-[version no.]/bin folder.
- To run jobs you need to use cog-job-submit or cog-job-submit.bat accordingly which are located in the folder mentioned above. The exact syntax and available options for this command can be obtained by just typing cog-job-submit without any arguments. A sample job-submission for both Linux and Windows is as shown below.
Linux prompt: ./cog-job-submit -s plussed.mcs.anl.gov:4000 -p gt4.0.0 -e /bin/date -stdout "cog-out" Windows Command Prompt: cog-job-submit.bat -s plussed.mcs.anl.gov:4000 -p gt4.0.0 -e /bin/date -stdout "cog-out"
The above command will submit the executable /bin/date to be run on plussed which runs GT version 4[which has been indicated by the provider setting] and direct the output to the file "cog-out" which is located on your home directory on plussed when local redirection has not been applied using the -r flag. However, note that local redirection is not possible at this time for the gt4.0.0 provider.
- If you need help contact Mike/ Kaizar/ Deepti. You will be given a demo of these steps.
Q. How do I read e-mail from outside ANL?
See the help information at http://www.mcs.anl.gov/computing. You have three options using ANLs secure imap, port forwarding with ssh or use VPN.
Port fowarding can be done as follows:
ssh <your mcs unix login name>@$terra.mcs.anl.gov -L 143:imap.mcs.anl.gov:143 -L 25:smtp.mcs.anl.gov:25
In the mail program you use than localhost
However ANL has upgraded their system and you can now use ssh directly with imap.mcs.anl.gov and mailgw.mcs.anl.gov. This is now the prefered way.
Q. I hate Latex and want to use Word, can I do this?
Yes, you can. Latex is well suited for writing large documents. Word is for large documents unstable, even the newest version. However word has the advantage of a good spell checker, a reasonable grammar checker, and a very good feature called track changes. Maintaining bibliographies is more difficult. In the past when I used endnote, it destroyed all my contents. Hence all bibliographies will be maintained in bibtex. See the the note about deliverables within this Wiki on how to write a report. Do not use numbers for bibliography entries, use labels.
I found that the following tools work well:
- To edit smaller text you can use Word (I use it also for editing my .tex files to make use of the spell checker)
- To edit bibtex files use xemacs, it has a special menu that makes this trivial. Always use xemacs for validating and reformatting your bibtex files
- Alternatively try Jabref (see details on reports). I know it has a couple of errors, but should be quite usable
Q. I find that my Laptop I have at home is more powerful than the thin clients I have at ANL?
We encourage you to use your own Laptop. Please communicate to Judy (stickels@mcs.anl.gov) what paperwork you should fill out once you are at ANL. We have wireless throughout the building.
Refernce Cards
See the [wiki:CoGKit/TechWatch Technology Watch page]
Cygwin Tricks
Q. How do I create a cygwin shortcut in Windows that has a better terminal?
- Make sure you have rxvt installed with cygwin.
- Create a shortcut with
C:\cygwin\bin\rxvt.exe -sl 2000 -sr -title rxvt -e bash --login -i
Q. How do I set up ssh-agent in cygwin?
I recommend the use of keycahin that is a convenient wrapper to ssh-agent
Usually all you need to setup in your .brofile or .bash_profile file is
keychain ~/.ssh/id_rsa
. ~/.keychain/${HOSTNAME}-sh
Q. I want to give Latex a try, but I do not have a linux machine?
1. Latex is installed on most workstations
2. You can install it easily on your windows machine following these steps:
1. download cygwin, when starting the setup.exe click on almost everything, but disable the apache downloads and everything that has to do with tetex. Do a local download first and than install form the downloaded version.
2. download xemacs and do a native install and configure the UNIX style linefeeds.
3. download miktex
4. download ghostscript
5. download gsview
6. open a rxvt terminal (see other FAQ) and type in pdflatex yourtext.tex where yourtext.tex is something like
\documentclass{article}
\begin{document}
put your text here
\begin{verbatim}
In case you do not know how to do formatting, you can always
print things in ASCII with verbatim
\end{verbatim}
\end{document}
Q. What is a good login script?
# User dependent .bashrc file
# Don't put duplicate lines in the history.
export HISTCONTROL=ignoredups
# Some example alias instructions
alias less='less -r'
alias rm='rm -i'
alias ls='ls -F --color=tty'
alias dir='ls --color=auto --format=vertical'
alias vdir='ls --color=auto --format=long'
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
# Some CVS stuff
# most will only use ccvs
alias cmcscvs='cvs -d <username>@cvs.globus.org:/home/dsl/gregor/cmcs'
alias ccvs='cvs -d <username>@cvs.globus.org:/home/dsl/cog/CVS'
alias pcvs='cvs -d <username>@cvs.globus.org:/home/dsl/gregor/proposal'
alias gcvs='cvs -d <username>@cvs.ogce.org:/cvs/gsfl'
alias ncvs='cvs -d <username>@cvs.cogkit.org:/cvs/cogkit'
alias term='rxvt -e bash'
alias port='ssh <username>@terra.mcs.anl.gov -L 143:imap.mcs.anl.gov:143 -L 25:smtp.mcs.anl.gov:25 '
# You need to install them
export JAVA_HOME=/cygdrive/c/j2sdk1.4.2_02
export ANT_HOME=/cygdrive/c/ant-1.5.4
keychain ~/.ssh/id_rsa
. ~/.keychain/${HOSTNAME}-sh
Q. How do I do port forwarding under cygwin
use the .bashrc script from above and place it in your cygwin /home/<usrename>
use the port command in a bash
Q. How do I do file permissions under cygwin
You can add "ntea" to CYGWIN variable in the cygwin.bat file in the cygwin root directory, which tends to be C:\cygwin. For example I have:
set CYGWIN=tty ntea
in C:\cygwin\cygwin.bat. This will allow more Unix like behavior.
Q. Why can't I get Java to recognize my CLASSPATH environment variable or -classpath command-line argument? (Or other path or file arguments?)
Java is a Windows program, and as such, doesn't recognize Cygwin-specific paths. So /cygdrive/c/foo/... is useless to java.exe. If your Java software uses file paths, you'll need to convert them to Windows-style path names using the cygpath tool included with Cygwin.
cygpath takes a UNIX-style path as an argument and returns a Windows-style path. Here's an example:
$ cygpath -wp /cygdrive/c:/cygdrive/c/classes c:\;c:\classes
So, when calling Java programs (say, from within shell scripts), you'd need to write your command-line like this:
java -classpath `cygpath -wp $CLASSPATH` [arguments]
Creating a `TeraGrid` Account
In case you are required as part of your project to work on the !TeraGrid, you can obtain an account through the following process
1) Ask Gregor for permission and ask which resources of the TG you should apply for. In most cases the resources at ANL/UC are sufficient.
2) Use the form located at: http://accounts.teragrid.org/add_user.html and use the following information to complete the application
PI Name: Gregor von Laszewski PI Phone: 630 252 0472 PI Email: gregor@mcs.anl.gov `TeraGrid` Project Number: TG-MIP050000T Requested machines: UC/ANL IA64, UC/ANL IA32
3) It is strongly recommended that you read Tera Grid User Information for more information.
Remote Desktop Software
At ANL the Microsoft Remote Desktop software gives a message saying that the limit on number of connections allowed on the machine has been reached. So, logging in is not possible. The explanation to this is that : This is a flaw in the remote desktop. Your machine will have to be rebooted to clear the error. Please make sure when you are done with the remote desktop that you log out of your session. If a session dies it ties up the ability for more sessions to connect in the future.
CVS checkouts
Usually, the cvs checkouts can be achieved by using
cvs -d:pserver:anonymous@cvs.cogkit.org:/cvs/cogkit login cvs -d:pserver:anonymous@cvs.cogkit.org:/cvs/cogkit checkout -r cog_4_0_a1 src/cog cvs -d:pserver:anonymous@cvs.cogkit.org:/cvs/cogkit checkout -r cog_4_0_a1 src/jglobus
For some distributions, you may need to do the following if the above does not work.
export CVS_RSH=<locationwhere yourssh is> cvs -d :ext:<yourusername>@cvs.cogkit.org/cvs/cogkit co src/cog
You may need to use :ext: even if CVS_RSH is set in your .bashrc file[or .cshrc for tcsh].
