November, 2009

...now browsing by month

 

San Diego Trip

Friday, November 27th, 2009

Just a few night pictures taken on Coronado Island and its famous Coronado Hotel:

DSC_0026

Downtown San Diego seen from the north east side of Coronado Island:
DSC_0034

DSC_0039

NVIDIA CUDA: Compiling NVIDIA’s CUDA SDK under Snow Leopard

Wednesday, November 25th, 2009

Update 01/12/2010: thanks to a reader’s comment it appears that you also need to have a version Xcode greater than 3.0 installed on your Mac in order to properly compile the CUDA 2.3 SDK.

You may be greeted by a similar compilation error when building NVIDIA’s CUDA SDK 2.3 on Mac OS X Snow Leopard:

rc/rendercheck_gl.cpp:1277: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘GLuint’
r – obj/i386/release/rendercheck_gl.cpp.o
make -C src/3DFD/
ld: warning: in obj/i386/release/3dfd.cu.o, file is not of required architecture
ld: warning: in /usr/local/cuda/lib/libcudart.dylib, file is not of required architecture
Undefined symbols:
“_main”, referenced from:
start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [../../bin/darwin/release/3dfd] Error 1
make: *** [src/3DFD/Makefile.ph_build] Error 2rc/rendercheck_gl.cpp:1277: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘GLuint’
r – obj/i386/release/rendercheck_gl.cpp.o
make -C src/3DFD/
ld: warning: in obj/i386/release/3dfd.cu.o, file is not of required architecture
ld: warning: in /usr/local/cuda/lib/libcudart.dylib, file is not of required architecture
Undefined symbols:
“_main”, referenced from:
start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [../../bin/darwin/release/3dfd] Error 1
make: *** [src/3DFD/Makefile.ph_build] Error 2


make -C src/3DFD/
ld: warning: in obj/i386/release/3dfd.cu.o, file is not of required architecture
ld: warning: in /usr/local/cuda/lib/libcudart.dylib, file is not of required architecture


Undefined symbols:
“_main”, referenced from:
start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [../../bin/darwin/release/3dfd] Error 1
make: *** [src/3DFD/Makefile.ph_build] Error 2

The first error message stems from a mismatch between 32 and 64 bits objects/libraries, my Macbook which was running Snow Leopard out of the box was apparently running in 32 bits mode:

$uname -a
Darwin XXXX-MacBook.local 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov  3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386

If we look into the shared Makefile of the CUDA SDK (by default in /Developer/GPU Computing/C/common/common.mk) we find the following code responsible for selecting the adequate 32 or 64 bits compilation flags depending on which OS is detected:


# Determining the necessary Cross-Compilation Flags
# 32-bit OS, but we target 64-bit cross compilation
ifeq ($(x86_64),1)
NVCCFLAGS += -m64
LIB_ARCH = x86_64
ifneq ($(DARWIN),)
CXX_ARCH_FLAGS += -arch x86_64
else
CXX_ARCH_FLAGS += -m64
endif
else
# 64-bit OS, and we target 32-bit cross compilation
ifeq ($(i386),1)
NVCCFLAGS += -m32
LIB_ARCH = i386
ifneq ($(DARWIN),)
CXX_ARCH_FLAGS += -arch i386
else
CXX_ARCH_FLAGS += -m32
endif
else
ifneq ($(SNOWLEOPARD),)
NVCCFLAGS += -m32
CXX_ARCH_FLAGS += -arch i386 -m32
LIB_ARCH = i386
endif
endif
endif

The i386 or x86_64 environment variables are not set anywhere within the Makefile, therefore this Makefile expects them to be manually set. The last part of the code evaluates $SNOWLEOPARD which is set within the Makefile, it just doesn’t seem to be properly set since it is an empty string on my system.

Here are a few ways to fix the compilation error:

1) Set the i386 environment variable when running make using ‘make i386=1‘ (make sure to clean up the code first using ‘make clobber‘ in order to remove libraries which were compiled for the wrong architecture). This will ensure that the -m32 compilation flag is used, you just need to remember setting i386 every time.

2) For a permanent fix edit ‘common.mk’ and force the usage of -m32 by replacing the above code with:

NVCCFLAGS += -m32
LIB_ARCH = i386
CXX_ARCH_FLAGS += -arch i386 -m32

Clean up the previously compiled code with ‘make clobber’ and compile the SDK again with ‘make

3) Forcing $SNOWLEOPARD to a non null string in the Makefile should work as well.

Fall colors gallery

Saturday, November 14th, 2009

Just a few pictures showcasing Fall colors in the neighborhood:

DSC_0007

DSC_0035

DSC_0031

DSC_0028

DSC_0024

DSC_0022

DSC_0013

DSC_0012

DSC_0011

DSC_0048

Blood Energy Potion: brilliant design

Thursday, November 12th, 2009

Best packaging of the year? Definitely!

As for the idea of targeting youngsters with this product, well… I’d rather blame careless parents for letting their kids play so long they’d somehow need energy potions to stay awake…

blood_potion1

blood_potion2

blood_potion3

Guitar Porn: Fender USA Stevie Ray Vaughan Stratocaster

Thursday, November 12th, 2009

The Fender Artist Signature Stevie Ray Vaughan Stratocaster was one of the first few models featuring tall 6105 frets and a flatter 12″ fingerboard radius which greatly improve playability for string bending and soloing. Now you can find similar features other models like the Deluxe Players Strat or John Mayer Strat.

Other special features are the left handed gold tremolo, and Texas Special pickups. The Texas Special pickups are overwound even though SRV used standard pickups are got his hot tone from amps and tube screamer pedals rather than relying on overwound pickups.

SRV_Strat1

SRV_Strat2