Charm++ 5.4 (Release 2) Copyright (C) 1989-2000 Regents of the University of Illinois Now you can compile charm++ under Windows9x/2000/NT with Cygwin. Note: This version of cygwin is still under testing. Check the FAQ at end of this file for more help. Setup and Compilation =========================== To compile charm on cygwin: 1. install cygwin from: http://sourceware.cygnus.com/cygwin with inetutils, openssh, w32api packages and gcc of course. Remember to choose default file type as "unix" at the beginning of cygwin installation. 2. before compiling, make sure you have /bin/sh correctly installed, otherwise make a link from /bin/bash.exe: ln -s /bin/bash.exe /bin/sh.exe compile charm++: ./build charm++ net-cygwin 3. setting up running environment: There are several ways to do this, using rsh or ssh. Under Windows2000/NT, ssh is recommended, I once had difficulty to have inetd working. Starting from Charm++ version 5.4, ++local option is added to start node programs directly on your desktop machine. You no longer need rshd or sshd to start charm program on local machine. This is for testing purpose or small job run though, for best performance, launch one process per processor with rsh daemons. Starting from Charm++ V5.4R2, you can also run Charm++ program in standalone mode without charmrun. ** RSH method ** setup /etc/inetd.conf and /etc/services to start rshd, Here is an example of /etc/inetd.conf: ### shell stream tcp nowait.1000 root /usr/sbin/in.rshd in.rshd ### and an example of /etc/services: ### shell 514/tcp cmd ### before running charm program, start 'inetd' first to get rshd running. Run debug mode 'inetd -d' to see the debug information. ** SSH method ** Check /etc/passwd, make sure your home directory is correct. (it may be empty there!) run "/usr/bin/ssh-config" to setup all ssh config files. Since openssh version 2.5.1p2, you have to run /usr/bin/ssh-host-config for the first time to generate global config files and server keys; and run /usr/bin/ssh-user-config creates the private and public keys for a user. You may need to modify /etc/sshd_config or /etc/ssh_config for your needs. Setup ~/.shosts, or add your public key to your ~/.ssh/authorized_keys to allow you to login without password authentication. now you can start sshd and run charm programs. To tell Charmrun to use ssh instead of rsh(default), you need to add ++shell option in ~/.nodelist file: group main ++shell /bin/ssh host localhost ** run only on local machine with ++local ** This allows a user to run charm program on his/her desktop machine for testing purpose or running a small job without the hassle of setting up any rsh deamons. To launch a charm++ program on your local machine, use "++local" option via: ./charmrun +p4 ++local ./pgm ** run in standalone mode ** You can run Charm++ program without charmrun after Charm++ V5.4R2. Simply type executable and command line options: ./pgm This will run only one copy of program locally. 4. If you have any problem with it, please check the FAQ below for help. Let me know if it works or not by sending email to (ppl@uiuc.edu). FAQ ============== * Why would I use net-cygwin version? First cygwin is free, it comes with free gcc compiler, cvs and openSSH. You don't need expensive Visual C++ compiler to get work done. For unix fans, it is also a good idea to just turn your windows box to a unix workspace, and learn and run charm++ program uniformly on all platforms. * How to get your latest version of Charm++? You can use anonymous cvs login to checkout the latest version of charm. (It may not be the latest stable version though) 1. login the cvs server: cvs -d :pserver:checkout@thrift.cs.uiuc.edu:/expand6/cvsroot login when CVS passwd is prompted, just type . 2. checkout charm cvs co -P charm You should get latest charm source tree. 3. logout the cvs server cvs logout * Problem: Charm++ build script stops when it compile "ckfutures.ci", with error message: "Syntax error at line 1: parse error" This happens when the .ci files have strange characters like '^M' at end of each line. Don't use WinCVS to checkout charm because it will append '^M' for each line. Use the cvs that comes free from cygwin. After charm++ version 5.4, this bug is fixed. * Problem: I got a runtime error "CthCreate failed to create fiber!". net-cygwin uses Win32 Fiber in its user threads implementation. However, there is a limit upon the number of Fibers you can create at one time in the w32api of cygwin. The current limit (as I tested) is between 50-52. You have to reduce the number of processors or the number of charm++ threads you create in the program to run the program under cygwin.