Skip to content

Instantly share code, notes, and snippets.

@bsubei
bsubei / repl_output_with_globals
Created July 24, 2015 01:14
repl session with globals and multiple spawned tasks for workers
20:10 Thinkpad $ turbine -n 8 -l repl_leaf.tic
[4] 0.000 MODE: WORK
[0] 0.000 MODE: WORK
[5] 0.000 MODE: WORK
[0] 0.001 WORK TYPES: WORK
[0] 0.001 WORKERS: 7 RANKS: 0 - 6
[0] 0.001 SERVERS: 1 RANKS: 7 - 7
[0] 0.001 WORK WORKERS: 7 RANKS: 0 - 6
[6] 0.000 MODE: WORK
[2] 0.000 MODE: WORK
@bsubei
bsubei / repl_output.txt
Created July 24, 2015 01:02
first repl session that truly runs on turbine (multiple workers)
20:00 Thinkpad $ turbine -n 8 -l repl_leaf.tic
[0] 0.000 MODE: WORK
[0] 0.004 WORK TYPES: WORK
[0] 0.004 WORKERS: 7 RANKS: 0 - 6
[0] 0.004 SERVERS: 1 RANKS: 7 - 7
[0] 0.004 WORK WORKERS: 7 RANKS: 0 - 6
[2] 0.000 MODE: WORK
[4] 0.000 MODE: WORK
[5] 0.000 MODE: WORK
[6] 0.000 MODE: WORK
@bsubei
bsubei / turbine0.7.0-error
Created July 8, 2015 16:29
I get this error when I try to run turbine 0.7.0
$ stc hello.swift
$ turbine -n 2 hello.tic
Too many workers allocated to executor types: {}.
Have 0 total workers, allocated
0 already, need at least one to serve as regular worker
while executing
"error "Too many workers allocated to executor types: {$n_workers_by_type}.\n Have $n_workers total workers, allocated
$workers_run..."
(procedure "rank_allocation" line 35)
invoked from within
@bsubei
bsubei / turbine-missing-package
Created June 24, 2015 21:17
error when attempting to run turbine
basheersubei@virtual-ubuntu-server-1:~$ stc hello.swift
basheersubei@virtual-ubuntu-server-1:~$ turbine hello.tcl
TURBINE_BIN : /usr/sbin/exm/turbine/bin
/usr/sbin/exm/turbine/bin
/usr/sbin/exm/turbine
can't find package turbine 0.3.0
while executing
"package require turbine 0.3.0"
(file "hello.tcl" line 63)can't find package turbine 0.3.0
while executing
@bsubei
bsubei / adlb_deb_error
Created June 24, 2015 16:13
adlb deb fails to install due to missing libmpich2-3 dependency, which I can't find
$ sudo dpkg -i adlb_0.6.0-1_amd64.deb
Selecting previously unselected package adlb.
(Reading database ... 710892 files and directories currently installed.)
Preparing to unpack adlb_0.6.0-1_amd64.deb ...
Unpacking adlb (0.6.0-1) ...
dpkg: dependency problems prevent configuration of adlb:
adlb depends on libmpich2-3; however:
Package libmpich2-3 is not installed.
dpkg: error processing package adlb (--install):
@bsubei
bsubei / swift-t-build-error
Created June 22, 2015 17:32
error when trying to build swift-t without zsh (solved after installing it)
...
checking for Tcl library at /usr/lib/x86_64-linux-gnu/libtcl8.6.so... exists!
using Tcl version: 8.6
Tcl shared library: /usr/lib/x86_64-linux-gnu/libtcl8.6.so
Tcl static library: /usr/lib/x86_64-linux-gnu/libtcl8.6.a
checking for tclConfig.sh at /usr/lib/x86_64-linux-gnu/tcl8.6... found
using tclConfig.sh in: /usr/lib/x86_64-linux-gnu/tcl8.6/
/usr/bin/env: zsh: No such file or directory
configure: error: Could not find Tcl 8.6 binary in /usr!
// Hello World for POSIX-threads
// compile using: gcc -o hello_thread hello_thread.c -lpthread
// then run like this: ./hello_thread 4
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
void *hello_world(void *thread_id) {
printf("Hello world from thread: %ld!\n", (long)thread_id);
}
@bsubei
bsubei / camera_tf.launch
Created May 28, 2015 17:02
static tf2 example
<launch>
<node pkg="tf2_ros" type="static_transform_publisher" name="camera_to_optical_tf" args="0 0 0 -1.570796 0 -1.570796 camera camera_optical" />
<!-- TODO set these actual transform values based on real robot!!! -->
<node pkg="tf2_ros" type="static_transform_publisher" name="base_footprint_to_base_link" args="0 0 0 0 0 0 base_footprint base_link" />
<node pkg="tf2_ros" type="static_transform_publisher" name="base_link_to_camera_tf" args="0 0 1.0 0 0.78539816339 0 base_link camera" />
</launch>
@bsubei
bsubei / camera_tf.launch
Created May 28, 2015 03:10
static tf publisher launch file for camera
<launch>
<node pkg="tf" type="static_transform_publisher" name="camera_to_optical_tf" args="0 0 0 -1.570796 0 -1.570796 camera camera_optical 10" />
<!-- TODO set these actual transform values based on real robot!!! -->
<node pkg="tf" type="static_transform_publisher" name="base_footprint_to_base_link" args="0 0 0 0 0 0 base_footprint base_link 10" />
<node pkg="tf" type="static_transform_publisher" name="base_link_to_camera_tf" args="0 0 1.0 0 0.78539816339 0 base_link camera 10" />
</launch>
@bsubei
bsubei / pointcloud-example.py
Created May 27, 2015 23:49
example rospy PointCloud publisher
#!/usr/bin/env python
import rospy
from camera_info_manager import *
from geometry_msgs.msg import Point
from sensor_msgs.msg import PointCloud
import std_msgs.msg
if __name__ == '__main__':