All Projects → raptor-library → raptor

raptor-library / raptor

Licence: BSD-2-Clause license
General, high performance algebraic multigrid solver

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to raptor

muster
Massively Scalable Clustering
Stars: ✭ 22 (-56%)
Mutual labels:  parallel, mpi
Pism
repository for the Parallel Ice Sheet Model (PISM)
Stars: ✭ 61 (+22%)
Mutual labels:  parallel, mpi
tbslas
A parallel, fast solver for the scalar advection-diffusion and the incompressible Navier-Stokes equations based on semi-Lagrangian/Volume-Integral method.
Stars: ✭ 21 (-58%)
Mutual labels:  parallel, mpi
sst-core
SST Structural Simulation Toolkit Parallel Discrete Event Core and Services
Stars: ✭ 82 (+64%)
Mutual labels:  parallel, mpi
hp2p
Heavy Peer To Peer: a MPI based benchmark for network diagnostic
Stars: ✭ 17 (-66%)
Mutual labels:  parallel, mpi
fdtd3d
fdtd3d is an open source 1D, 2D, 3D FDTD electromagnetics solver with MPI, OpenMP and CUDA support for x86, arm, arm64 architectures
Stars: ✭ 77 (+54%)
Mutual labels:  parallel, mpi
Prpl
parallel Raster Processing Library (pRPL) is a MPI-enabled C++ programming library that provides easy-to-use interfaces to parallelize raster/image processing algorithms
Stars: ✭ 15 (-70%)
Mutual labels:  parallel, mpi
XH5For
XDMF parallel partitioned mesh I/O on top of HDF5
Stars: ✭ 23 (-54%)
Mutual labels:  parallel, mpi
Hpcinfo
Information about many aspects of high-performance computing. Wiki content moved to ~/docs.
Stars: ✭ 171 (+242%)
Mutual labels:  parallel, mpi
Libgrape Lite
🍇 A C++ library for parallel graph processing 🍇
Stars: ✭ 169 (+238%)
Mutual labels:  parallel, mpi
Easylambda
distributed dataflows with functional list operations for data processing with C++14
Stars: ✭ 475 (+850%)
Mutual labels:  parallel, mpi
t8code
Parallel algorithms and data structures for tree-based AMR with arbitrary element shapes.
Stars: ✭ 37 (-26%)
Mutual labels:  parallel, mpi
Core
parallel finite element unstructured meshes
Stars: ✭ 124 (+148%)
Mutual labels:  parallel, mpi
ParMmg
Distributed parallelization of 3D volume mesh adaptation
Stars: ✭ 19 (-62%)
Mutual labels:  parallel, mpi
Galaxy
Galaxy is an asynchronous parallel visualization ray tracer for performant rendering in distributed computing environments. Galaxy builds upon Intel OSPRay and Intel Embree, including ray queueing and sending logic inspired by TACC GraviT.
Stars: ✭ 18 (-64%)
Mutual labels:  parallel, mpi
marathon
Cross-platform test runner written for Android and iOS projects
Stars: ✭ 398 (+696%)
Mutual labels:  parallel
YACLib
Yet Another Concurrency Library
Stars: ✭ 193 (+286%)
Mutual labels:  parallel
Parrows
Using Arrows to model parallel processes/computations.
Stars: ✭ 18 (-64%)
Mutual labels:  parallel
AppiumGrid
A framework for running appium tests in parallel across devices and also on desktop browser... U like it STAR it !!
Stars: ✭ 17 (-66%)
Mutual labels:  parallel
codeceptjs-bdd
⭐️ ⭐️⭐️ Migrated to Salesforce Open Source Platform - https://github.com/salesforce/codeceptjs-bdd
Stars: ✭ 24 (-52%)
Mutual labels:  parallel

Build Status

raptor

RAPtor is a general, high performance algebraic multigrid solver.

Requirements

  • MPI
  • cmake

Build Instructions

  1. Create a build directory
mkdir build
  1. Configure the build
cd build
cmake [OPTIONS] ..
make -j 4

Note: make VERBOSE=1 if you want to see what flags are being used.

Options

  • WITH_HYPRE: Includes hypre_wrapper in the build. Hypre must be installed before building with this option. If not installed to /usr/local, set the HYPRE_DIR option.

  • WITH_MFEM: Includes mfem_wrapper, mfem files, and hypre_wrapper in the build. Mfem, Metis, and Hypre must be installed before building with this option. For any packages not installed to /usr/local, set the directory option (_DIR).

  • HYPRE_DIR: Sets the directory of hypre containing the include and lib folders

  • METIS_DIR: Sets the directory of metis containing the include and libmetis folders

  • MFEM_DIR: Sets the directory of mfem containing mfem.h and libmfem

Unit Testing

The build system uses GoogleTest. The build searches the source tree and adds any test directory to ctest. For a simple example, see raptor/core/tests/ParVector.cpp.

To test:

make test

Citing

@MISC{BiOl2017,
      author = {Bienz, Amanda and Olson, Luke N.},
      title = {{RAPtor}: parallel algebraic multigrid v0.1},
      year = {2017},
      url = {https://github.com/lukeolson/raptor},
      note = {Release 0.1}
      }

Full Example

From the examples directory:

mpirun -n 4 ./example

This example is maintained in raptor/examples/example.cpp

// Copyright (c) 2015-2017, Raptor Developer Team
// License: Simplified BSD, http://opensource.org/licenses/BSD-2-Clause
#include <mpi.h>
#include <math.h>
#include <stdlib.h>
#include <assert.h>
#include <iostream>

// Include raptor
#include "raptor.hpp"

// This is a basic use case.
int main(int argc, char *argv[])
{
    // set rank and number of processors
    int rank, num_procs;
    MPI_Init(&argc, &argv);
    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
    MPI_Comm_size(MPI_COMM_WORLD, &num_procs);

    // Create parallel matrix and vectors
    ParCSRMatrix* A;
    ParVector x;
    ParVector b;

    // Timers
    double time_setup, time_solve, time_base;

    // Problems size and type
    int dim = 2;
    int n = 100;

    aligned_vector<int> grid;
    grid.resize(dim, n);

    // Anisotropic diffusion
    coarsen_t coarsen_type = CLJP;
    interp_t interp_type = ModClassical;
    relax_t relax_type = SOR;
    double eps = 0.001;
    double theta = M_PI/8.0;
    double* stencil = NULL;
    stencil = diffusion_stencil_2d(eps, theta);
    A = par_stencil_grid(stencil, grid.data(), dim);
    delete[] stencil;

    x = ParVector(A->global_num_cols, A->on_proc_num_cols);
    b = ParVector(A->global_num_rows, A->local_num_rows);

    x.set_const_value(1.0);
    A->mult(x, b);
    x.set_const_value(0.0);

    // AMG parameters
    double strong_threshold = 0.25;

    // Create a multilevel object
    ParMultilevel* ml;

    // Setup Raptor Hierarchy
    MPI_Barrier(MPI_COMM_WORLD);
    time_base = MPI_Wtime();
    ml = new ParRugeStubenSolver(strong_threshold, coarsen_type, interp_type, Classical, relax_type);
    ml->setup(A);
    time_setup = MPI_Wtime() - time_base;

    // Print out information on the AMG hierarchy
    int64_t lcl_nnz;
    int64_t nnz;

    if (rank == 0) std::cout << "Level\tNumRows\tNNZ" << std::endl;
    if (rank == 0) std::cout << "-----\t-------\t---" << std::endl;
    for (int64_t i = 0; i < ml->num_levels; i++)
    {
        ParCSRMatrix* Al = ml->levels[i]->A;
        lcl_nnz = Al->local_nnz;
        MPI_Reduce(&lcl_nnz, &nnz, 1, MPI_LONG, MPI_SUM, 0, MPI_COMM_WORLD);
        if (rank == 0) std::cout << i << "\t" << Al->global_num_rows << "\t" << nnz << std::endl;
    }

    // Solve Raptor Hierarchy
    MPI_Barrier(MPI_COMM_WORLD);
    time_base = MPI_Wtime();
    ml->solve(x, b);
    time_solve = MPI_Wtime() - time_base;

    MPI_Reduce(&time_setup, &time_base, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);
    if (rank == 0) printf("Raptor AMG Setup Time: %e\n", time_base);
    MPI_Reduce(&time_solve, &time_base, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);
    if (rank == 0) printf("Raptor AMG Solve Time: %e\n", time_base);

    // Delete AMG hierarchy
    delete ml;
    delete A;
    MPI_Finalize();

    return 0;
}

License

This code is distributed under BSD: http://opensource.org/licenses/BSD-2-Clause

Please see LICENSE.txt and COPYRIGHT.txt for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].