repo_id stringlengths 21 96 | file_path stringlengths 31 155 | content stringlengths 1 92.9M | __index_level_0__ int64 0 0 |
|---|---|---|---|
rapidsai_public_repos/nvgraph | rapidsai_public_repos/nvgraph/test/log_converter.py | #!/usr/bin/python
from sys import argv
from subprocess import Popen, PIPE, STDOUT
from os import path, environ
def main():
args = argv[1:]
args[0] = path.join('./', args[0])
print args
environ["GTEST_PRINT_TIME"] = "0"
popen = Popen(args, stdout=PIPE, stderr=STDOUT)
stillParsing = True
ski... | 0 |
rapidsai_public_repos/nvgraph | rapidsai_public_repos/nvgraph/test/data_gen.sh | #!/bin/sh
#Usage sh data_gen size1 size2 ...
#Generate power law in-degree plus rmat graphs of size size1 ... sizeN
#Corresponding transposed and binary csr are generated as well
convert (){
edges=$1
#echo "Starting Sort on $edges..."
./generators/convertors/sort $edges
#echo "Done"
tmp="_s"
sedges=$edges$tmp
echo "S... | 0 |
rapidsai_public_repos/nvgraph | rapidsai_public_repos/nvgraph/test/run_all_tests.sh | #!/bin/sh
#Usage sh run_all_tests.sh
#Run all the tests in the current directory (ie. you should copy it in your build/test/ directory).
test="nvgraph_test
csrmv_test
semiring_maxmin_test
semiring_minplus_test
semiring_orand_test
pagerank_test
sssp_test
max_flow_test"
for i in $test
do
./$i
done
| 0 |
rapidsai_public_repos/nvgraph/test | rapidsai_public_repos/nvgraph/test/ref/cpu_ref_pagerank.py | #!/usr/bin/python
# Usage : python3 nvgraph_cpu_ref.py graph.mtx alpha
# This will convert matrix values to default probabilities
# This will also write same matrix in CSC format and with dangling notes
#import numpy as np
import sys
import time
from scipy.io import mmread
import numpy as np
#import matplotlib.pyplot... | 0 |
rapidsai_public_repos/nvgraph/test | rapidsai_public_repos/nvgraph/test/ref/ref_sssp_BGL.cpp | #include <boost/config.hpp>
#include <iostream>
#include <fstream> //file output
#include <cfloat>
#include <omp.h>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <boost/property_map/property_map.hpp>
#include <boost/graph/ad... | 0 |
rapidsai_public_repos/nvgraph/test | rapidsai_public_repos/nvgraph/test/ref/cpu_ref_SSSP.py | #!/usr/bin/python
# Usage : python3 nvgraph_cpu_ref.py graph.mtx source_vertex
# This works with networkx 1.8.1 (default ubuntu package version in 14.04)
# http://networkx.github.io/documentation/networkx-1.8/
# Latest version is currenlty 1.11 in feb 2016
# https://networkx.github.io/documentation/latest/tutorial/in... | 0 |
rapidsai_public_repos/nvgraph/test | rapidsai_public_repos/nvgraph/test/ref/cpu_ref_widest.py | #!/usr/bin/python
# Generates widest path vector for the single source vertex to all other vertices using dijkstra-like algorithm
# Usage : python3 nvgraph_cpu_ref.py graph.mtx source_vertex
# This works with networkx 1.8.1 (default ubuntu package version in 14.04)
# http://networkx.github.io/documentation/networkx-1... | 0 |
rapidsai_public_repos/nvgraph/test/ref | rapidsai_public_repos/nvgraph/test/ref/nerstrand/README.txt | This is stand alone host app that reads an undirected graph in matrix market format, convert it into CSR, call Nerstrand with default parameters and returns the modularity score of the clustering.
Make sure you have downloaded and installed nerstrand : http://www-users.cs.umn.edu/~lasalle/nerstrand/
You should have... | 0 |
rapidsai_public_repos/nvgraph/test/ref | rapidsai_public_repos/nvgraph/test/ref/nerstrand/mm_host.hxx | #pragma once
#include <stdio.h>
extern "C" {
#include "mmio.h"
}
/// Read matrix properties from Matrix Market file
/** Matrix Market file is assumed to be a sparse matrix in coordinate
* format.
*
* @param f File stream for Matrix Market file.
* @param tg Boolean indicating whether to convert matrix to genera... | 0 |
rapidsai_public_repos/nvgraph/test/ref | rapidsai_public_repos/nvgraph/test/ref/nerstrand/mmio.h | /*
* Matrix Market I/O library for ANSI C
*
* See http://math.nist.gov/MatrixMarket for details.
*
*
*/
#ifndef MM_IO_H
#define MM_IO_H
#define MM_MAX_LINE_LENGTH 1025
#define MatrixMarketBanner "%%MatrixMarket"
#define MM_MAX_TOKEN_LENGTH 64
typedef char MM_typecode[4];
char *mm_typecode_to_str(MM_typecode ma... | 0 |
rapidsai_public_repos/nvgraph/test/ref | rapidsai_public_repos/nvgraph/test/ref/nerstrand/mmio.cpp | /*
* Matrix Market I/O library for ANSI C
*
* See http://math.nist.gov/MatrixMarket for details.
*
*
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "mmio.h"
int mm_read_unsymmetric_sparse(const char *fname, int *M_, int *N_, int *nz_,
double **val_, in... | 0 |
rapidsai_public_repos/nvgraph/test/ref | rapidsai_public_repos/nvgraph/test/ref/nerstrand/Makefile | CC=g++
CFLAGS=-O3 -fopenmp
LDFLAGS=-I. -L. libnerstrand.a
EXEC=nerstrand_bench
SOURCES=nerstrand_driver.cpp mmio.cpp
OBJECTS=$(SOURCES:.cpp=.o)
$(EXEC): $(OBJECTS)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
mmio.o: mmio.cpp mmio.h
$(CC) $(CFLAGS) -c $<
nerstand_driver.o: nerstand_driver.cpp mmio.h
$(CC) $(CFLAGS) -c $<... | 0 |
rapidsai_public_repos/nvgraph/test/ref | rapidsai_public_repos/nvgraph/test/ref/nerstrand/nerstrand_driver.cpp | #include <stdio.h>
#include <stddef.h>
#include <iostream>
#include <stdlib.h>
#include <vector>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/sysinfo.h>
#include "mmio.h"
#include "mm_host.hxx"
#include "nerstrand.h"
static double second (void)
{
struct timeval tv;
gettimeofday(&tv, NULL);... | 0 |
rapidsai_public_repos/nvgraph/test/ref | rapidsai_public_repos/nvgraph/test/ref/nerstrand/nestrand.sh | #!/bin/bash
nvg_data_prefix="/home/mnaumov/cuda_matrices/p4matrices/dimacs10"
declare -a dataset=(
"$nvg_data_prefix/preferentialAttachment.mtx"
"$nvg_data_prefix/caidaRouterLevel.mtx"
"$nvg_data_prefix/coAuthorsDBLP.mtx"
"$nvg_data_prefix/citationCiteseer.mtx"
"$nvg_data_prefix/coPapersDBLP.mtx"
"$nvg_data_prefix/co... | 0 |
rapidsai_public_repos/nvgraph/test/ref | rapidsai_public_repos/nvgraph/test/ref/nerstrand/nerstrand.h | /**
* @file nerstrand.h
* @brief Main header for for nerstrand
* @author Dominique LaSalle <lasalle@cs.umn.edu>
* Copyright 2013, Regents of the University of Minnesota
* @version 1
* @date 2014-01-27
*/
#ifndef NERSTRAND_H
#define NERSTRAND_H
#include <stdint.h>
#include <float.h>
#include <unistd.h>
... | 0 |
rapidsai_public_repos/nvgraph/test | rapidsai_public_repos/nvgraph/test/generators/plod.cpp | #include <fstream>
#include <assert.h>
#include <stdlib.h>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/plod_generator.hpp>
#include <boost/random/linear_congruential.hpp>
#include <boost/graph/graph_traits.hpp>
void printUsageAndExit()
{
printf("%s", "Usage:./plodg x\n");
printf("%s", "x is ... | 0 |
rapidsai_public_repos/nvgraph/test | rapidsai_public_repos/nvgraph/test/generators/Makefile | # Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and rel... | 0 |
rapidsai_public_repos/nvgraph/test | rapidsai_public_repos/nvgraph/test/generators/rmat.cpp | #include <fstream>
#include <assert.h>
#include <stdlib.h>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/rmat_graph_generator.hpp>
#include <boost/random/linear_congruential.hpp>
#include <boost/graph/graph_traits.hpp>
void printUsageAndExit()
{
printf("%s", "Usage:./rmatg x\n");
printf("%s", ... | 0 |
rapidsai_public_repos/nvgraph/test/generators | rapidsai_public_repos/nvgraph/test/generators/convertors/README.txt | -----------------------
Compile
-----------------------
> make
-----------------------
Run
-----------------------
To preprocess a set of edges in matrix market patern format
> ./pprocess.sh edges.dat
You can run separately
Sort :
> ./sort edges.dat
Compute H :
> ./H edges.dat
Compute H transposed and dangling... | 0 |
rapidsai_public_repos/nvgraph/test/generators | rapidsai_public_repos/nvgraph/test/generators/convertors/H_to_HtSorted_and_a.cpp | #include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <algorithm> // std::sort
#include <vector> // std::vector
// This code transpose a matrix H and compute the flag vector of empty rows a.
// We assume that H is row-substochastic, in MatrixMarket format and data are sorted by row id
// The outp... | 0 |
rapidsai_public_repos/nvgraph/test/generators | rapidsai_public_repos/nvgraph/test/generators/convertors/binary_converter.cpp | #include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <algorithm> // std::sort etc.
#include <vector> // std::vector
#include <iostream> // std::cout
typedef int idx_t;
typedef double val_t;
void printUsageAndExit()
{
printf("%s", "Usage:./mtob M.mtx\n");
printf... | 0 |
rapidsai_public_repos/nvgraph/test/generators | rapidsai_public_repos/nvgraph/test/generators/convertors/pprocess.sh | #!/bin/sh
edges="$1"
echo "Starting Sort on $edges..."
./sort $edges
echo "Done"
tmp="_s"
sedges=$edges$tmp
echo "Starting H on $sedges ..."
./H $sedges
echo "Done"
tmp="_mtx"
matrix=$sedges$tmp
#delete soted edges
rm $sedges
echo "Starting HTa on $matrix ..."
./HTA $matrix
tmp="_T"
outp=$edges$tmp
outpp=$matrix$t... | 0 |
rapidsai_public_repos/nvgraph/test/generators | rapidsai_public_repos/nvgraph/test/generators/convertors/Makefile | CC=g++
CFLAGS=-O3 -march=native -pipe -w
LDFLAGS=-lm
all: sort HTA H mtob
sort: sort_eges.cpp
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
HTA: H_to_HtSorted_and_a.cpp
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
H: edges_to_H.cpp
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
mtob: binary_converter.cpp
$(CC) $(CFLAGS) $(LDFLAGS) -o $... | 0 |
rapidsai_public_repos/nvgraph/test/generators | rapidsai_public_repos/nvgraph/test/generators/convertors/sort_eges.cpp | #include <stdio.h>
#include <stdlib.h>
#include <algorithm> // std::sort
#include <vector> // std::vector
struct edge {
unsigned long int r;
unsigned long int c;
};
void printUsageAndExit()
{
printf("%s", "Fatal Error\n");
printf("%s", "Usage: ./sort edges.dat\n");
printf("%s", "Input : Graph in ma... | 0 |
rapidsai_public_repos/nvgraph/test/generators | rapidsai_public_repos/nvgraph/test/generators/convertors/edges_to_H.cpp | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <vector>
struct edge {
unsigned long int r;
unsigned long int c;
};
void printUsageAndExit()
{
printf("%s", "Fatal Error\n");
printf("%s", "Usage: ./H edges.dat\n");
printf("%s", "Input : Graph given as a sorted set of edges\n");
printf("%s... | 0 |
rapidsai_public_repos/nvgraph/test | rapidsai_public_repos/nvgraph/test/local_test_data/small_T.mtx | %%MatrixMarket matrix coordinate real general
%%AMGX rhs
6 6 10
1 3 0.333333000
2 1 0.500000000
2 3 0.333333000
3 1 0.500000000
4 5 0.500000000
4 6 1.000000000
5 3 0.333333000
5 4 0.500000000
6 4 0.500000000
6 5 0.500000000
0
1
0
0
0
0
| 0 |
rapidsai_public_repos/nvgraph/test | rapidsai_public_repos/nvgraph/test/local_test_data/small.mtx | %%MatrixMarket matrix coordinate real general
6 6 10
1 2 0.500000
1 3 0.500000
3 1 0.333333
3 2 0.333333
3 5 0.333333
4 5 0.500000
4 6 0.500000
5 4 0.500000
5 6 0.500000
6 4 1.000000
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.