4 Copyright (C) 1989-2004 Regents of the University of Illinois
6 You can compile charm++ under Windows9x/2000/NT with VC++ plus Cygwin.
7 Cygwin are ports of the popular GNU development tools and utilities for
8 Windows 9x/2K and NT, which emulates a UNIX environment under Windows.
10 Note that since November 2005, Windows98 is not supported with VC++.
11 Support for WindowsNT/XP is improved to take advantage of the creation of
12 symbolic link under WindowsNT. In addition, the Microsoft Visual Studio Express
13 edition (which is free for download and registeration) doesn't include 64-bit
14 compiler and other 64-bit tools, therefore, to build charm++ for 64-bit windows, a standard Microsoft Visual Studio is required.
16 Please read the FAQ at end of this file.
20 ===========================
21 (Note: building charm++ for 64-bit windows follows the exact way of building
22 for 32-bit windows. Therefore, changing "win32" to "win64" in the following
23 paragraphs gives you the guide to build charm++ for 64-bit windows.)
25 To compile charm with VC++:
26 1. install cygwin from: http://sourceware.cygnus.com/cygwin
27 Remember to choose default file type as "unix" at the beginning of
30 2. Start a Cygwin's Bash Shell window, type "cl" to make sure VC++ compiler
31 command line mode is correctly set. If it is not correctly set, you need to
32 run the VCVARS32.BAT, or vcvarsall.bat (after VC++ 8.0) at Windows startup
34 VCVARS32.BAT can be located in your VC++ install directory, usually at:
35 /Program Files/Microsoft Visual Studio/VC98/Bin
36 For Microsoft Visual C++ 8.0 and beyond, it is usually located at:
37 C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat
39 Note that VCVARS32.BAT, or vcvarsall.bat (a DOS Batch) cannot be executed
40 under Bash Shell, you have to:
41 for Win8x: put it into AUTOEXEC.BAT;
42 for WinNT/WindowsXP/Vista: you have to call VCVARS32.BAT in cygwin.bat
43 which is the target of the Cygwin icon on your desktop.
44 For example, if cygwin is installed under c:\cygwin,
45 modify c:\cygwin\cygwin.bat to something like:
50 call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall"
58 NOTE, for VC++ 64 bit, change the above line to:
60 call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall" amd64
62 3. This step is optional if you have installed Microsoft Visual Studio under
63 the following (default) location:
64 /Program Files/Microsoft Visual Studio 8\VC
65 In case it is not at this directory, edit the following (text) files to
66 modify VCC_DIR and SDK_DIR to point to your visual studio c++ and
67 Microsoft SDK directories:
68 src\arch\win32\unix2nt_ar
69 src\arch\win32\unix2nt_cc
71 4. Now you can compile Charm++ like Unix, for example:
73 ./build charm++ net-win32
75 this will build all Charm++ executables under net-win32/bin and all libs
80 Compile and Run Charm++ Programs
81 ======================================
83 1. After Charm++ compilation is complete, you can try some sample programs under
84 net-win32\pgms. For example,
85 cd net-win32/pgms/charm++/megatest, and type "make",
86 it will invoke Charm++'s "charmc"(VC++ wrapper) to compile the test
87 programs and generates an executable "pgm.exe" and a charm++'s parallel
88 run utility program - "charmrun.exe".
89 Now you have two choices of running the executable:
90 (1) locally on your desktop, using:
91 ./charmrun +p1 ./pgm ++local
92 this will fork one copy of node program on your local machine. You can
93 choose using more than one virtual processors, e.g. using +p3 option.
94 Starting from Charm 5.4R2, You can also run, simply type executable and
97 This will run only one copy of program locally.
99 (2) run in parallel across machines:
100 In this case, you need to write a .nodelist file under your home
101 directory(~) in bash terminal, here is an example:
107 Next, you need to start charmd.exe, which is under net-win32/bin on
108 all the nodes as listed in the .nodelist file.
109 Now run the Charm++ program, for example:
113 For details of Charm++ compilation options and charmrun comman line options
114 explanation, please check the manuals on charm.cs.illinois.edu web site manual
116 If you have any problem or suggestion, please let me know by sending
117 email to (charm@cs.illinois.edu).
125 1. I don't like Cygwin, can I compile Charm++ without Cygwin?
127 Yes, there is an un-documented way to compile Charm++ under MS-DOS windows
128 with VC++ and nmake. However, this is only occasionally maintained and not
129 guarranteed to always work.
131 1 open a MS-DOS windows, cd to Charm++ directory, and mkdir net-win32\tmp;
132 2 cd to net-win32\tmp, copy Makefile.win32 from
133 charm\src\Common\scripts\Makefile.win32 to current directory;
134 3 type: nmake /f Makefile.win32
135 4 To compile Charm++ programs, see the Makefile.win32 examples under
136 net-win32\pgms\charm++\megatest\Makefile.win32
137 The command to use is: nmake /f Makefile.win32
138 Basically you need to specify all the charm++ libraries to link against,
139 because shell script charmc is not available,
141 2. I just downloaded Charm++ net-win32 binaries from your website, how to use it?
143 The recommended way to run windows binary is under Cygwin.
144 First, unzip the binary packages to desired location; Set PATH environment
145 varaible to include the charm bin/ directory. That's it, you can now cd
146 to Charm++ testsuite directory, for example: pgms/charm++/megatest, to
147 compile your first Charm++ program using "make".
148 If you don't want to use Cygwin, you have to use "nmake" to compile Charm++
149 programs, see the Makefile example under:
150 pgms/charm++/megatest/Makefile.win32.
152 3. How to compile under Windows98?
154 Compiling Charm++ with cygwin/gnu compiler (net-cygwin) under Windows98
155 is still supported. However, we don't support VC++ with Windows98 any more.
156 To compile Charm++ under Windows98, one can check out Charm++ version
157 before November 2005.