Athena (RSS)

Athena

Parallel DynaMIT runs on Athena

For a long time I've been searching for more machines to do experiments on parallel simulation for my case studies. Our lab does not have that much PCs, and some of them are heavily used by other researchers. I tried to contact MIT academic computing for help,  but my emails have been ignored by far. I keep looking, and finally here comes a chance: the Athena clusters.

Athena clusters have many unused machines during this week, the spring break. On Monday, after some trial-and-error efforts, I managed to make my parallel DynaMIT run on Athena. If the results are good, I might be able to finish my case studies in time.   It is not as convenient as  doing experiments in the lab -- one cannot do this remotely; I need to keep an eye on the machines while DynaMIT's running. Anyway, this is better than nothing.

posted by wenyang with 0 Comments

MIT Email quota has been doubled from 500 MB to 1 GB!

I was surprised that I did not received any annoying message like "90%  of your email quota has been used", having found several huge emails (each is 9+ MB) in my INBOX  since last night.   Then I wondered "what is wrong about my email account today".  After doing a little search, I realized that there's nothing wrong, but something right: IS&T has finally doubled the default Email Quota to 1 GB!

Details can be found at http://web.mit.edu/ist/topics/email/quota-upgrade.html (posted on 09/06/2006). The original quota when I came here was 250 MB.
posted by wenyang with 0 Comments

Spamscreening

I once read about some document about MIT's email system. It says it helps the spam filter to better classify spam mails if we can save the spam mails from our INBOX to Spamscreen.  It mentions something like a "training" mechanism: the anti-spam system will learn from the existing mails in our Spamscreen filters.  Although I was not sure about how helpful it would be, I did try my best to save every unfiltered spam message into my Spamscreen folder.  Anyway, there was not much spam to my address ... until recently.

In the past few months, unfortunately, things changed: I have been receiving much more junk mails than before. I know, though, that's mainly because I have subscribed to quite a few email lists since the end of May.  As it takes (maybe just a little bit) more effort to save mails to Spamscreen than simply delete them, I started to ask myself: does it really help to save them to Spamscreen? 

So I went to my Spamscreen folder to see what had been filtered.  To my surprise, I noticed many spamming messages that used to pass through the filter were caught in the last seven days. (I don't have samples prior to last week as I set a rule to delete messages older than seven days in the Spamscreen.)   This finding, by itself, is not conclusive, since MIT IS&T seems to have upgraded (or planning to do so?) their spam filtering system lately (I saw some news about spam filtering on The Tech last week, but have forgotten the details). Anyway, it is still a good sign. 

Therefore,  I think I am still going to save spam mails to the Spamscreen folder.
 
posted by wenyang with 0 Comments

Athena Printing

Answers to FAQ: take a look at http://web.mit.edu/answers/printing/.

  • sending a file to a printer: lpr -Pprintername filename
  • print several files at the same time: lpr -Pprinter file1 file2 file3 ...
  • check if the printer is working and to check if your file has been printed: lpq -Pprintername
  • check the complete list of printer locations, with their status and number of jobs: cview printers
  • remove their own printing job: lprm -Pprintername ## (where ## is the job number)
  • remove all jobs on that printer: lprm -Pprintername -
  • print PDF files directly: acroread -toPostScript < filename.pdf | lpr (add acro, if necessary)
  • print on both side of the paper: lpr -Pprintername2 ...
  • printer hardware problems, send mails to "hotline # mit.edu"
  • Printing SELECTED pages of a POSTSCRIPT file: psrev
  • print 2 pages of a ps file per printed page: psnup -2 filename.ps | lpr -Pajax
  • print 2 pages of a text file per printed page: enscript -2r -Pprinter filename

No quota for printing so far: The print quota system is not currently in service. Pages that you print will not count towards a print quota. However, the print servers do log printer usage, and abusing Athena print resources is a violation of the Athena Rules of Use.

posted by wenyang with 0 Comments

How to FORWARD all the mails you already have in Athena (REDISTMAIL)

Yes, I managed to re-sent mails of my mit.edu mail box to another mail address, while keeping (hopefully) most mail header information unchanged. This is useful because (1) the mit mail box is too small (250M) if you don't want to delete your mails, and (2) we can use Gmail or whatever email accounts to backup and manage our email...

The following are the steps I used to send all the mails in a folder of my mit mail to Gmail.

(Assume '%' is the command prompt in Athena, and characters in bold face are the commands you have to input.)

  1. % pine (ENTER, of course...)
  2. In pine interface, goto Folder-Collection < OLD Mail MH >
  3. Press 'A' to add a new sub-folder, e.g., Badminton
  4. Enter an original folder in Folder-Collection < MIT Mail >, say Badminton_mit
  5. Press ';' and then 'A' to select all mails (You might have to enable this command in pine SETUP)
  6. Press 'A' and then 'S' to apply SAVE command to all the selected mails
  7. Press down-arrow to switch folder to < OLD Mail MH >, and type Badminton, then press ENTER.
    Now all the messages in current folder (Badminton_mit) have been copied to the < OLD Mail MH >.Badminton, and by default these messages are also marked as "deleted" with a 'D'.
  8. (Optional) If you don't want to delete all these messages, press 'A' and then '*' to apply FLAG command, and then press down-arrow three times to select the "Deleted" entry, and press 'X' twice to unmark all the delete-flags.
  9. Quit pine.
  10. Check the directory: ~/Mail/Badminton, your mails should be there (files named as consecutive numbers).
  11. % add consult (if you have not yet done so)
  12. % redistmail xxxx@gmail.com /mit/your_athena_username/Mail/Badminton/

It will pause appropriately when sending so as not to flood the mail hubs. So be patient if you have a long list of mails to send...

Note (5/10/2005):
  • Make sure you know what you are doing. Read the referenced article (see below) first.
  • In pine, you can create mh folders.
  • To forward future mails, use chpobox.
Reference:

The "redistmail" program is designed to forward the contents of a single mail folder to the given address. This uses the mh "dist" command, so the headers will not be modified; a single Resent-To: line will be added.

Syntax:
athena% add consult
athena% redistmail address@wherever.net foldername

Give the foldername as you would specify it to mh mail; i.e. inbox, or /var/tmp/mymail.

Flags: -h will display this help message.
-n will cause redistmail to tell you what it would do, but not
actually send any mail.

The redistmail process will use appropriate pauses when sending so as not to flood the mail hubs; please do not attempt to circumvent these pauses, lest the postmasters become cranky.

Note that this only works with mh folders, not RMAIL files or Netscape mail files or any other format.

Last updated: 10/25/99
http://web.mit.edu/answers/mail/mail_redistmail.html

(Provided by MIT IS&T Stock Answers)
posted by wenyang with 0 Comments

How to use Chinese characters in Athena: (5) Install Chinese Input Method

Note: Fcitx and SCIM are (what I believe) popular Chinese input methods for Linux. They are maintained actively and have been updated for several times since last year. Therefore their features may have already been a little different from what I describe here. For latest news and detailed document, please refer to their homepage.

I did not manage to install an early version of SCIM successfully in Athena. I have forgotten the exact reason, but I guess either it need to copy some files to a folder which I do not have write access right, or I have not configure it properly. The result was that after the installation I cannot bring up the input banner.

Then I turned to Fcitx. Through proper configuration, it can be installed to a local folder. And then by changing the language environment, I did make it run.

Installation of Fcitx is not difficult. Read the online documents for instructions on installation, download the source files, configure, compile (Make), and install it to some place in your home direcotry (e.g., ~/fcitx).

It's not suggested to use the RPM version directly, because we need root permission to install RPM.

After installing fcitx, we need to make some setting on the locale for it to run. I use the following script:

#!/bin/bash
LANG=zh_CN.gb18030
LC_ALL=zh_CN.gb18030
LC_CTYPE=zh_CN.gb18030
KDE_LANG=zh_CN.GB18030
export LANG LC_ALL LC_CTYPE KDE_LANG
export XMODIFIERS=@im=fcitx
fcitx &
#metacity&
#exec wmaker
#exec kde
#exec gnome-session
$1
killall fcitx

Save it as cfcitx.sh, add execute permission:

chmod u+x cfcitx.sh

Then we can use this script to run those programs in which we want to input Chinese characters. For example:

cfcitx gedit&

Here gedit is an editor that supports UTF-8, which helps to display Chinese characters correctly.

posted by wenyang with 0 Comments

How to use Chinese characters in Athena: (4) Install TrueType Fonts

If you have TrueType Chinese fonts, you can install them in Athena. Then you will be able to use them in your GNOME desktop, or other X Window system.

Note:

  • Part of the method mentioned here comes from Athena online help consultant, while others come from various sources of internet.
  • This method might work with the Linux version of Athena only. Sun Solaris workstations usually have different settings.

Linux has several mechanisms to utilize TrueType fonts. Depending on how and where you want to use those fonts, you will need to do some or all of the following steps.

  1. First of all, of course, find some Chinese fonts. e.g., SimSun.ttf.

    Unfortunately, sometimes even this turns out to be difficult, since we do not have a "official" Simplified Chinese font that is free to all. The government of Hong Kong SAR, on the contrary, provides a version of Ming (for ISO 10646) Traditional Chinese font for free download. You can find it here, if the link is still valid.

  2. If you're using them in gtk2 applications you only need to dump those fonts in ~/.fonts as GNOME2 uses fontconfig to deal with fonts. Changes take effect immediately.

    One thing left to ensure: ~/.fonts should be world readable. To check, type

    fs la ~/.fonts/ |grep anyuser

    In the output, if you find (and you would, probably):

    system:anyuser l

    This means only the "list" permission is granted. You need to do:

    fs sa ~/.fonts system:anyuser read

    and you may execute "fs la ~/.fonts/ |grep anyuser" again to check the result. This time you should get:

    system:anyuser rl

  3. To install these fonts for all applications, things are a bit more complicated. After doing the above settings, we need to do the following in your terminal:

    cd ~/.fonts
    ttmkfdir -o fonts.dir
    cp fonts.dir fonts.scale
    (or make a symbolic link)
    mkfontdir

    In some cases, we might need to modify the fonts.dir and fonts.scale manually. Under such circumstance, remember to modify the number in the first line of fonts.dir to match the total number of records.

    • For SimSun.ttf, the fonts.dir created by ttmkfdir has a few lines that start with ":1:" (for NSimsun). They are prone to crashes. Remove those lines.
    • Another example for changing fonts.dir is listed as follows.

    If you need to use bold/italic SimSun fonts, then you may consider doing the following:

    Add the following (32 lines total, so remember to modify the numbers in the first line of fonts.dir):

    simsun.ttf -misc-simsun-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0
    ai=0.2:simsun.ttf -misc-simsun-medium-o-normal--0-0-0-0-c-0-gb2312.1980-0
    ai=0.4:simsun.ttf -misc-simsun-medium-i-normal--0-0-0-0-c-0-gb2312.1980-0
    ab=y:simsun.ttf -misc-simsun-bold-r-normal--0-0-0-0-c-0-gb2312.1980-0
    ai=0.2:ab=y:simsun.ttf -misc-simsun-bold-o-normal--0-0-0-0-c-0-gb2312.1980-0
    ai=0.4:ab=y:simsun.ttf -misc-simsun-bold-i-normal--0-0-0-0-c-0-gb2312.1980-0
    ai=-0.4:simsun.ttf -misc-simsun-medium-ri-normal--0-0-0-0-c-0-gb2312.1980-0
    ai=-0.4:ab=y:simsun.ttf -misc-simsun-bold-ri-normal-0-0-0-0-c-0-gb2312.1980-0
    ai=-0.2:simsun.ttf -misc-simsun-medium-ro-normal--0-0-0-0-c-0-gb2312.1980-0
    ai=-0.2:ab=y:simsun.ttf -misc-simsun-bold-ro-normal-0-0-0-0-c-0-gb2312.1980-0
    sw=1:bw=0.5:simsun.ttf -misc-simsun-medium-r-normal--0-0-0-0-c-0-iso8859-1
    simsun.ttf -misc-simsun-medium-r-normal--0-0-0-0-c-0-gbk-0
    ai=0.2:simsun.ttf -misc-simsun-medium-o-normal--0-0-0-0-c-0-gbk-0
    ai=0.4:simsun.ttf -misc-simsun-medium-i-normal--0-0-0-0-c-0-gbk-0
    ab=y:simsun.ttf -misc-simsun-bold-r-normal--0-0-0-0-c-0-gbk-0
    ai=0.2:ab=y:simsun.ttf -misc-simsun-bold-o-normal--0-0-0-0-c-0-gbk-0
    ai=0.4:ab=y:simsun.ttf -misc-simsun-bold-i-normal--0-0-0-0-c-0-gbk-0
    ai=-0.4:simsun.ttf -misc-simsun-medium-ri-normal--0-0-0-0-c-0-gbk-0
    ai=-0.4:ab=y:simsun.ttf -misc-simsun-bold-ri-normal--0-0-0-0-c-0-gbk-0
    ai=-0.2:simsun.ttf -misc-simsun-medium-ro-normal--0-0-0-0-c-0-gbk-0
    ai=-0.2:ab=y:simsun.ttf -misc-simsun-bold-ro-normal--0-0-0-0-c-0-gbk-0
    simsun.ttf -misc-simsun-medium-r-normal--0-0-0-0-c-0-iso10646-1
    ai=0.2:simsun.ttf -misc-simsun-medium-o-normal--0-0-0-0-c-0-iso10646-1
    ai=0.4:simsun.ttf -misc-simsun-medium-i-normal--0-0-0-0-c-0-iso10646-1
    ab=y:simsun.ttf -misc-simsun-bold-r-normal--0-0-0-0-c-0-iso10646-1
    ai=0.2:ab=y:simsun.ttf -misc-simsun-bold-o-normal--0-0-0-0-c-0-iso10646-1
    ai=0.4:ab=y:simsun.ttf -misc-simsun-bold-i-normal--0-0-0-0-c-0-iso10646-1
    ai=-0.4:simsun.ttf -misc-simsun-medium-ri-normal--0-0-0-0-c-0-iso10646-1
    ai=-0.4:ab=y:simsun.ttf -misc-simsun-bold-ri-normal--0-0-0-0-c-0-iso10646-1
    ai=-0.2:simsun.ttf -misc-simsun-medium-ro-normal--0-0-0-0-c-0-iso10646-1
    ai=-0.2:ab=y:simsun.ttf -misc-simsun-bold-ro-normal-0-0-0-0-c-0-iso10646-1
    simsun.ttf -misc-simsun-medium-r-normal-0-0-0-0-p-0-iso8859-15

    Then we run the following:

    xset fp+ ~/.fonts
    xset fp rehash

    It's also a good idea to restart X environment after those settings, at least you might immediately find out whether it works or not...

    This should work for many programs, hopefully.

  4. But for some programs (yes, it's not over yet), such as those using XTT, we still have to make some efforts, e.g., modify the /etc/X11/XF86Config-4 or /etc/X11/XF86Config (depending on what the system actually uses).
  5. Unfortunately, it's not always possible to do that, because on the public Athena workstations, those files are not in your locker; they are local files on the particular machine you are using. This means we need root permission to access these files. Even we know the root password (using tellme root) and modified those files, they are likely be changed back after we logout. To see which files and what to change, check the Linux forums, LinuxApp board at SMTH BBS, or Google.

Having install SimSun, you will be able to display GBK fontset in your web browser or other program, such as fcitx Chinese input method. Emacs can also be configured to make use of GBK characters.

posted by wenyang with 0 Comments

How to use Chinese characters in Athena: (3) Settings for Emacs (cont.)

Input Chinese characters in Emacs

Once your Emacs can display Chinese characters correctly, you can try to use the MULE (Multilingual Environment) for Emacs to input Chinese characters in Emacs. It can be done in two simple steps:

  1. Set languange environment to Chinese (GB or GBK).

    If you use menu, click Options->MULE->Set Language Environment->Chinese->Chinese-GB

    Note: If you haven't set coding system correctly in your .emacs file, you might need to set it manually at this time.

  2. Toggle input method to a Chinese input method. (You can find it in the MULE menu, too.)

Alternatively, to make these two steps easier, you can write a elisp function in your .emacs file, and bind it to a hotkey, e.g., Ctrl-Space.

(defun my-chinese-mode ()
(interactive)
(set-language-environment 'Chinese-GB)
; or (set-language-environment 'Chinese-GBK)
(set-input-method 'chinese-py-punct)
)

(global-set-key (kbd "C-SPC") 'my-chinese-mode)

Then when you press Ctrl-Space in your Emacs, it will switch to Chinese input method.


Note: You would probably feel the chinese-py-punct input method is quite naive if you, like me, have been used to some "advanced" input methods such as Ziguang Pinyin. Anyway, it provides a simple way to input most frequently used Chinese characters, without installing other software in your system.

Other use of Emacs (BBS client, etc.)

Emacs has a built-in terminal-emulator, in which you can telnet to remote servers that support ANSI colors. "M-x ansi-term" will start a terminal-emulator in a new buffer. This is particularly useful and convenient, if you ever want to connect to a BBS in your Emacs. Of course you have to make sure your Emacs can display Chinese characters properly before you connect to a Chinese BBS site. If you want many BBS-specific features (such as anti-idle), however, you might turn to some "professional" telnet clients. As far as I know, qterm is a good choice under Linux.

For more setting about Emacs, you might want to try the following resources (many other useful documents can be found online, try google!):

posted by wenyang with 0 Comments

How to use Chinese characters in Athena: (2) Settings for Emacs

Display Chinese Characters in Emacs

Usually, if you modify your Emacs config file (i.e., ~/.emacs or ~/.emacs.el) properly, you will be able to display the GB2312 character set, provided that your workstation has at least one Chinese font available. (If you are to check whether the system has provided Chinese fonts or not, try fc-list or xfontsel.)

The following elisp commands will, at least in most cases, enable the display of Chinese characters:

(set-terminal-coding-system 'chinese-iso-8bit)
(set-keyboard-coding-system 'chinese-iso-8bit)
(set-language-environment 'Chinese-GB)
(setq locale-coding-system 'chinese-iso-8bit)
(setq current-language-environment "Chinese-GB")

If your system has fonts that support GBK or GB18030, you may think of using a package called "chinese-gbk" to let Emacs support GBK fonts. If so, instead of setting to language environment to Chinese-GB, you would probably need to set it to Chinese-gbk, by adding the following commands in your .emacs file:

(load "chinese-gbk") ; need to download and install corresponding elisp files
(set-keyboard-coding-system 'chinese-gbk)
(set-selection-coding-system 'chinese-gbk)
(set-keyboard-coding-system 'chinese-gbk)
(set-language-environment 'chinese-gbk)
(setq locale-coding-system 'chinese-gbk)
(setq current-language-environment "Chinese-GBK")

After changing .emacs file, you would need to let Emacs re-evaluate the settings to make it take effect. Either runs the command eval-current-buffer for your .emacs file, or close/kill your current Emacs and then run it again.

Try to open a text file with Chinese characters. If, instead of displaying the Chinese fonts properly, you see a bunch of "boxes", this means either your system does not have an Chinese font available, or your Emacs cannot find a proper fontset to display the characters. Try to specify a useful fontset for your Emacs. For example, in the Linux version of Athena, if SimSun and Ming (a Traditional Chinese font) are available, you can use:

(if (not (member '("-*-tahoma-normal-r-*-*-16-*-*-*-c-*-fontset-chinese"
. "fontset-gbk") fontset-alias-alist))
(progn
(create-fontset-from-fontset-spec
"-*-tahoma-normal-r-*-*-16-*-*-*-c-*-fontset-gbk,
ascii:-*-*-medium-r-normal-*-16-*-*-*-*-*-iso8859-1,
chinese-gb2312:-*-simsun-medium-r-normal-*-16-160-*-*-*-*-gb2312*-*,
korean-ksc5601:-*-medium-r-normal-*-*-*-ksc5601*-*,
chinese-cns11643-5:-*-simsun-medium-r-normal-*-16-160-*-*-*-*-gbk*-0,
chinese-cns11643-6:-*-simsun-medium-r-normal-*-16-160-*-*-*-*-gbk*-0,
chinese-cns11643-7:-*-simsun-medium-r-normal-*-16-160-*-*-*-*-gbk*-0,
chinese-big5-1:-*-Ming(for ISO10646)-*-*-*-*-16-160-*-*-*-*-big5*-*,
chinese-big5-2:-*-Ming(for ISO10646)-*-*-*-*-16-*-*-*-*-*-big5*-*" t)
)
)

(setq default-frame-alist
(append
'((font . "fontset-gbk"))
default-frame-alist))

posted by wenyang with 0 Comments

How to use Chinese characters in Athena: (1) Foreword

MIT provides for its community a powerful computing environment: Athena.

As a non-native speaker of English, sometimes I still feel it necessary to use Chinese characters -- to read mails (and reply), to surf the internet with a browser (or hang around the BBS), or to take notes -- when I use Athena.

Unfortunately, most Athena workstations, which use either Red Hat Linux or Sun OS (Solaris), have (by default) poor support for the use of Chinese characters. None of them provides a easy-to-use tool to setup an environment that enables the display and input of Chinese words.

As I myself am a novice of Linux, it is not easy for me to have a deep insight of this problem. Therefore I began to search a solution from the internet. I found a few potential tricks, then I tried them. Some of them work! Here is a brief summary:

  • Most Athena workstations have a built-in Chinese font which has a limited supports of the GB2312 character set. Some programs (e.g. Mozilla) can make use of this font. But GB2312 is somewhat outdated, since many commonly used characters are missing in this national standard, which was firstly accepted in the year of 1980.
  • The one editor, GNU Emacs with MULE (Multilingual Environment) can be config to provide a primitive (but good enough!) way to view and input Chinese characters.
  • By installing new fonts and do some configurations, we will be able to use the GBK (or even GB18030) character set, both in console and in X environment.
  • We can install a Chinese input method for Linux, such as fcitx, which works as good as, if not better than, the UNISPY (ZiGuang PinYin) in MS Windows.
posted by wenyang with 0 Comments