Skip to content

Instantly share code, notes, and snippets.

@arsenm
arsenm / gist:650659
Created October 28, 2010 04:52
Windows MSVC separation results attempt 2
20:41:56 (2540): Can't set up shared mem: -1. Will run in standalone mode.
<search_application> milkywayathome separation 0.44 Windows x86 double </search_application>
<background_integral> 0.00034440467776670287 </background_integral>
<stream_integrals> 34.16259801227085500000 667.25896879728009000000 336.16783412736845000000 </stream_integrals>
<background_only_likelihood> -3.30823499270256560000 </background_only_likelihood>
<stream_only_likelihood> -84.30633002421788500000 -4.18235635055069200000 -4.11982130330399520000 </stream_only_likelihood>
<search_likelihood> -3.12509788380323220000 </search_likelihood>
20:42:53 (2540): called boinc_finish
53049411636730049364977183833592720783945446837098506886765690646586252032562905344211659148061496676057316084032703594719903001839120462451732823564817360798951751576217114249315407137667818457137152.00000000000000000000
void boinc_getcwd(char* path) {
#ifdef _WIN32
getcwd(path, 256);
#else
char* p
#ifdef __GNUC__
__attribute__ ((unused))
#endif
= getcwd(path, 256);
#endif
$ ./lol.sh
bin = ../../bin/Release/milkyway_separation.exe
Time = 46.658166643268487
<background_integral> 0.00034440467776670287 </background_integral>
<stream_integrals> 34.16259801227084800000 667.25896879728009000000 336.16783412736845000000 </stream_integrals>
<background_only_likelihood> -3.30823499270256560000 </background_only_likelihood>
<stream_only_likelihood> -160.79815144357599000000 -4.18580676656694270000 -4.11982130330399520000 </stream_only_likelihood>
<search_likelihood> -3.12509788380323220000 </search_likelihood>
real 0m51.246s
@arsenm
arsenm / Xorg.0.log
Created January 28, 2011 15:41
My failing xorg.conf for Nvidia and Catalyst at the same time
[ 1068.681]
X.Org X Server 1.9.2
Release Date: 2010-10-30
[ 1068.681] X Protocol Version 11, Revision 0
[ 1068.681] Build Operating System: Linux 2.6.35-ARCH x86_64
[ 1068.681] Current Operating System: Linux stacy 2.6.37-stacy2 #6 SMP PREEMPT Fri Jan 21 09:51:58 EST 2011 x86_64
[ 1068.681] Kernel command line: BOOT_IMAGE=/vmlinuz26-stacy root=/dev/sda2 ro noagp noexec=on nomodeset
[ 1068.681] Build Date: 01 November 2010 10:29:19PM
[ 1068.681]
[ 1068.681] Current version of pixman: 0.20.2
@arsenm
arsenm / LOL Functions
Created March 13, 2011 07:45
I made some kind of mess
-- Lua implementation of the curry function
-- Developed by tinylittlelife.org
-- released under the WTFPL (http://sam.zoy.org/wtfpl/)
-- curry(func, num_args) : take a function requiring a tuple for num_args arguments
-- and turn it into a series of 1-argument functions
-- e.g.: you have a function dosomething(a, b, c)
-- curried_dosomething = curry(dosomething, 3) -- we want to curry 3 arguments
-- curried_dosomething (a1) (b1) (c1) -- returns the result of dosomething(a1, b1, c1)
-- partial_dosomething1 = curried_dosomething (a_value) -- returns a function
@arsenm
arsenm / test script
Created July 6, 2011 22:19
test script
#!/usr/bin/env bash
dir="../../bin"
bin=${dir}/milkyway_separation
gpu="--device 0"
function runTest11()
{
gdb --args ${bin} ${gpu} -s stars/stars-11.txt -a astronomy_parameters-11-small.txt -np 20 -p 0.571713 12.312119 -3.305187 148.010257 22.453902 0.42035 -0.468858 0.760579 -1.361644 177.884238 23.882892 1.210639 -1.611974 8.534378 -1.361644 177.884238 10.882892 1.210639 -1.611974 8.534378
@arsenm
arsenm / CrashTestCase.cl
Created August 11, 2011 23:56
AMD OpenCL compiler crash test case
__kernel void broken(__global double* _x,
__global double* _y,
__global int* debug,
int missing)
{
int k = get_global_id(0);
while (k < 100)
{
//double x = _x[k];
@arsenm
arsenm / gist:1252767
Created September 30, 2011 05:29
lol ATISTREAMSDKROOT
/tmp/OCLF8q18i.cl(281): error: invalid argument to attribute
"reqd_work_group_size"
__attribute__ ((reqd_work_group_size(THREADS1, 1, 1)))
^
/tmp/OCLF8q18i.cl(396): error: invalid argument to attribute
"reqd_work_group_size"
__attribute__ ((reqd_work_group_size(THREADS2, 1, 1)))
^
@arsenm
arsenm / amd_bug_trio.c
Created October 18, 2011 03:01
Triple AMD compiler bug
/*
3 bugs related to use of an undeclared variable "step"
This does not happen with other names I tried, only step.
Tested: Linux x86_64 (kernel 3.0), Catalyst 11.9, SDK 2.5
Compiling for Cayman
Define BUG to 1, 2, or 3 to experience each bug
*/