Files
2019-03-15 13:47:54 +04:00
..
2019-03-15 13:47:54 +04:00
2019-03-15 13:47:54 +04:00
2019-03-15 13:47:54 +04:00
2019-03-15 13:47:54 +04:00
2019-03-15 13:47:54 +04:00
2019-03-15 13:47:54 +04:00
2019-03-15 13:47:54 +04:00
2019-03-15 13:47:54 +04:00
2019-03-15 13:47:54 +04:00
2019-03-15 13:47:54 +04:00
2019-03-15 13:47:54 +04:00
2019-03-15 13:47:54 +04:00

                                  INSTALLATION

Unpack the archive in a place convienient for you. If you downloaded 'minimal'
version build parunner (see [RE]BUILDING parunner) and create config.json file
(in the directory to which you unpacked the archive) (see CONFIGURATION).

                                    USAGE
See python dcj.py -h

                            [RE]BUILDING parunner
* Make sure go is installed (installation instructions are on
  https://golang.org/doc/install).
* Build parunner by going to src/parunner/ subdirectory and running

    go build

* Copy executable (parunner file) to executable/ subdirectory:

    cp parunner ../../executable/

                              CONFIGURATION
Configuration is stored in config.json file, located in the directory to which
you unpacked the archive. Some sample configs are provided in sample-configs/
subdirectory.

The configuration file should contain a single object, with the following
fields:
 * c-compiler - command that will be used to compile files written in C.
 * c-compiler-flags - list of flags with which files written in C will be
   compiled.
 * cpp-compiler - command that will be used to compile files written in C++.
 * cpp-compiler-flags - list of flags with which files written in C++ will be
   compiled.
 * java-compiler - command used to compile .java files.
 * java-compiler-classpath-arg - argument of java-compiler which specifies Java
   class path to be used by the compiler.
 * java-include-dirs - list of directories containing includes necessary for
   compilation .c files with implementation of Java libraries.
 * java-native-library-linker - command used to link implementation of Java
   library.
 * java-native-library-linker-options - list of options passed to
   java-native-library-linker.
 * java-native-library-name - name of file containing native implementation of
   message class for Java.
 * java-wrapper-file-content - script that will be used to run your solution.
   Use {0} as a placeholder for directory containing .class file of your
   solution and {1} as a placeholder for directory containing libraries used by
   your solution.
 * parunner-file - name of parunner executable.
You may figure proper values by building and running a simple program using
message library manually (see BUILDING AND RUNNING SOLUTIONS MANUALLY).

                   BUILDING AND RUNNING SOLUTIONS MANUALLY
* If you are using Java or Python:
  * Install SWIG (http://swig.org).
  * Generate wrappers for language of your choice.
    * For Java:

      swig -java src/swig/message.i

    * For Python:

      swig -python src/swig/message.i

* Build message library from

  libraries/message_internal.c
  libraries/zeus_local.c

  and files generated by SWIG (see http://www.swig.org/tutorial.html for
  reference).
* Build solution.
* Run the solution using pa runner:

  parunner path-to-built-soluton -n=number-of-simulated-hosts

                INSTALLING MinGW TO WORK WITH THE TOOL
* Install MinGW, following instructions on:

  http://www.mingw.org/wiki/Getting_Started

  make sure the following packages will be installed:
    * mingw32-binutils
    * mingw32-gcc
    * mingw32-gcc-g++
    * mingw32-libz
    * msys-base
    * msys-console
    * msys-zlib
* Install python from:

  https://www.python.org/downloads/release/python-2710/

* Add the following line (replacing /c/python27 if you didn't use default
  installation directory for Python):

  export PATH="$PATH:/c/python27"

  to file (replacing your-user-name)(replace C:\MinGW if you did not use
  default MinGW instalation directory):

  c:\MinGW\msys\1.0\home\your-user-name\.bashrc

* Open terminal by running:

  C:\MinGW\msys\1.0\msys.bat

* Use the tool:

  python path/to/dcj.py