A FEM framework program is a CHARM++ program, so you must begin by downloading the latest source version of CHARM++ from http://charm.cs.uiuc.edu/. Build the source with ./build FEM version or cd into the build directory, version/tmp, and type make FEM. To compile a FEM program, pass the -language fem (for C) or -language femf (for Fortran) option to charmc. You can also build using the ``fem_alone'' mode described at the end of the section above.
In a charm installation, see charm/version/pgms/charm++/fem/ for several example and test programs.
At runtime, a Charm++/FEM framework program accepts the following options, in addition to all the usual Charm++ options described in the Charm++ ``Installation and Usage Manual''.
Create mesh chunks, or ``virtual processors''. By default, the number of mesh chunks is equal to the number of physical processors (set with +p ).
Skip driver(). After running init() normally, the framework partitions the mesh, writes the mesh partitions to files, and exits. As usual, the +vp option controls the number of mesh partitions.
This option is only used in the classic mode--MPI-style programs are not affected.
Skip init(). The framework reads the partitioned input mesh from files and calls driver(). Together with -write, this option allows you to separate out the mesh preparation and partitioning phase from the actual parallel solution run.
This can be useful, for example, if init() requires more memory to hold the unpartitioned mesh than is available on one processor of the parallel machine. To avoid this limitation, you can run the program with -write on a machine with a lot of memory to prepare the input files, then copy the files and run with -read on a machine with a lot of processors.
-read can also be useful during debugging or performance tuning, by skipping the (potentially slow) mesh preparation phase. This option is only used in the classic mode--MPI-style programs are not affected.
Give a diagnostic printout on every call into the FEM framework. This can be useful for locating a sudden crash, or understanding how the program and framework interact. Because printing the diagnostics can slow a program down, use this option with care.
January 17, 2008
FEM Homepage
Charm Homepage