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

4
0 - Checkout, build, and install the trunk version of ROSS
5
(https://github.com/ross-org/ROSS). At the time of
6
release (0.6.0), ROSS's latest commit hash was 10d7a06b2d, so this revision is
7 8
"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/ross-org/ROSS.git
11
    # if using 0.5.2 release: git checkout d3bdc07
12 13 14 15 16 17 18 19 20
    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

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

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

    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
44
    ../configure --prefix=/path/to/codes/install CC=mpicc CXX=mpicxx 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
    For building DUMPI with mpich3 versions and higher, use the following build
    options:

    CFLAGS="-DMPICH_SUPPRESS_PROTOTYPES=1 -DHAVE_PRAGMA_HP_SEC_DEF=1"
    ./configure --enable-libdumpi --prefix=$INSTALL_PATH

62 63 64 65 66 67 68
    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.
69

Jonathan Jenkins's avatar
Jonathan Jenkins committed
70
4 - Build and install CODES
71 72 73

    make && make install

Jonathan Jenkins's avatar
Jonathan Jenkins committed
74
5 - (optional) run test programs
75 76 77

    make tests && make check

Jonathan Jenkins's avatar
Jonathan Jenkins committed
78
6 - codes uses flex and bison (or lex and yacc) to generate several
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
    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"

104 105 106 107 108 109 110 111 112
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)