This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import x10.io.Console; | |
import x10.util.Timer; | |
class ParallelHelloWorld { | |
public static def main(args:Rail[String]):void { | |
val timer = new Timer(); | |
val begin = timer.milliTime(); | |
finish for (p in Place.places()) { | |
async at (p) { | |
Console.OUT.println("Hello, I'm " + here); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#define _USE_MATH_DEFINES | |
#include <cmath> | |
#include <boost/math/special_functions/beta.hpp> | |
double Q_k0( double f0, double k0, double k ) { | |
double c = 1.0 / ( f0 * (k0+1.0) ); | |
double x = f0 / (1.0-f0); | |
double a = k + 1.0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
#include <omp.h> | |
#define NTHREADS 4 | |
void *myFun(void *x) | |
{ | |
int tid; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fileref=document.createElement('script') | |
fileref.setAttribute("type","text/javascript") | |
fileref.setAttribute("src", "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML") | |
document.getElementsByTagName("head")[0].appendChild(fileref) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum update | |
echo "[MongoDB] | |
name=MongoDB Repository | |
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64 | |
gpgcheck=0 | |
enabled=1" | sudo tee -a /etc/yum.repos.d/mongodb.repo | |
sudo yum install -y mongodb-org-server mongodb-org-shell mongodb-org-tools | |
sudo service mongod start | |
sudo chkconfig mongod on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require './config/environment' | |
psq_id = ARGV[0] | |
psq = ParameterSetQuery.find(psq_id) | |
$stderr.puts "Number of found PS: #{psq.parameter_sets.count}" | |
def replace_runs(run) | |
run_attr = { submitted_to: run.submitted_to, | |
mpi_procs: run.mpi_procs, | |
omp_threads: run.omp_threads, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import networkx | |
import sys | |
G = networkx.Graph() | |
argvs = sys.argv | |
if( len(argvs) != 4 ): | |
print 'Usage: python %s <d> <n> <seed>' % argvs[0] | |
quit() | |
d = int( argvs[1] ) | |
n = int( argvs[2] ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import x10.regionarray.Region; | |
class Region01 { | |
private static def p( o: Any ) { | |
Console.OUT.println( o ); | |
} | |
public static def main( args: Rail[String] ) { | |
val r1 = Region.make( 1..10 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Point01 { | |
static def p( o: Any ) { | |
Console.OUT.println( o ); | |
} | |
public static def main( args: Rail[String] ) { | |
Console.OUT.println("hello"); | |
// construct a 1-d point from Long |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import x10.util.ArrayList; | |
import x10.glb.ArrayListTaskBag; | |
import x10.glb.TaskQueue; | |
import x10.glb.TaskBag; | |
import x10.glb.GLBParameters; | |
import x10.glb.GLB; | |
import x10.util.Team; | |
import x10.glb.Context; | |
import x10.glb.ContextI; | |
import x10.glb.GLBResult; |