m (→How to compile ParaDiS) |
m (→How to compile ParaDiS) |
Revision as of 18:32, 7 January 2011
Under construction by Jie Yin
Here is a practical guide to ParaDiS corresponding to the latest version. It is especially useful for beginners with latest command templates and programming tips. This guide includes following how-tos:
Contents |
How to obtain the latest ParaDiS codes
It is highly recommended to create directory Codes under your home directory. Currently ParaDiS codes are maintained through Subversion. For current group members or collaborators, you can obtain the latest version of ParaDiS by typing the following,
cd ~/Codes svn co https://micro.stanford.edu/svn/ParaDiS [./dirname]
Directory ~/Codes/ParaDiS (or ~/Codes/dirname) will be created with latest checked out revision. It is your svn local repository. You can update your local ParaDiS codes by simply typing
cd ~/Codes/ParaDiS svn update
If you create a new file called newfile.c, you can add it to your local repository ~/Codes/ParaDiS
$ svn add newfile.c
or commit the change to ParaDiS codes after some modifications
$ svn commit newfile.c
How to compile ParaDiS
Before compilation, you need to modify the settings in makefile.setup, which is under directory ~/Codes/ParaDiS. Currently many system types are supported. In the first few lines, you can see following lines
SYS = wcr MODE = SERIAL #MODE = PARALLEL #XLIB_MODE = OFF XLIB = MODE = ON
SYS defines the system type. Detailed descriptions can be found in file makefile.sys. You can also change to linux if it best described your system type.
MODE is the execution mode. PARALLEL is to enable compile-time support for MPI and multi-CPU support and SERIAL is for single-CPU compilation. Usually SERIAL is used for debugging and visulization purpose. For computation intensive jobs, you should choose PARALLEL mode.
XLIB_MODE = ON is only valid when you want to enable xwindow plotting capability (at the same time MODE = SERIAL ). Otherwise you should set it OFF.
the basic compilation command is following
$ make
If you want to compile faster on a multi-CPU machine, you can use command
$ make -j8
where 8 means the number of processors used for compilation.
If you want to re-compile ParaDiS, e.g. after some modification to source files, you need to "make clean" before "make"
$ make clean