Mars: A MapReduce Framework on Graphics Processors Dedug调试
来源:互联网 发布:淘宝店铺出售平台 编辑:程序博客网 时间:2024/06/12 16:00
Mars是一个运行在gpu上的map/reduce框架,笔者最近最近想使用这个框架来做一些图处理的工作。
然而mars运行在linux+cuda平台之上,最重要的是2009年开发mars使用的cuda2.0版本,如今cuda已经发展到7.5
早期的库已经不支持。如何调试和运行mars困难重重。
接下来笔者分享运行和调试mars的一些经验。
1.我使用的unbutu版本是14.04,需要安装cuda driver和sdk(参考我的另一篇博客)
mars marInc.cu 文件用到cutil.h头文件。cuda5.0版本之后这个头文件已经不支持,必须从网上下载到这个sdk
使用当前nvcc编译生成相关静态链接库和动态链接库
2.配置makefile文件
mars自带的sample提供一下的makefile
# Add source files here
EXECUTABLE := subg_match/subg_match
# Cuda source files (compiled with cudacc)
CUFILES := main.cu MarsLib.cu MarsScan.cu MarsSort.cu
# C/C++ source files (compiled with gcc / c++)
CCFILES := MarsUtils.cpp
################################################################################
# Rules and targets
include ../../common/common.mk
注意最后引用commmon.mk makefile文件
打开这个makefile
line154-line170
# Debug/release configuration
ifeq ($(dbg),1)
COMMONFLAGS += -g
NVCCFLAGS += -D_DEBUG
CXXFLAGS += -D_DEBUG
CFLAGS += -D_DEBUG
BINSUBDIR := debug
LIBSUFFIX := D
else
COMMONFLAGS += -O2
BINSUBDIR := release
LIBSUFFIX :=
NVCCFLAGS += --compiler-options -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
CFLAGS += -fno-strict-aliasing
endif
Makefile执行时,首先判断dbg变量,如果dbg的值是1,编译debug版,否则编译release版。当然,默认情况下是编译release版的。
如果想编译debug版,要怎么做?
只要在执行make时,对dbg变量赋值,使得dbg的值为1,比如
# make dbg=1
这时执行make dbg=1,即可生成debug版本的程序,可以使用cuda-gdb来调试
- Mars: A MapReduce Framework on Graphics Processors Dedug调试
- Tenzing A SQL Implemention On The MapReduce Framework(译)
- CUDA编程——Mars:MapReduce on GPU
- Cortex-A series processors
- Synchronization issue on multi-processors
- ARM Cortex-A Series Processors
- 'int android.graphics.Bitmap.getWidth()' on a null object reference
- A simple REST framework on C/C++
- Power Management Modes on the ARM11 Processors
- /LGC图形渲染/Memory management for graphics processors
- The Boss on Mars
- Qt Graphics View Framework
- Graphics View Framework -30
- Qt Graphics View Framework
- Graphics View Framework
- Graphics View Framework
- Graphics View Framework 简介
- Graphics View Framework
- android学习日记(四):Fragment的实战下
- 浅谈Android性能优化方案
- 大索引技术,大数据的未来
- Proxifier
- ppp在linux下的编译和安装
- Mars: A MapReduce Framework on Graphics Processors Dedug调试
- Android提示版本更新(如何计算下载进度核心思路)
- 从零开始做运营 进阶篇
- 【复习笔记】决策树学习
- DrawerLayout的使用
- ubuntu install octave
- Unknown type name 'NSString' 问题已解决
- jsRender的使用
- Hashing