Skip to content

Commit

Permalink
build.sh no longer messes with LD_LIBRARY_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
akrizhevsky committed Aug 5, 2011
1 parent 17f2056 commit 35574fd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MODELNAME := _ConvNet

INCLUDES := -I$(PYTHON_INCLUDE) -I$(NUMPY_INCLUDE) -I./include
LIB := -lpthread -lcblas
INCLUDES := -I$(PYTHON_INCLUDE_PATH) -I$(NUMPY_INCLUDE_PATH) -I./include
LIB := -lpthread -L$(ATLAS_LIB_PATH) -L$(CUDA_INSTALL_PATH)/lib64 -lcblas

USECUBLAS := 1

Expand Down
10 changes: 5 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
export CUDA_INSTALL_PATH=/usr/local/cuda

# CUDA SDK installation directory
export CUDA_SDK_PATH=/home/spoon/NVIDIA_GPU_Computing_SDK/
export CUDA_SDK_PATH=/home/spoon/NVIDIA_GPU_Computing_SDK

# Python include directory. This should contain the file Python.h, among others.
export PYTHON_INCLUDE=/usr/include/python2.7/
export PYTHON_INCLUDE_PATH=/usr/include/python2.7

# Numpy include directory. This should contain the file arrayobject.h, among others.
export NUMPY_INCLUDE=/usr/include/python2.7_d/numpy/
export NUMPY_INCLUDE_PATH=/usr/lib64/python2.7/site-packages/numpy/core/include/numpy

# Leave this line alone.
export LD_LIBRARY_PATH=$CUDA_INSTALL_PATH/lib64:$CUDA_INSTALL_PATH/lib:$LD_LIBRARY_PATH
# ATLAS library directory. This should contain the file libcblas.so, among others.
export ATLAS_LIB_PATH=/usr/lib64/atlas

make $*

6 changes: 3 additions & 3 deletions common-gcc-cuda-4.0.mk
Original file line number Diff line number Diff line change
Expand Up @@ -281,18 +281,18 @@ endif

# If dynamically linking to CUDA and CUDART, we exclude the libraries from the LIB
ifeq ($(USECUDADYNLIB),1)
LIB += ${OPENGLLIB} $(PARAMGLLIB) $(RENDERCHECKGLLIB) $(CUDPPLIB) ${LIB} -ldl -rdynamic
LIB := ${OPENGLLIB} $(PARAMGLLIB) $(RENDERCHECKGLLIB) $(CUDPPLIB) ${LIB} -ldl -rdynamic
else
# static linking, we will statically link against CUDA and CUDART
ifeq ($(USEDRVAPI),1)
LIB += -lcuda ${OPENGLLIB} $(PARAMGLLIB) $(RENDERCHECKGLLIB) $(CUDPPLIB) ${LIB}
LIB := -lcuda ${OPENGLLIB} $(PARAMGLLIB) $(RENDERCHECKGLLIB) $(CUDPPLIB) ${LIB}
else
ifeq ($(emu),1)
LIB += -lcudartemu
else
LIB += -lcudart
endif
LIB += ${OPENGLLIB} $(PARAMGLLIB) $(RENDERCHECKGLLIB) $(CUDPPLIB) ${LIB}
LIB := ${OPENGLLIB} $(PARAMGLLIB) $(RENDERCHECKGLLIB) $(CUDPPLIB) ${LIB}
endif
endif

Expand Down

0 comments on commit 35574fd

Please sign in to comment.