BUILD_STEPS 3.78 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 11 12 13 14 15 16 17 18 19 20 21 22 23

    git clone http://github.com/carothersc/ROSS.git
    # optional: git checkout c04babe
    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

30 31 32 33 34 35 36 37 38 39
1 - If you are building codes-base directly from the repository, run

    ./prepare.sh

2 - Configure codes-base. This can be done in the source directory or in a
    dedicated build directory if you prefer out-of-tree builds.  The CC
    environment variable must refer to an MPI compiler.

    mkdir build
    cd build
40
    ../configure --prefix=/path/to/codes-base/install CC=mpicc PKG_CONFIG_PATH=/path/to/ross/install/lib/pkgconfig
41

42 43 44 45 46 47 48 49 50
    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).
51

52 53 54 55 56 57 58 59
    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.
   
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
3 - Build and install codes-base

    make && make install

4 - (optional) run test programs

    make tests && make check

5 - codes-base uses flex and bison (or lex and yacc) to generate several
    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"

94 95 96 97 98 99 100 101 102
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)