BUILD_STEPS 3.95 KB
Newer Older
1 2 3
NOTE: see bottom of this file for suggested configurations on particular ANL
machines.

4 5
0 - Checkout, build, and install the trunk version of ROSS
(https://github.com/carothersc/ROSS). At the time of
6 7 8
release (0.4.0), ROSS's latest commit hash was 44b7b9a, so this revision is
"safe" in the unlikely case incompatible changes come along in the future. If
working from the CODES master branches, use the ROSS master branch.
9 10

    git clone http://github.com/carothersc/ROSS.git
11
    # if using 0.4.0 release: git checkout 44b7b9a
12 13 14 15 16 17 18 19 20 21 22 23
    cd ROSS
    mkdir build
    cd build
	# note: other options for ARCH include i386 (for 32 bit machines),
	# bgp, and bgq (for Blue Gene systems)
    ARCH=x86_64 CC=mpicc CXX=mpicxx cmake -DCMAKE_INSTALL_PREFIX=../install ../
    make -j 3
    make install

    <the result should be that the latest version of ROSS is installed in the 
    ROSS/install/ directory>

24 25 26 27 28 29
    For more details on installing ROSS, go to
    https://github.com/carothersc/ROSS/blob/master/README.md .

    If using ccmake to configure, don't forget to set CMAKE_C_COMPILER and
    CMAKE_CXX_COMPILER to mpicc/mpicxx

Jonathan Jenkins's avatar
Jonathan Jenkins committed
30
1 - If you are building CODES directly from the repository, run
31 32 33

    ./prepare.sh

Jonathan Jenkins's avatar
Jonathan Jenkins committed
34 35 36 37 38
2 - CODES requires pkg-config and non-ancient versions of flex/bison (i.e.
    there have been problems with the Mac version). Use your favorite
    package manager to obtain them.

3 - Configure CODES. This can be done in the source directory or in a
39 40 41 42 43
    dedicated build directory if you prefer out-of-tree builds.  The CC
    environment variable must refer to an MPI compiler.

    mkdir build
    cd build
Jonathan Jenkins's avatar
Jonathan Jenkins committed
44
    ../configure --prefix=/path/to/codes/install CC=mpicc PKG_CONFIG_PATH=/path/to/ross/install/lib/pkgconfig
45

46 47 48 49 50 51 52 53 54
    To enable network tracing with dumpi
    (http://sst.sandia.gov/about_dumpi.html), use the option
    --with-dumpi=/path/to/dumpi/install with configure.

    NOTE: we only require libundumpi for trace processing. Hence, if building
    dumpi from source you may configure with --disable-libdumpi and
    --enable-libundumpi (this is especially useful if you have mpich3, which
    breaks libdumpi's function wrappers through const'ifying the MPI
    interface).
55

56 57 58 59 60 61 62 63
    Use the --with-darshan argument to configure to enable the optional
    Darshan I/O workload generator
    (http://www.mcs.anl.gov/research/projects/darshan/).  In order to use
    this option, you must either have the darshan-util portion
    of Darshan installed in the default system path, or else add
    <DARSHAN_PREFIX>/lib/pkgconfig to your PKG_CONFIG_PATH environment
    variable before calling configure.
   
Jonathan Jenkins's avatar
Jonathan Jenkins committed
64
4 - Build and install CODES
65 66 67

    make && make install

Jonathan Jenkins's avatar
Jonathan Jenkins committed
68
5 - (optional) run test programs
69 70 71

    make tests && make check

Jonathan Jenkins's avatar
Jonathan Jenkins committed
72
6 - codes uses flex and bison (or lex and yacc) to generate several
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
    parsers. These tools auto-generate C source files. To get around versioning
    issues, we've distributed the auto-generated sources directly. To remove
    all of the autogenerated files for these parsers, execute

    make maintainer-clean-local


Machine-specific configurations:
----------------
- Fusion (ANL): add the following keys to your ~/.soft file and run "resoft"
  prior to following the steps described in this file:

  +python-2.7.3
  +autoconf-2.68
  +git
  +cmake

Notes on using the clang static analyzer
-----------------
- follow steps 0-2 as shown above, with one exception:
  - add the following argument to configure:
    CFLAGS=-I<path_to_your_mpi_include_directory>
- edit Makefile, and delete the "CC = mpicc" (or similar) line
- run "scan-build --use-cc=mpicc make"

98 99 100 101 102 103 104 105 106
Notes on using uncrustify
-----------------
- version 0.61 is required
- build/install uncrustify from your favorite distro (0.61), OR download from
  https://github.com/bengardner/uncrustify and build from source
  (configure --prefix /path/to/install && make && make install)
- either use uncrustify directly (see uncrustify --help) or use the provided
  reformat.sh tool which is a shim over some of the options (see reformat.sh
  -h)