CHANGES: Add release notes for 6.8.1
[charm.git] / README
blob43cd154f334e1beb8794c583fe1569089ce23db0
1                            Charm++
3        Copyright (C) 1989-2017 Regents of the University of Illinois
5 INTRODUCTION
6 ============
8 Charm++ is a message-passing parallel language and runtime system.
9 It is implemented as a set of libraries for C++, is efficient,
10 and is portable to a wide variety of parallel machines.
11 Source code is provided, and non-commercial use is free.
14 GETTING THE LATEST SOURCE
15 =========================
17 You can use anonymous Git access to obtain the latest Charm++ source
18 code, as follows:
20     git clone http://charm.cs.illinois.edu/gerrit/charm
23 BUILD CONFIGURATION
24 ===================
26 QUICK START:
27 ------------
28 First-time users are encouraged to run the top-level "build" script and follow its lead:
29      > ./build
32 ADVANCED BUILD OPTIONS:
33 -----------------------
35 First, you need to decide which version of charm++ to use. The "build"
36 script takes several command line options to compile Charm++. The command line syntax is:
38 build <target> <version> [options ...]
39                          [--basedir=dir] [--libdir=dir] [--incdir=dir]
40                          [charmc-options ...]
42 For detailed help messages, pass -h or --help to the build script, i.e.
43 ./build --help
45 REQUIRED:
46 ---------
47 <target> specifies the parts of Charm++ to compile.  The most often used
48   <target> is "charm++", which will compile the key Charm++ executables and
49   runtime libraries.  Other common targets are "AMPI" and "LIBS".
50 <versions> defines the CPU, OS and Communication layer of the machines.  See
51   "How to choose a <version>" below for details.
53 OPTIONAL:
54 ---------
55 <options> defines more detailed information of the compilations, including
56   compilers, features to support, etc.  See "How to choose <option>"
57   below.
58 [--libdir=dir] specify additional lib paths for building Charm++.
59 [--incdir=dir] specify additional include paths for building Charm++.
60 [--basedir=dir] a shortcut to specify additional include and lib paths for
61                building Charm++, the include path is dir/include and lib path
62                is dir/lib.
65 Running build script, a directory of the name of combination of version and
66 options like "<version>-<option1>-<option2>-..." will be created and
67 the build script will compile Charm++ under this directory.
69 For example, on an ordinary Linux PC:
71    ./build charm++ netlrts-linux-x86_64
73 will build charm++ in the directory: netlrts-linux-x86_64/. The communication
74 defaults to UDP packets and the compiler to gcc.
76 For a more complex example, consider a shared-memory build with the
77 Intel C++ compiler, where you want the communication to happen over TCP sockets:
79    ./build charm++ netlrts-linux-x86_64 smp icc tcp
81 will build charm++ in the directory: netlrts-linux-x86_64-smp-tcp-icc/.
83 You can specify multiple options, however you can use at most one compiler
84 option. The sequencing of options given to the build script should follow the rules:
85 1. compiler option will be at the end;
86 2. other options are sorted alphabetically.
88 **** How to choose a <version> ****
90 Here is the table for choosing a correct build version. The default setting of compiler
91 in Charm++ is gcc/g++ on Linux and Clang on MacOS. However, one can use <options> to specify other
92 compilers. See the detailed explanation of the <options> below.
93 (Note: this isn't a complete list.  Run ./build for a complete listing)
95 Charm version                OS         Communication    Default Compiler
96 -------------             ---------     --------------   --------------------
97 netlrts-linux-x86_64       Linux            UDP            GNU compiler
98 netlrts-darwin-x86_64      MacOS X          UDP            Clang C++ compiler
99 mpi-linux-x86_64           Linux            MPI            GNU compiler
100 mpi-darwin-x86_64          MacOS X          MPI            Clang C++ compiler
101 pamilrts-bluegeneq         CNK              PAMI           XLC
102 gni-crayxe                 Linux            GNI            GNU compiler
103 verbs-linux-x86_64         Linux            IB Verbs       GNU compiler
104 ofi-linux-x86_64           Linux            OFI            GNU compiler
105 net-win64                  Windows          UDP            MS Visual C++
106 net-cygwin                 Cygwin           UDP            GNU compiler
109 To choose <version>, your choice is determined by two options:
111 1.)  The way a parallel program written in Charm++ will communicate:
113         "netlrts-" Charm++ communicates using the regular TCP/IP stack
114 (UDP packets), which works everywhere but is fairly slow.  Use this
115 option for networks of workstations, clusters, or single-machine
116 development and testing.
118         "gni-", "pamilrts-", "verbs-", "ofi-" Charm++
119 communicates using direct calls to the machine's communication primitives.
120 Use these versions on machines that support them for best performance.
122         "mpi-" Charm++ communicates using MPI calls.
124         "multicore-" Charm++ communicates using shared memory within a single node.
127 2.)  Your operating system:
129         "linux-x86_64"       Linux with AMD64 64-bit x86 instructions
130         "win64"              MS Windows with MS Visual C++ compiler
131         "cygwin"             MS Windows with Cygnus' Cygwin Unix layer
132         "darwin-x86_64"      Apple Mac OS X
133         "bluegeneq"          IBM's Blue Gene/Q
134         "cray{xe/xc}"        Cray's X-Series Supercomputer
135         "linux-ppc"          POWER/PowerPC
138 Your Charm++ version is made by concatenating the options, e.g.:
140 "netlrts-linux-x86_64"   Charm++ for a network of 64-bit Linux workstations,
141                          compiled using g++.
143 "gni-crayxc"             Charm++ for Cray XC systems using the system's compiler.
146 **** How to choose <options> ****
148 <version> above defines the most important OS, CPU and Communication of
149 your machine, and most of time it uses gcc as the default compiler.
150 To use a different compiler or demand additional special feature support, you
151 need to choose <options> from the following list:
153 * icc - Intel C/C++ compiler.
154 * ifort - Intel Fortran compiler
155 * xlc - IBM XLC compiler.
156 * clang - Clang compiler.
157 * mpicxx - Use MPI-wrappers for MPI builds.
158 * pgcc - Portland Group's C++ compiler.
160 * smp - Enable direct SMP support.  An "smp" version communicates using
161         shared memory within a machine; but normal message passing across
162         machines. Because of locking, "smp" may slightly impact non-SMP
163         performance. Try your application to decide if enabling smp mode
164         improves performance.
166 * tcp - for netlrts- version, default communication is via UDP. Using option
167         tcp will switch to TCP. TCP version of Charm++ is usually slower
168         than UDP, but it is more reliable.
169 * async - For Blue Gene/Q, this option enables use of hardware communication 
170           threads. For applications with significant communication on large
171           scale, this option typically improves performance.
172 * regularpages - on Cray systems, Charm++'s default is to use hugepages. This
173                  option disables hugepages, and uses regular malloc for messages.
174 * persistent - on Cray systems, this option enables use of persitent mode for
175                communication.
176 * pxshm - use Posix Shared Memory for communication between Charm++ processes
177           within a shared-memory host.
178 * syncft - enable in-memory fault tolerance support in Charm++.
179 * mlogft - enable message logging fault tolerance support in Charm++.
180 * tsan - compile Charm++ with support for Thread Sanitizer.
181 * papi - enable PAPI performance counters.
182 * ooc - build Charm++ with out-of-core execution features.
183 * bigsim - compile Charm++ as running on the BigSim emulator.
185 * help - show supported options for a version. For example, for netlrts-linux,
186          running:
187          > ./build charm++ netlrts-linux help
188          will give:
189 Supported compilers: clang craycc gcc icc iccstatic pgcc xlc xlc64
190 Supported options: bigemulator bigsim causalft clustermatic g95 gfortran ifort lcs local mlogft omp ooc papi persistent pgf90 pxshm scyld smp syncft sysvshm tcp tsan turing
193 BUILDING THE SOURCE
194 ===================
196 If you have downloaded a binary version of Charm++, you can skip
197 this step-- Charm++ should already be compiled.  For win64 systems,
198 see README.win; for Cygwin version, see README.cygwin.
200 Once you have decided on a version, unpack Charm++, cd into charm,
201 and run
203      > ./build <target> <version> <opts>
205 <target> is one of
206         "charm++"  The basic Charm++ language
207         "AMPI"     An implementation of MPI on top of Charm++
208         "LIBS"     Charm++, AMPI, and other libraries built on top of them
209         "Tau"      TAU's performance profiling/tracing
211 <version> is described above
213 <opts> are build-time options (such as the compiler or "smp"),
214 or command line options passed to the charmc compiler script.
215 Common compile time options such as -g, -O, -Ipath, -Lpath, -llib are
216 accepted.
218 For example, on a Linux machine, you would run
219      > ./build charm++ netlrts-linux-x86_64 -O
221 This will construct a netlrts-linux-x86_64 directory, link over all
222 the Charm++ source code into netlrts-linux-x86_64/tmp, build the entire
223 Charm++ runtime system in netlrts-linux-x86_64/tmp, and link example
224 programs into netlrts-linux-x86_64/examples.
226 Charm++ can be compiled with several optional features enabled or
227 disabled. These include runtime error checking, tracing, interactive
228 debugging, deterministic record-replay, and more. They can be
229 controlled by passing flags of the form --enable-featurename or
230 --disable-featurename to the build command:
231     > ./build charm++ netlrts-linux-x86_64 --disable-tracing
233 The list of optional features available is shown in the output of
234     > ./build --help
236 Production optimizations: Pass the configure option --with-production
237 to ./build to turn on optimizations in Charm++/Converse. This disables
238 most of the run-time checking performed by Converse and Charm++
239 runtime. This option should be used only after the program has been
240 debugged. Also, this option disables Converse/Charm++ tracing
241 mechanisms such as projections and summary.
243 Performance analysis: Pass the configuration option "--with-production 
244 --enable-tracing" to enable tracing and generation of logs for analysis with 
245 Projections. This is the recommended way to analyze performance of applications.
247 When Charm++ is built successfully, the directory structure under the
248 target directory will look like:
250 netlrts-linux-x86_64/
251    |
252    ---  bin/                    # all executables
253    |
254    ---  doc/                    # documentations
255    |
256    ---  include/                # header files
257    |
258    ---  lib/                    # libraries
259    |
260    ---  lib_so/                 # dynamic libraries
261    |
262    ---  examples/               # all example programs
263    |
264    ---  tests/                  # all test programs
265    |
266    ---  tmp/                    # Charm++ build directory
269 BUILDING A PROGRAM
270 ==================
272 To make a sample program, cd into examples/charm++/queens/.
273 This program solves the N-queens problem-- find how many ways there
274 are to arrange N queens on an NxN chess board such that none may
275 attack another.
277 To build the program, type make.  You should get an
278 executable named "pgm".
281 RUNNING A PROGRAM
282 ==================
284 Following the previous example, to run the program on two processors, type
286      > ./charmrun ./pgm 12 6 +p2
288 This should run for a few seconds, and print out:
289 There are 14200 Solutions to 12 queens. Finish time=4.030000
291 Charmrun is used to provide a uniform interface to run charm programs.
292 On some platforms, charmrun is just a shell script which calls the
293 platform-specific start program, such as mpirun on mpi versions.
295 For netlrts- version, charmrun is an executable which invokes ssh to start
296 node programs on remote machines. You should set up a ~/.nodelist that
297 enumerates all the machines you want to run jobs on, otherwise it will
298 create a default ~/.nodelist for you that contains only localhost. Here is a
299 typical .nodelist file:
301 group main ++shell /bin/ssh
302 host <machinename>
304 The default remote shell program is ssh, but you can define a different remote
305 shell to start remote processes using the ++shell option. You should
306 also make sure that ssh or your alternative can connect to these machines without
307 password authentication. Just type following command to verify:
308      > ssh <machinename> date
309 If this gives you current date immediately, your running environment with this
310 node has been setup correctly.
312 For development purposes, the netlrts- version of charmrun comes with an easy-to-use
313 "++local" option. No remote shell invocation is needed in this case. It starts
314 node programs right on your local machine. This could be useful if you just
315 want to run program on only one machine, for example, your laptop. This
316 can save you all the hassle of setting up ssh or charmd daemons.
317 To use this option, just type:
319      > ./charmrun ++local ./pgm 12 100 +p2
321 However, for best performance, you should launch one node program per processor.
324 BUILDING DYNAMIC LIBRARIES
325 ==========================
327 In order to compile Charm++ into dynamic libraries, one needs to specify the
328 "-build-shared" option to the Charm compiler script "charmc"
329 at link time. For example, to compile Charm++ under netlrts-linux/tmp, run
331 make charm++ OPTS='-O -build-shared'
333 Charm++'s dynamic libraries are compiled into the lib_so/ directory.
334 Typically, they are generated with a ".so" suffix.
336 Note, "-build-shared" option is automatically turned on when building
337 Charm++ using the "build" script. So you don't need to pass "-build-shared"
338 option to "build".
340 One can compile a Charm++ application linking against Charm++ dynamic
341 libraries by linking with charmc's "-charm-shared" option.
342 For example:
344 charmc -o pgm pgm.o -charm-shared
346 You can then run the program as usual.
347 Note, linking against Charm++ dynamic libraries produces much smaller size
348 binaries and takes much less linking time.
351 FOR MORE INFORMATION
352 ====================
354 The Charm++ web page, with documentation, more programs,
355 and the latest version of Charm++, is at
356         http://charm.cs.illinois.edu/
358 The Charm++ mailing list, for questions, comments, suggestions,
359 improvements, or bug reports is
360         charm@cs.illinois.edu
363 AUTHORS
364 =======
366 Charm++ was created and is maintained by the Parallel Programming Lab,
367 in the Computer Science department at the University of Illinois at
368 Urbana-Champaign.  Our managing professor is Dr. L.V. Kale; students
369 and staff have included (in rough time order) Wennie Shu, Kevin Nomura, Wayne
370 Fenton, Balkrishna Ramkumar, Vikram Saletore, Amitabh B. Sinha, Manish
371 Gupta, Attila Gursoy, Nimish Shah, Sanjeev Krishnan, Jayant DeSouza,
372 Parthasarathy Ramachandran, Jeff Wright, Michael Lang, Jackie Wang,
373 Fang Hu, Michael Denardo, Joshua Yelon, Narain Jagathesan, Zehra Sura,
374 Krishnan Varadarajan, Sameer Paranjpye, Milind Bhandarkar, Robert Brunner,
375 Terry Wilmarth, Gengbin Zheng, Orion Lawlor, Celso Mendes, Karthik Mahesh,
376 Neelam Saboo, Greg Koenig, Sameer Kumar, Sayantan Chakravorty, Chao Huang,
377 Chee Lee, Fillipo Gioachin, Isaac Dooley, Abhinav Bhatele, Aaron Becker,
378 Ryan Mokos, Ramprasad Venkataraman, Gagan Gupta, Pritish Jetley, Lukasz
379 Wesolowski, Esteban Meneses, Chao Mei, David Kunzman, Osman Sarood,
380 Abhishek Gupta, Yanhua Sun, Ehsan Totoni, Akhil Langer, Cyril Bordage,
381 Harshit Dokania, Prateek Jindal, Jonathan Lifflander, Xiang Ni,
382 Harshitha Menon, Nikhil Jain, and Vipul Harsh. Current developers include Eric
383 Bohm, Phil Miller, Bilge Acun, Ronak Buch, Michael Robson, Eric
384 Mikida, Sam White, Juan Galvez, Seonmyeong Bak, Nitin Bhat, Kavitha
385 Chandrasekar, Jaemin Choi, Karthik Senthil, and Matthias Diener.