<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Fortran &#38; CUDA</title>
	<atom:link href="http://vietnamen.org/forcu/?feed=rss2&amp;lang=en" rel="self" type="application/rss+xml" />
	<link>http://vietnamen.org/forcu</link>
	<description>Một trang web mới xây dựng trên WordPress</description>
	<lastBuildDate>Thu, 05 Jan 2012 05:16:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CUDA 4.x on Ubuntu</title>
		<link>http://vietnamen.org/forcu/?p=1429&amp;lang=en</link>
		<comments>http://vietnamen.org/forcu/?p=1429&amp;lang=en#comments</comments>
		<pubDate>Thu, 05 Jan 2012 05:14:09 +0000</pubDate>
		<dc:creator>vietnamen</dc:creator>
				<category><![CDATA[Khác]]></category>

		<guid isPermaLink="false">http://vietnamen.org/forcu/?p=1429</guid>
		<description><![CDATA[Sorry, this entry is only available in Tiếng Việt.
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://vietnamen.org/forcu/?feed=rss2&amp;lang=vi">Tiếng Việt</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://vietnamen.org/forcu/?feed=rss2&amp;p=1429&amp;lang=en</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>compile cutil as shared library &#8211;&gt; libcutil_x86_64.so</title>
		<link>http://vietnamen.org/forcu/?p=1423&amp;lang=en</link>
		<comments>http://vietnamen.org/forcu/?p=1423&amp;lang=en#comments</comments>
		<pubDate>Mon, 24 May 2010 21:56:23 +0000</pubDate>
		<dc:creator>vietnamen</dc:creator>
				<category><![CDATA[CUDA]]></category>
		<category><![CDATA[CUDA C]]></category>
		<category><![CDATA[cutil as shared library]]></category>

		<guid isPermaLink="false">http://vietnamen.org/forcu/?p=1423</guid>
		<description><![CDATA[Today, I would like to share my experience in building cutil as a shared library. There are two files we need to modify: common.mk and Makefile
Makefile
At first, we need to comment out the variable STATIC_LIB and add a new one
DYNAMIC_LIB_BASE_NAME := cutil
That&#8217;s all for this file.
common.mk
Add this part before the #compiler section
# Build the final [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I would like to share my experience in building cutil as a shared library. There are two files we need to modify: common.mk and Makefile</p>
<h2>Makefile</h2>
<p>At first, we need to comment out the variable STATIC_LIB and add a new one</p>
<pre>DYNAMIC_LIB_BASE_NAME := cutil</pre>
<p>That&#8217;s all for this file.</p>
<h2>common.mk</h2>
<p>Add this part before the <strong>#compiler </strong>section</p>
<pre># Build the final library name
DYNAMIC_LIB := lib$(DYNAMIC_LIB_BASE_NAME)
ifeq ($(emu), 1)
 DYNAMIC_LIB := $(DYNAMIC_LIB)Emu
endif

ifneq ($(DARWIN),)
 DYNAMIC_LIB := $(DYNAMIC_LIB)-apple
endif

DYNAMIC_LIB := $(DYNAMIC_LIB)_x86

ifneq "$(strip $(HP_64))" ""
 DYNAMIC_LIB := $(DYNAMIC_LIB)_64
endif

LIB_EXTENSION :=
ifneq ($(DARWIN),)
 LIB_EXTENSION := .dylib
else
 LIB_EXTENSION := .so
endif
DYNAMIC_LIB := $(DYNAMIC_LIB)$(LIB_EXTENSION)</pre>
<p>Next, we modify the <strong>#Lib standard </strong>section so that it can work in both x86 and x86-64 environments.</p>
<pre># Libs
# standard
ifneq ($(DARWIN),)
 LIB      += -L$(CUDA_INSTALL_PATH)/lib -L$(LIBDIR) -L$(COMMONDIR)/lib -L$(COMMONDIR)/lib/darwin -lcuda -lcudart
else
 ifneq "$(strip $(HP_64))" ""
   LIB      += -L$(CUDA_INSTALL_PATH)/lib64 -L$(LIBDIR) -L$(COMMONDIR)/lib -L$(COMMONDIR)/lib/linux  -lcuda -lcudart
 else
   LIB      += -L$(CUDA_INSTALL_PATH)/lib -L$(LIBDIR) -L$(COMMONDIR)/lib -L$(COMMONDIR)/lib/linux  -lcuda -lcudart
 endif
endif</pre>
<p>Now, we come to the section for NVCCFLAGS.</p>
<pre># append optional arch/SM version flags (such as -arch sm_11)
NVCCFLAGS += $(SMVERSIONFLAGS)
NVCCFLAGS += -gencode=arch=compute_10,code=sm_10 -gencode=arch=compute_10,code=compute_10
NVCCFLAGS += -gencode=arch=compute_13,code=sm_13 -gencode=arch=compute_13,code=sm_20</pre>
<p>The fourth part is the section to set the flag for 32-bit or 64-bit machines</p>
<pre># architecture flag for cubin build
ifneq "$(strip $(HP_64))" ""
 CUBIN_ARCH_FLAG := -m64
else
 CUBIN_ARCH_FLAG := -m32
endif</pre>
<p>The fifth part is the #Lib section</p>
<pre>#Lib
LIB    +=  $(PARAMGLLIB) $(CUDPPLIB) ${LIB}</pre>
<p>Finally, the most important part is the section we tell how to make a static library or a shared library</p>
<pre># Lib/exe configuration
ifneq ($(STATIC_LIB),)   # make static library
 ifeq ($(emu), 1)
   NVCCFLAGS   += -deviceemu
   CUDACCFLAGS +=
   BINSUBDIR   := emu$(BINSUBDIR)
   LIBSUFFIX   := _$(LIB_ARCH)$(LIBSUFFIX)_emu
 # consistency, makes developing easier
   CXXFLAGS    += -D__DEVICE_EMULATION__
   CFLAGS        += -D__DEVICE_EMULATION__
 endif
 TARGETDIR := $(LIBDIR)
 TARGET   := $(subst .a,$(LIBSUFFIX).a,$(LIBDIR)/$(STATIC_LIB))
 LINKLINE  = ar qv $(TARGET) $(OBJS); ranlib $(TARGET)
else ifneq ($(DYNAMIC_LIB_BASE_NAME),)       # make shared library
 TARGETDIR := $(LIBDIR)
 TARGET    := $(LIBDIR)/$(DYNAMIC_LIB)
# Compilers
 NVCC       := nvcc
 CXX        := g++ -fPIC
 CC         := gcc
 LINK       := g++ -fPIC

 NVCCFLAGS   += -Xcompiler '-fPIC'
 LINKLINE  = $(CC) $(CUBIN_ARCH_FLAG) -shared -fPIC -o $(TARGET) $(OBJS) $(LIB)
else    # make executable file
 LIB += -lcutil_$(LIB_ARCH)$(LIBSUFFIX)
 # Device emulation configuration
 ifeq ($(emu), 1)
 NVCCFLAGS   += -deviceemu
 CUDACCFLAGS +=
 BINSUBDIR   := emu$(BINSUBDIR)
 # consistency, makes developing easier
 CXXFLAGS    += -D__DEVICE_EMULATION__
 CFLAGS        += -D__DEVICE_EMULATION__
 endif
 TARGETDIR := $(BINDIR)/$(BINSUBDIR)
 TARGET    := $(TARGETDIR)/$(EXECUTABLE)
 LINKLINE  = $(LINK) -o $(TARGET) $(OBJS) $(LIB)
endif</pre>
<p>That&#8217;s all, we will have libcutil_x86_64.so in the ../lib folder.</p>
<p>References:</p>
<ol>
<li> http://forums.nvidia.com/lofiversion/index.php?t156326.html</li>
<li>http://www.evl.uic.edu/sjames/cs525/apps/common.mk</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://vietnamen.org/forcu/?feed=rss2&amp;p=1423&amp;lang=en</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tools for C CUDA in Linux</title>
		<link>http://vietnamen.org/forcu/?p=1420&amp;lang=en</link>
		<comments>http://vietnamen.org/forcu/?p=1420&amp;lang=en#comments</comments>
		<pubDate>Fri, 23 Apr 2010 06:48:50 +0000</pubDate>
		<dc:creator>vietnamen</dc:creator>
				<category><![CDATA[CUDA]]></category>
		<category><![CDATA[FindCUDA.cmake]]></category>
		<category><![CDATA[Tool for CUDA]]></category>

		<guid isPermaLink="false">http://vietnamen.org/forcu/?p=1420</guid>
		<description><![CDATA[Sorry, this entry is only available in Tiếng Việt.
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://vietnamen.org/forcu/?feed=rss2&amp;lang=vi">Tiếng Việt</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://vietnamen.org/forcu/?feed=rss2&amp;p=1420&amp;lang=en</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tools for C CUDA in Windows</title>
		<link>http://vietnamen.org/forcu/?p=1417&amp;lang=en</link>
		<comments>http://vietnamen.org/forcu/?p=1417&amp;lang=en#comments</comments>
		<pubDate>Fri, 23 Apr 2010 06:43:26 +0000</pubDate>
		<dc:creator>vietnamen</dc:creator>
				<category><![CDATA[CUDA]]></category>
		<category><![CDATA[cudaPad]]></category>
		<category><![CDATA[Tool for CUDA]]></category>

		<guid isPermaLink="false">http://vietnamen.org/forcu/?p=1417</guid>
		<description><![CDATA[Sorry, this entry is only available in Tiếng Việt.
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://vietnamen.org/forcu/?feed=rss2&amp;lang=vi">Tiếng Việt</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://vietnamen.org/forcu/?feed=rss2&amp;p=1417&amp;lang=en</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install cudpp in Ubuntu 9.10</title>
		<link>http://vietnamen.org/forcu/?p=1400&amp;lang=en</link>
		<comments>http://vietnamen.org/forcu/?p=1400&amp;lang=en#comments</comments>
		<pubDate>Tue, 23 Mar 2010 17:47:54 +0000</pubDate>
		<dc:creator>vietnamen</dc:creator>
				<category><![CDATA[CUDA]]></category>
		<category><![CDATA[cuDPP]]></category>

		<guid isPermaLink="false">http://vietnamen.org/forcu/?p=1400</guid>
		<description><![CDATA[Here I mention how to install cuDPP 1.1 in Ubuntu 9.10

CUDA 2.3
gcc 4.3.3

Installation
First, do the followings

Unzip to /usr/local/cudpp
If you&#8217;re using a 64-bit system, modify all common.mk files to point to $CUDA_INSTALL_PATH/lib64, instead of $CUDA_INSTALL_PATH/lib
Jump to cudpp/common, type : make

If you download the zip file, you may get errors, so update the following files by #include [...]]]></description>
			<content:encoded><![CDATA[<p>Here I mention how to install cuDPP 1.1 in Ubuntu 9.10</p>
<ul>
<li>CUDA 2.3</li>
<li>gcc 4.3.3</li>
</ul>
<h2>Installation</h2>
<p>First, do the followings</p>
<ol>
<li>Unzip to /usr/local/cudpp</li>
<li>If you&#8217;re using a 64-bit system, modify all common.mk files to point to $CUDA_INSTALL_PATH/lib64, instead of $CUDA_INSTALL_PATH/lib</li>
<li>Jump to cudpp/common, type : make</li>
</ol>
<p>If you download the zip file, you may get errors, so update the following files by <span style="color: #ff0000;"><strong>#include</strong></span> the appropriate header files</p>
<ul>
<li>in common/src/cmd_arg_reader.cpp: &lt;typeinfo&gt;</li>
<li>in common/inc/cmd_arg_reader.h: &lt;typeinfo&gt;</li>
<li>in common/inc/exception.h: &lt;cstdlib&gt;</li>
<li>in common/src/cutil.cpp: &lt;cstring&gt;</li>
</ul>
<p>It&#8217;s better to check out the code from SVN using</p>
<pre>svn checkout http://cudpp.googlecode.com/svn/trunk/ /usr/local/cudpp</pre>
<p>That&#8217;s all, type</p>
<pre>make clean</pre>
<pre>make</pre>
<p>to build CUDA Utility Library (libcutil). The result looks like</p>
<pre>ar: creating ./../lib/libcutil.a
a - obj/release/bank_checker.cpp_o
a - obj/release/cmd_arg_reader.cpp_o
a - obj/release/cutil.cpp_o
a - obj/release/stopwatch.cpp_o
a - obj/release/stopwatch_linux.cpp_o
a - obj/release/findFile.cpp_o</pre>
<p>Then, jump to ../cudpp and type make. The result looks like</p>
<pre>ar: creating ./../lib/libcudpp64.a
a - obj/release/cudpp.cpp_o
a - obj/release/cudpp_plan.cpp_o
a - obj/release/cudpp_plan_manager.cpp_o
a - obj/release/cudpp_maximal_launch.cpp_o
a - obj/release/compact_app.cu_o
a - obj/release/scan_app.cu_o
a - obj/release/segmented_scan_app.cu_o
a - obj/release/spmvmult_app.cu_o
a - obj/release/radixsort_app.cu_o
a - obj/release/rand_app.cu_o</pre>
<p>You may need to change the common.mk file if you get linked error</p>
<pre>CXX        := g++ <strong>-fPIC
</strong>CC         := gcc <strong>-fPIC</strong>
LINK       := g++ -fPIC</pre>
<p>NOTE: There are two common.mk files, they are in linux_build/ folder and common/ folder.</p>
<h2>Sample codes</h2>
<p>Compile <strong>cudpp_testrig</strong>: you may get errors</p>
<pre>sparse.h:46: error: ‘malloc’ was not declared in this scope
spmvmult_gold.cpp: In function ‘void readMatrixMarket(MMMatrix*, const char*)’:
spmvmult_gold.cpp:94: error: ‘exit’ was not declared in this scope
spmvmult_gold.cpp:122: error: ‘qsort’ was not declared in this scope</pre>
<p>Then, you need to <strong>#include &lt;cstdlib&gt;</strong> to the file spmvmult_gold.cpp</p>
]]></content:encoded>
			<wfw:commentRss>http://vietnamen.org/forcu/?feed=rss2&amp;p=1400&amp;lang=en</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Tiếng Việt) Tài liệu thông số CPU</title>
		<link>http://vietnamen.org/forcu/?p=1397&amp;lang=en</link>
		<comments>http://vietnamen.org/forcu/?p=1397&amp;lang=en#comments</comments>
		<pubDate>Thu, 25 Feb 2010 03:33:26 +0000</pubDate>
		<dc:creator>vietnamen</dc:creator>
				<category><![CDATA[Khác]]></category>
		<category><![CDATA[CPU architecture]]></category>

		<guid isPermaLink="false">http://vietnamen.org/forcu/?p=1397</guid>
		<description><![CDATA[Sorry, this entry is only available in Tiếng Việt.
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://vietnamen.org/forcu/?feed=rss2&amp;lang=vi">Tiếng Việt</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://vietnamen.org/forcu/?feed=rss2&amp;p=1397&amp;lang=en</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GPU specification</title>
		<link>http://vietnamen.org/forcu/?p=1390&amp;lang=en</link>
		<comments>http://vietnamen.org/forcu/?p=1390&amp;lang=en#comments</comments>
		<pubDate>Wed, 17 Feb 2010 05:20:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CUDA]]></category>
		<category><![CDATA[Computational Modelling]]></category>
		<category><![CDATA[Fermi]]></category>
		<category><![CDATA[GPU specification]]></category>
		<category><![CDATA[Tesla card]]></category>

		<guid isPermaLink="false">http://vietnamen.org/forcu/?p=1390</guid>
		<description><![CDATA[Sorry, this entry is only available in Tiếng Việt.
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://vietnamen.org/forcu/?feed=rss2&amp;lang=vi">Tiếng Việt</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://vietnamen.org/forcu/?feed=rss2&amp;p=1390&amp;lang=en</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A collection of parallel programming models</title>
		<link>http://vietnamen.org/forcu/?p=1352&amp;lang=en</link>
		<comments>http://vietnamen.org/forcu/?p=1352&amp;lang=en#comments</comments>
		<pubDate>Thu, 17 Dec 2009 13:16:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Khác]]></category>
		<category><![CDATA[CUDA]]></category>
		<category><![CDATA[parallel programming model]]></category>

		<guid isPermaLink="false">http://vietnamen.org/forcu/?p=1352</guid>
		<description><![CDATA[C

CUDA (NVIDIA): original C, now extend to many languages
Stream framework (AMD ATI): now deprecated by OpenCL

C++

CUDA
Sieve C++ programming model
Intel Threading Building Block (TBB)
Intel Concurrent Collection (CnC)
RapidMind multi-core development platform (RapidMind Inc &#8211;&#62; Intel)

Fortran

CUDA
PGI Accelerate

MultiLange:

OpenMP
MPI
OpenCL
CUDA: C, C++, Python, Fortran, Matlab

]]></description>
			<content:encoded><![CDATA[<h1>C</h1>
<ol>
<li>CUDA (NVIDIA): original C, now extend to many languages</li>
<li>Stream framework (AMD ATI): now deprecated by OpenCL</li>
</ol>
<h1>C++</h1>
<ol>
<li>CUDA</li>
<li>Sieve C++ programming model</li>
<li>Intel Threading Building Block (TBB)</li>
<li>Intel Concurrent Collection (CnC)</li>
<li>RapidMind multi-core development platform (RapidMind Inc &#8211;&gt; Intel)</li>
</ol>
<h1>Fortran</h1>
<ol>
<li>CUDA</li>
<li>PGI Accelerate</li>
</ol>
<h1>MultiLange:</h1>
<ol>
<li>OpenMP</li>
<li>MPI</li>
<li>OpenCL</li>
<li>CUDA: C, C++, Python, Fortran, Matlab</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://vietnamen.org/forcu/?feed=rss2&amp;p=1352&amp;lang=en</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PGI Accelerate</title>
		<link>http://vietnamen.org/forcu/?p=1347&amp;lang=en</link>
		<comments>http://vietnamen.org/forcu/?p=1347&amp;lang=en#comments</comments>
		<pubDate>Wed, 16 Dec 2009 04:53:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computational Modelling]]></category>
		<category><![CDATA[PGI Accelerate]]></category>

		<guid isPermaLink="false">http://vietnamen.org/forcu/?p=1347</guid>
		<description><![CDATA[Sorry, this entry is only available in Tiếng Việt.
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://vietnamen.org/forcu/?feed=rss2&amp;lang=vi">Tiếng Việt</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://vietnamen.org/forcu/?feed=rss2&amp;p=1347&amp;lang=en</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Part 8: CUDA &#8211; kernel execution</title>
		<link>http://vietnamen.org/forcu/?p=1371&amp;lang=en</link>
		<comments>http://vietnamen.org/forcu/?p=1371&amp;lang=en#comments</comments>
		<pubDate>Fri, 06 Nov 2009 16:14:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computational Modelling]]></category>
		<category><![CDATA[CUDA]]></category>
		<category><![CDATA[kernel execution]]></category>

		<guid isPermaLink="false">http://vietnamen.org/forcu/?p=1371</guid>
		<description><![CDATA[Sorry, this entry is only available in Tiếng Việt.
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://vietnamen.org/forcu/?feed=rss2&amp;lang=vi">Tiếng Việt</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://vietnamen.org/forcu/?feed=rss2&amp;p=1371&amp;lang=en</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

