Skip to content

Instantly share code, notes, and snippets.

View sriramkswamy's full-sized avatar

Sriram Krishnaswamy sriramkswamy

View GitHub Profile
@sriramkswamy
sriramkswamy / core-keys.ahk
Last active January 9, 2023 23:47
Windows AutoHotKey script for some shotrcuts
;; Change the basic layout of the keyboard a little bit
; Use just the Home key for Win Tab
Home::#Tab
; Use the End key to quit programs
End::!F4
; Switch between virtual desktops with Page Up and Page Down
PgUp::#^Left
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>
<key>Label</key>
@sriramkswamy
sriramkswamy / pk_trial.m
Created November 23, 2015 21:49
some drug test blog post
clear all; clc;
num_samples = 100;
x = linspace(0,1,101);
% First step - start from nothing and get an informative prior
alpha_uniform = 1;
beta_uniform = 1;
alpha_prior = 30;
beta_prior = 70;
failures_prior = 30;
@sriramkswamy
sriramkswamy / pi_hello.c
Last active August 29, 2015 14:17
Hello world equivalent for Parallel Computing
/*
This program will numerically compute the integral of
4/(1+x*x)
from 0 to 1. The value of this integral is pi -- which
is great since it gives us an easy way to check the answer.
The is the original sequential program. It uses the timer
@sriramkswamy
sriramkswamy / trilinos.cpp
Created March 17, 2015 17:31
The test trilinos code
#include <mpi.h>
#include <Teuchos_DefaultMpiComm.hpp> // wrapper for MPI_Comm
#include <Tpetra_Version.hpp> // Tpetra version string
int main(int argc, char *argv[])
{
std::cout << "Hello Trilinos!" << std::endl;
return 0;
}
@sriramkswamy
sriramkswamy / configure
Created March 17, 2015 17:28
Configure file for Trilinos
#!/bin/sh
TRILINOS_PATH=$HOME/Downloads/trilinos-11.12.1-Source/
OPENMPI=/usr/local/opt/open-mpi
EXTRA_ARGS=$@
rm -f CMakeCache.txt
rm -rf CMakeFiles
cmake \
-D CMAKE_BUILD_TYPE:STRING=DEBUG \
@sriramkswamy
sriramkswamy / brew-config
Created March 15, 2015 02:15
My brew configuration
$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: ccd981d823fc506bbf99811023a2ef1c792d3eb7
Last commit: 5 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit haswell
OS X: 10.10.2-x86_64
Xcode: 6.2
@sriramkswamy
sriramkswamy / CMakeError.log
Last active August 29, 2015 14:17
The error output for Trilinos and the error output when tried to run after compiling with homebrew
Performing C++ SOURCE FILE Test HAVE_TEUCHOS_LAPACKLARND failed with the following output:
Change Dir: /Users/aerobug/Downloads/trilinos-11.12.1-Source/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTryCompileExec1643959167/fast"
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTryCompileExec1643959167.dir/build.make CMakeFiles/cmTryCompileExec1643959167.dir/build
/usr/local/Cellar/cmake/3.1.3/bin/cmake -E cmake_progress_report /Users/aerobug/Downloads/trilinos-11.12.1-Source/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec1643959167.dir/src.cxx.o
/usr/local/opt/open-mpi/bin/mpicxx -DHAVE_TEUCHOS_LAPACKLARND -o CMakeFiles/cmTryCompileExec1643959167.dir/src.cxx.o -c /Users/aerobug/Downloads/trilinos-11.12.1-Source/build/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTryCompileExec1643959167
/usr/local/Cellar/cmake/3.1.3/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec1643959167.dir/link.txt --verbose=1
@sriramkswamy
sriramkswamy / mpic++ output
Last active August 29, 2015 14:17
Output of the mpic++ when tried to run trillinos.cpp
$ mpic++ trilinos.cpp
Undefined symbols for architecture x86_64:
"Tpetra::version()", referenced from:
exampleRoutine(Teuchos::RCP<Teuchos::Comm<int> const> const&) in trilinos-cc3c2c.o
"Teuchos::Describable::~Describable()", referenced from:
construction vtable for Teuchos::Describable-in-Teuchos::MpiComm<int> in trilinos-cc3c2c.o
construction vtable for Teuchos::Describable-in-Teuchos::MpiCommRequest<int> in trilinos-cc3c2c.o
construction vtable for Teuchos::Describable-in-Teuchos::CommRequest<int> in trilinos-cc3c2c.o
construction vtable for Teuchos::Describable-in-Teuchos::MpiCommRequestBase<int> in trilinos-cc3c2c.o
construction vtable for Teuchos::Describable-in-Teuchos::Details::MpiReductionOp<int> in trilinos-cc3c2c.o