Milkyway-at-home / milkywayathome_client

milkway@home client
http://milkyway.cs.rpi.edu/milkyway/
GNU General Public License v3.0
45 stars 26 forks source link

Linux: Linux Build MinGW: MinGW Build

Separation

Nbody

Instructions for Compiling Nbody (With BOINC on)

Step 0. Ensure proper packages are installed

(For Ubuntu) sudo apt-get install mingw-w64 cmake
(OpenGL)     sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev
(NCurses)    sudo apt-get install libncurses5-dev libncursesw5-dev
(OpenSSL)    sudo apt-get install libssl-dev

Step 1. Download all necessary files

git clone https://github.com/Milkyway-at-home/milkywayathome_client.git
cd milkywayathome_client
git submodule init
git submodule update --recursive

NOTE: If you are running on WSL (Windows Subsystem Linux), you may need to run the following commands

git submodule sync
git submodule init
git submodule update

Step 2. Compile Nbody

./build_client

Step 3. Run a Nbody Simulation

./run_nbody

Tests

Tests can be run by running:

  $ make test

However this runs all of the tests, which takes forever. You can run (from the tests directory) some core functionality tests with:

  $ make check

Other tests can be run with a certain number of bodies depending on how long you want to wait with:

  $ make test_${n}

Currently n = 100, 1024, 10000 are available.

Single tests can be run with:

  $ ctest -R <Test_Name> 

Get a more versbose output with:

  $ ctest -R <Test_Name> -VV

If only 25 tests are running instead of 88 tests, you are missing libraries (check Step 0 for compiling N-body)

TAO

TODO: update for latest tao version

To run call:

  $ ./TAO <options>

  General required options:
    --separation "<path/to/separation_binary>"
    --stars "<path/to/stars_file>"
    --params "<path/to/search_paramaters_file>"
    --search_type <options>
      search type options:
        de    - differential evolution
        ps    - particle swarm
        snm   - synchronous newton method
        gd    - gradient descent
        cgd   - conjugate gradient descent
        sweep - paramater sweep

  Search Specific Options:
    de:
      optional:
        --population_size <int>         (default:200)
        --maximum_iterations <int>        (default:will run forever - Ctrl-C to kill)
        --maximum_created <int>         (default:will run forever - Ctrl-C to kill)
        --maximum_reported <int>        (default:will run forever - Ctrl-C to kill)
        --parent_scaling_factor <float>     (default:1.0)
        --differential_scaling_factor <float> (default:1.0)
        --crossover_rate <float>        (default:0.5)
        --int_pairs <int>           (default:1)
        --parent_selection <option>       (defualt:best)
          options:
            best
            random
            current-to-best
            current-to-random
        --recombination_selection <option>    (default:binary)
          options:
            binary
            exponential
            sum
            none
    ps:
      optional:
        --population_size <int>       (default:200)
        --maximum_iterations <int>      (default:will run forever - Ctrl-C to kill)
        --maximum_created <int>       (default:will run forever - Ctrl-C to kill)
        --maximum_reported <int>      (default:will run forever - Ctrl-C to kill)
        --inertia <float>         (default:0.75)
        --global_best_weight <float>    (default:1.5)
        --local_best_weight <float>     (default:1.5)
        --initial_velocity_scale <float>  (default:0.25)
    snm:
      required:
        --iterations <int>
      optional:
        --rand <double>     (randomizes the search parameters by +- the given percent)
    gd:
      required:
        --iterations <int>
      optional:
        --loop1_max <int>   (default:300 iterations)
        --loop2_max <int>   (default:300 iterations)
        --nquad <int>     (default:4 iterations for loop 3)
        --tol <double>      (default:1e-6 for tolerance of dstar in loop 3)
        --min_threshold <double_1, double_2, ... , double_n>
                    (default:line search will not quit if the input direction is very small)
        --rand <double>     (randomizes the search parameters by +- the given percent)

    gd:
      required:
        --iterations <int>
        --cgd_reset <int> **roughly speaking this should be the number of paramaters...
      optional:
        --loop1_max <int>   (default:300 iterations)
        --loop2_max <int>   (default:300 iterations)
        --nquad <int>     (default:4 iterations for loop 3)
        --tol <double>      (default:1e-6 for tolerance of dstar in loop 3)
        --min_threshold <double_1, double_2, ... , double_n>
                    (default:line search will not quit if the input direction is very small)
        --rand <double>     (randomizes the search parameters by +- the given percent)

Random notes:

make nbody_release and make separation_release will produce release tarballs if git and xz are installed and found.

Instructions for Cross Compiling (With BOINC on)

Step 0. Ensure proper packages are installed (For Ubuntu) sudo apt-get install mingw-w64 cmake

Step 1. Download all necessary files.

git clone https://github.com/Milkyway-at-home/milkywayathome_client.git
cd milkywayathome_client
git submodule init
git submodule update --recursive

NOTE: If you are running on WSL (Windows Subsystem Linux), you may need to run the following commands

git submodule sync
git submodule init
git submodule update

Step 2. Set up build directory

cd ../
mkdir build
cd build

Step 3. Set up build files with CMake and Compile (Only Confirmed to work with Separation)

cmake -DCMAKE_TOOLCHAIN_FILE="../milkywayathome_client/cmake_modules/MinGW32-Cross-Toolchain.cmake" -DBUILD_32=<ON/OFF> -       DSEPARATION_OPENCL=<ON/OFF> -DSEPARATION_STATIC=ON -DOPENCL_LIBRARIES=<Path to OpenCL.lib for 32 or 64 bit depending on build> -DOPENCL_INCLUDE_DIRS=<Path to OpenCL "include" files> ../milkywayathome_client/
make