Andrew Cooke | Contents | Latest | RSS | Previous | Next

C[omp]ute

Welcome to my blog, which was once a mailing list of the same name and is still generated by mail. Please reply via the "comment" links.

Always interested in offers/projects/new ideas. Eclectic experience in fields like: numerical computing; Python web; Java enterprise; functional languages; GPGPU; SQL databases; etc. Based in Santiago, Chile; telecommute worldwide. CV; email.

Personal Projects

Choochoo Training Diary

Last 100 entries

Surprise Paradox; [Books] Good Author List; [Computing] Efficient queries with grouping in Postgres; [Computing] Automatic Wake (Linux); [Computing] AWS CDK Aspects in Go; [Bike] Adidas Gravel Shoes; [Computing, Horror] Biological Chips; [Books] Weird Lit Recs; [Covid] Extended SIR Models; [Art] York-based Printmaker; [Physics] Quantum Transitions are not Instantaneous; [Computing] AI and Drum Machines; [Computing] Probabilities, Stopping Times, Martingales; bpftrace Intro Article; [Computing] Starlab Systems - Linux Laptops; [Computing] Extended Berkeley Packet Filter; [Green] Mainspring Linear Generator; Better Approach; Rummikub Solver; Chilean Poetry; Felicitations - Empowerment Grant; [Bike] Fixing Spyre Brakes (That Need Constant Adjustment); [Computing, Music] Raspberry Pi Media (Audio) Streamer; [Computing] Amazing Hack To Embed DSL In Python; [Bike] Ruta Del Condor (El Alfalfal); [Bike] Estimating Power On Climbs; [Computing] Applying Azure B2C Authentication To Function Apps; [Bike] Gearing On The Back Of An Envelope; [Computing] Okular and Postscript in OpenSuse; There's a fix!; [Computing] Fail2Ban on OpenSuse Leap 15.3 (NFTables); [Cycling, Computing] Power Calculation and Brakes; [Hardware, Computing] Amazing Pockit Computer; Bullying; How I Am - 3 Years Post Accident, 8+ Years With MS; [USA Politics] In America's Uncivil War Republicans Are The Aggressors; [Programming] Selenium and Python; Better Walking Data; [Bike] How Fast Before Walking More Efficient Than Cycling?; [COVID] Coronavirus And Cycling; [Programming] Docker on OpenSuse; Cadence v Speed; [Bike] Gearing For Real Cyclists; [Programming] React plotting - visx; [Programming] React Leaflet; AliExpress Independent Sellers; Applebaum - Twilight of Democracy; [Politics] Back + US Elections; [Programming,Exercise] Simple Timer Script; [News] 2019: The year revolt went global; [Politics] The world's most-surveilled cities; [Bike] Hope Freehub; [Restaurant] Mama Chau's (Chinese, Providencia); [Politics] Brexit Podcast; [Diary] Pneumonia; [Politics] Britain's Reichstag Fire moment; install cairo; [Programming] GCC Sanitizer Flags; [GPU, Programming] Per-Thread Program Counters; My Bike Accident - Looking Back One Year; [Python] Geographic heights are incredibly easy!; [Cooking] Cookie Recipe; Efficient, Simple, Directed Maximisation of Noisy Function; And for argparse; Bash Completion in Python; [Computing] Configuring Github Jekyll Locally; [Maths, Link] The Napkin Project; You can Masquerade in Firewalld; [Bike] Servicing Budget (Spring) Forks; [Crypto] CIA Internet Comms Failure; [Python] Cute Rate Limiting API; [Causality] Judea Pearl Lecture; [Security, Computing] Chinese Hardware Hack Of Supermicro Boards; SQLAlchemy Joined Table Inheritance and Delete Cascade; [Translation] The Club; [Computing] Super Potato Bruh; [Computing] Extending Jupyter; Further HRM Details; [Computing, Bike] Activities in ch2; [Books, Link] Modern Japanese Lit; What ended up there; [Link, Book] Logic Book; Update - Garmin Express / Connect; Garmin Forerunner 35 v 230; [Link, Politics, Internet] Government Trolls; [Link, Politics] Why identity politics benefits the right more than the left; SSH Forwarding; A Specification For Repeating Events; A Fight for the Soul of Science; [Science, Book, Link] Lost In Math; OpenSuse Leap 15 Network Fixes; Update; [Book] Galileo's Middle Finger; [Bike] Chinese Carbon Rims; [Bike] Servicing Shimano XT Front Hub HB-M8010; [Bike] Aliexpress Cycling Tops; [Computing] Change to ssh handling of multiple identities?; [Bike] Endura Hummvee Lite II; [Computing] Marble Based Logic; [Link, Politics] Sanity Check For Nuclear Launch; [Link, Science] Entropy and Life

© 2006-2017 Andrew Cooke (site) / post authors (content).

GPGPU / NVidia Cuda / OpenSuse 11

From: "andrew cooke" <andrew@...>

Date: Mon, 14 Jul 2008 23:40:44 -0400 (CLT)

I decided to explore GPGPU - http://en.wikipedia.org/wiki/GPGPU

After a look around it seemed like NVidia CUDA had most activity/support
and a low entry price.  So I went out and bought me a new graphics card (a
couple of days before the rumours started about bad 8400 and 8600 chips) -
an air-cooled MSI GeForce NX8600GT with 512 MB memory (nothing wonderful -
just one step up from the minimum so it should, hopefully, be faster than
my CPU).

(BTW, since I was worried about temperatures after adding the card, I had
a look at my disks, and found they were worryingly high at around 45C;
Removing an unused bracket from inside the case improved airflow and got
them down to around 35C.  The GPU sits at just under 50C when in normal
use - the heatsink is directly under a fairly quiet case mounted fan (I
bought aircooled mainly because I was worried about replacement GPU fans -
I know I can find quiet, case-mounted fans no problem)).

Then I installed the software.  The NVidia site -
http://www.nvidia.com/object/cuda_get.html - doesn't mention OpenSuse 11,
but the 10.3 stuff has worked OK so far.  First I installed the driver,
which works the same as other NVidia binary driver installs (a curses
non-X interface that compiles and installs automatically - looks a bit odd
but has always been very reliable).  Next the support library, and finally
the SDK.

The SDK install was a bit odd - turns out there's a Perl script in there
that's buffering text it should be sending to stdout.  So here's the
workaround:

 ./NVIDIA_CUDA_sdk_2.0beta2_linux.run --help

shows a bunch of options, including one to just unpack the source.  Use
that.  Then edit the perl script - install-sdk-linux.pl - so that it
includes

 select((select(STDOUT), $|=1)[0]);

just before the first "if" statement.  Then run the script.

I've not actually used the toolkit yet - will post updates later.

Andrew

Using gcc-4.3

From: "andrew cooke" <andrew@...>

Date: Tue, 15 Jul 2008 00:22:18 -0400 (CLT)

Just hit this: http://forums.nvidia.com/lofiversion/index.php?t70216.html

(I had to modify cmd_arg_reader.h instead of .cpp, and cppIntegration.cpp
seems to be missing from a path).

Also hit the first known issue here:
http://developer.download.nvidia.com/compute/cuda/1_1/CUDA_SDK_release_notes_linux.txt

Also hit http://forums.nvidia.com/lofiversion/index.php?t43510.html

...and with those fixes, it seems to work - compile with no further
errors, and the first example runs!  While running the screen locks up
(mouse disappears) for a moment, and the GPU temperature increases
slightly. :o)

Ooo - and some graphics demos too :o)))


qp6c release: ./deviceQuery
There is 1 device supporting CUDA

Device 0: "GeForce 8600 GT"
  Major revision number:                         1
  Minor revision number:                         1
  Total amount of global memory:                 536543232 bytes
  Number of multiprocessors:                     4
  Number of cores:                               32
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       16384 bytes
  Total number of registers available per block: 8192
  Warp size:                                     32
  Maximum number of threads per block:           512
  Maximum sizes of each dimension of a block:    512 x 512 x 64
  Maximum sizes of each dimension of a grid:     65535 x 65535 x 1
  Maximum memory pitch:                          262144 bytes
  Texture alignment:                             256 bytes
  Clock rate:                                    1.19 GHz
  Concurrent copy and execution:                 Yes


Andrew

Diff and Patched CUDA SDK for OpenSuse 11, 64 bit

From: "andrew cooke" <andrew@...>

Date: Thu, 17 Jul 2008 08:32:41 -0400 (CLT)

Updated: Diffs now include change to installer perl script too
(tarball is unchanged)

Important: see additional instructions at the end of this post.

There are also downloads below.

Here is a simple diff of the changes I made.  Note that they are just as I
did them in a hurry, taking no care to place includes under correct
comment blocks etc:

qp6c nvidia: diff -r sdk sdk-patched
diff -r sdk/install-sdk-linux.pl sdk-patched/install-sdk-linux.pl
20a21,22
> select((select(STDOUT), $|=1)[0]);
>
diff -r sdk/sdk/common/common.mk sdk-patched/sdk/common/common.mk
125c125,126
< CUBIN_ARCH_FLAG := -m32
---
> #CUBIN_ARCH_FLAG := -m32
> CUBIN_ARCH_FLAG := -m64
diff -r sdk/sdk/common/inc/cmd_arg_reader.h
sdk-patched/sdk/common/inc/cmd_arg_reader.h
34a35,36
> #include <typeinfo>
>
diff -r sdk/sdk/common/inc/exception.h sdk-patched/sdk/common/inc/exception.h
37a38
> #include <cstdlib>
diff -r sdk/sdk/common/src/cutil.cpp sdk-patched/sdk/common/src/cutil.cpp
52a53
> #include <cstring>
diff -r sdk/sdk/common/src/paramgl.cpp sdk-patched/sdk/common/src/paramgl.cpp
8a9
> #include <cstring>
diff -r sdk/sdk/projects/cppIntegration/main.cpp
sdk-patched/sdk/projects/cppIntegration/main.cpp
47a48
> #include <cstdlib>

For a limited time, I am also providing the following downloads.  There's
no intention of breaking any copyright and if NVidia or anyone else wants
these removed, please just email me at andrew@...

A context diff is available at
  http://www.acooke.org/cuda-sdk.diff

A gzipped tarball of the patched SDK is available at
  http://www.acooke.org/sdk-patched.tgz
To use this, unpack and then run the perl script install-sdk-linux.pl

*** IMPORTANT ****

In addition, you still need to apply the fix described at
http://developer.download.nvidia.com/compute/cuda/1_1/CUDA_SDK_release_notes_linux.txt

This means doing the following:
  sudo ln -s /usr/lib64/libglut.so.3 /usr/lib64/libglut.so

So, to use CUDA on OpenSuse 11 64 bit you must:
1: Install the various drivers and support files provide by NVidia
2: Instead of installing the SDK they provide, install the one provided
above.
3: Link libglut as described above

For 32 bit things should be similar, but omit the "-m64" change in
common.mk and look for libglut in /usr/lib.

Disclaimer:
With these changes I can (nearly?) run all the examples.  I have not done
any other work yet with CUDA.

Andrew

More Notes on GPGPU Programming

From: andrew cooke <andrew@...>

Date: Sat, 9 Jan 2010 12:22:27 -0300

Since writing the notes here I switched to OpenCL.  See the following links:

http://www.acooke.org/cute/Experience0.html - Summarizes the work I
did moving code from Matlab to OpenCL (a speedup of around 100x).

http://acooke.org/cute/MatlabonNV0.html - Earlier notes on Matlab +
OpenCL (better to read the link above).

http://acooke.org/cute/Installing2.html - Summary of OpenCL install on
OpenSuse 11.1

Andrew

Comment on this post