Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > nonfree-updates > by-pkgid > fd8445e7e4d58b8cfe6e0150bd441ee1 > files > 1120

nvidia-cuda-toolkit-devel-6.5.14-6.1.mga5.nonfree.x86_64.rpm

<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
      <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
      <meta name="copyright" content="(C) Copyright 2005"></meta>
      <meta name="DC.rights.owner" content="(C) Copyright 2005"></meta>
      <meta name="DC.Type" content="concept"></meta>
      <meta name="DC.Title" content="NVIDIA CUDA Getting Started Guide for Mac OS X"></meta>
      <meta name="abstract" content="The installation instructions for the CUDA Toolkit on Mac OS X."></meta>
      <meta name="description" content="The installation instructions for the CUDA Toolkit on Mac OS X."></meta>
      <meta name="DC.Coverage" content="Getting Started Guides"></meta>
      <meta name="DC.subject" content="CUDA Mac, CUDA Mac requirements, CUDA Mac supported versions, CUDA Mac gcc, CUDA Mac driver, CUDA Mac GPU, CUDA Mac download, CUDA Mac install verification, CUDA Mac examples, CUDA Mac binaries"></meta>
      <meta name="keywords" content="CUDA Mac, CUDA Mac requirements, CUDA Mac supported versions, CUDA Mac gcc, CUDA Mac driver, CUDA Mac GPU, CUDA Mac download, CUDA Mac install verification, CUDA Mac examples, CUDA Mac binaries"></meta>
      <meta name="DC.Format" content="XHTML"></meta>
      <meta name="DC.Identifier" content="abstract"></meta>
      <link rel="stylesheet" type="text/css" href="../common/formatting/commonltr.css"></link>
      <link rel="stylesheet" type="text/css" href="../common/formatting/site.css"></link>
      <title>Getting Started Mac OS X :: CUDA Toolkit Documentation</title>
      <!--[if lt IE 9]>
      <script src="../common/formatting/html5shiv-printshiv.min.js"></script>
      <![endif]-->
      <script type="text/javascript" charset="utf-8" src="../common/scripts/tynt/tynt.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.min.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.ba-hashchange.min.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.scrollintoview.min.js"></script>
      <script type="text/javascript" src="../search/htmlFileList.js"></script>
      <script type="text/javascript" src="../search/htmlFileInfoList.js"></script>
      <script type="text/javascript" src="../search/nwSearchFnt.min.js"></script>
      <script type="text/javascript" src="../search/stemmers/en_stemmer.min.js"></script>
      <script type="text/javascript" src="../search/index-1.js"></script>
      <script type="text/javascript" src="../search/index-2.js"></script>
      <script type="text/javascript" src="../search/index-3.js"></script>
      <link rel="canonical" href="http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-mac-os-x/index.html"></link>
      <link rel="stylesheet" type="text/css" href="../common/formatting/qwcode.highlight.css"></link>
   </head>
   <body>
      
      <header id="header"><span id="company">NVIDIA</span><span id="site-title">CUDA Toolkit Documentation</span><form id="search" method="get" action="search">
            <input type="text" name="search-text"></input><fieldset id="search-location">
               <legend>Search In:</legend>
               <label><input type="radio" name="search-type" value="site"></input>Entire Site</label>
               <label><input type="radio" name="search-type" value="document"></input>Just This Document</label></fieldset>
            <button type="reset">clear search</button>
            <button id="submit" type="submit">search</button></form>
      </header>
      <div id="site-content">
         <nav id="site-nav">
            <div class="category closed"><a href="../index.html" title="The root of the site.">CUDA Toolkit
                  v6.5</a></div>
            <div class="category"><a href="index.html" title="Getting Started Mac OS X">Getting Started Mac OS X</a></div>
            <ul>
               <li>
                  <div class="section-link"><a href="#introduction">1.&nbsp;Introduction</a></div>
                  <ul>
                     <li>
                        <div class="section-link"><a href="#system-requirements">1.1.&nbsp;System Requirements</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#about-this-document">1.2.&nbsp;About This Document</a></div>
                     </li>
                  </ul>
               </li>
               <li>
                  <div class="section-link"><a href="#prerequisites">2.&nbsp;Prerequisites</a></div>
                  <ul>
                     <li>
                        <div class="section-link"><a href="#cuda-enabled-gpu">2.1.&nbsp;CUDA-capable GPU</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#mac-os-version">2.2.&nbsp;Mac OS X Version</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#verify-gcc-installed">2.3.&nbsp;Command-Line Tools</a></div>
                     </li>
                  </ul>
               </li>
               <li>
                  <div class="section-link"><a href="#installation">3.&nbsp;Installation</a></div>
                  <ul>
                     <li>
                        <div class="section-link"><a href="#download">3.1.&nbsp;Download</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#install">3.2.&nbsp;Install</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#uninstall">3.3.&nbsp;Uninstall</a></div>
                     </li>
                  </ul>
               </li>
               <li>
                  <div class="section-link"><a href="#verification">4.&nbsp;Verification</a></div>
                  <ul>
                     <li>
                        <div class="section-link"><a href="#driver-verification">4.1.&nbsp;Driver</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#compiler-verification">4.2.&nbsp;Compiler</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="#runtime-verification">4.3.&nbsp;Runtime</a></div>
                     </li>
                  </ul>
               </li>
               <li>
                  <div class="section-link"><a href="#additional-considerations">5.&nbsp;Additional Considerations</a></div>
               </li>
            </ul>
         </nav>
         <div id="resize-nav"></div>
         <nav id="search-results">
            <h2>Search Results</h2>
            <ol></ol>
         </nav>
         
         <div id="contents-container">
            <div id="breadcrumbs-container">
               <div id="release-info">Getting Started Mac OS X
                  (<a href="../../pdf/CUDA_Getting_Started_Mac.pdf">PDF</a>)
                  -
                  
                  v6.5
                  (<a href="https://developer.nvidia.com/cuda-toolkit-archive">older</a>)
                  -
                  Last updated August 1, 2014
                  -
                  <a href="mailto:cudatools@nvidia.com?subject=CUDA Toolkit Documentation Feedback: Getting Started Mac OS X">Send Feedback</a>
                  -
                  <span class="st_facebook"></span><span class="st_twitter"></span><span class="st_linkedin"></span><span class="st_reddit"></span><span class="st_slashdot"></span><span class="st_tumblr"></span><span class="st_sharethis"></span></div>
            </div>
            <article id="contents">
               <div class="topic nested0" id="abstract"><a name="abstract" shape="rect">
                     <!-- --></a><h2 class="title topictitle1"><a href="#abstract" name="abstract" shape="rect">NVIDIA CUDA Getting Started Guide for Mac OS X</a></h2>
                  <div class="body conbody"></div>
               </div>
               <div class="topic concept nested0" id="introduction"><a name="introduction" shape="rect">
                     <!-- --></a><h2 class="title topictitle1"><a href="#introduction" name="introduction" shape="rect">1.&nbsp;Introduction</a></h2>
                  <div class="body conbody">
                     <p class="p">CUDA<sup>®</sup> is a parallel computing platform and programming model invented by NVIDIA. It enables dramatic increases in computing performance
                        by harnessing the power of the graphics processing unit (GPU).
                     </p>
                     <div class="p">CUDA was developed with several design goals in mind:
                        
                        <ul class="ul">
                           <li class="li">Provide a small set of extensions to standard programming languages, like C, that enable a straightforward implementation
                              of parallel algorithms. With CUDA C/C++, programmers can focus on the task of parallelization of the algorithms rather than
                              spending time on their implementation.
                           </li>
                           <li class="li">Support heterogeneous computation where applications use both the CPU and GPU. Serial portions of applications are run on
                              the CPU, and parallel portions are offloaded to the GPU. As such, CUDA can be incrementally applied to existing applications.
                              The CPU and GPU are treated as separate devices that have their own memory spaces. This configuration also allows simultaneous
                              computation on the CPU and GPU without contention for memory resources.
                           </li>
                        </ul>
                        
                        CUDA-capable GPUs have hundreds of cores that can collectively run thousands of computing threads. These cores have shared
                        resources including a register file and a shared memory. The on-chip shared memory allows parallel tasks running on these
                        cores to share data without sending it over the system memory bus.
                     </div>
                     <p class="p">This guide will show you how to install and check the correct operation of the CUDA development tools.</p>
                  </div>
                  <div class="topic concept nested1" id="system-requirements"><a name="system-requirements" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#system-requirements" name="system-requirements" shape="rect">1.1.&nbsp;System Requirements</a></h3>
                     <div class="body conbody">
                        <div class="p">To use CUDA on your system, you need to have:
                           <ul class="ul">
                              <li class="li">a CUDA-capable GPU</li>
                              <li class="li">Mac OS X 10.8 or later</li>
                              <li class="li">the <dfn class="term">gcc</dfn> or <dfn class="term">Clang</dfn> compiler and toolchain installed using Xcode
                              </li>
                              <li class="li">the NVIDIA CUDA Toolkit (available from the <a class="xref" href="http://developer.nvidia.com/cuda-downloads" target="_blank" shape="rect">CUDA Download page</a>)
                              </li>
                           </ul>
                        </div>
                        <div class="tablenoborder"><a name="system-requirements__table_hrp_klk_qk" shape="rect">
                              <!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="system-requirements__table_hrp_klk_qk" class="table" frame="border" border="1" rules="all">
                              <caption><span class="tablecap">Table 1. Mac Operating System Support in CUDA <span class="keyword">6.5</span></span></caption>
                              <thead class="thead" align="left">
                                 <tr class="row">
                                    <th class="entry" align="left" valign="top" width="NaN%" id="d54e153" rowspan="1" colspan="1">Operating System</th>
                                    <th class="entry" align="center" valign="top" width="NaN%" id="d54e156" rowspan="1" colspan="1">Native x86_64</th>
                                    <th class="entry" align="left" valign="top" width="NaN%" id="d54e159" rowspan="1" colspan="1">GCC</th>
                                    <th class="entry" align="left" valign="top" width="NaN%" id="d54e162" rowspan="1" colspan="1">Clang</th>
                                 </tr>
                              </thead>
                              <tbody class="tbody">
                                 <tr class="row">
                                    <td class="entry" align="left" valign="top" width="NaN%" headers="d54e153" rowspan="1" colspan="1">Mac OS X 10.9.x </td>
                                    <td class="entry" align="center" valign="top" width="NaN%" headers="d54e156" rowspan="1" colspan="1">YES</td>
                                    <td class="entry" align="left" valign="top" width="NaN%" headers="d54e159" rowspan="1" colspan="1">&nbsp;</td>
                                    <td class="entry" align="left" valign="top" width="NaN%" headers="d54e162" rowspan="1" colspan="1">5.0, 4.2</td>
                                 </tr>
                                 <tr class="row">
                                    <td class="entry" align="left" valign="top" width="NaN%" headers="d54e153" rowspan="1" colspan="1">Mac OS X 10.8.x</td>
                                    <td class="entry" align="center" valign="top" width="NaN%" headers="d54e156" rowspan="1" colspan="1">YES</td>
                                    <td class="entry" align="left" valign="top" width="NaN%" headers="d54e159" rowspan="1" colspan="1">4.2.1</td>
                                    <td class="entry" align="left" valign="top" width="NaN%" headers="d54e162" rowspan="1" colspan="1">5.0</td>
                                 </tr>
                              </tbody>
                           </table>
                        </div>
                        <p class="p">Before installing the CUDA Toolkit, you should read the <a class="xref" href="http://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html" target="_blank" shape="rect">Release Notes</a>, as they provide important details on installation and software functionality.
                        </p>
                     </div>
                  </div>
                  <div class="topic concept nested1" id="about-this-document"><a name="about-this-document" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#about-this-document" name="about-this-document" shape="rect">1.2.&nbsp;About This Document</a></h3>
                     <div class="body conbody">
                        <p class="p">This document is intended for readers familiar with the Mac OS X environment and the compilation of C programs from the command
                           line. You do not need previous experience with CUDA or experience with parallel computation. 
                        </p>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested0" id="prerequisites"><a name="prerequisites" shape="rect">
                     <!-- --></a><h2 class="title topictitle1"><a href="#prerequisites" name="prerequisites" shape="rect">2.&nbsp;Prerequisites</a></h2>
                  <div class="body conbody"></div>
                  <div class="topic concept nested1" id="cuda-enabled-gpu"><a name="cuda-enabled-gpu" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#cuda-enabled-gpu" name="cuda-enabled-gpu" shape="rect">2.1.&nbsp;CUDA-capable GPU</a></h3>
                     <div class="body conbody">
                        <p class="p">To verify that your system is CUDA-capable, under the <span class="keyword wintitle">Apple</span> menu select <span class="ph uicontrol">About This Mac</span>, click the <span class="ph uicontrol">More Info …</span> button, and then select <span class="ph uicontrol">Graphics/Displays</span> under the <span class="keyword wintitle">Hardware</span> list. There you will find the vendor name and model of your graphics card.
                           If it is an NVIDIA card that is listed on the <a class="xref" href="http://developer.nvidia.com/cuda-gpus" target="_blank" shape="rect">CUDA-supported GPUs</a> page, your GPU is CUDA-capable.
                        </p>
                        <p class="p">The <a class="xref" href="http://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html" target="_blank" shape="rect">Release Notes</a> for the CUDA Toolkit also contain a list of supported products.
                        </p>
                     </div>
                  </div>
                  <div class="topic concept nested1" id="mac-os-version"><a name="mac-os-version" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#mac-os-version" name="mac-os-version" shape="rect">2.2.&nbsp;Mac OS X Version</a></h3>
                     <div class="body conbody">
                        <p class="p">
                           The CUDA Development Tools require an Intel-based Mac running Mac OSX v. 10.8 or later.
                           To check which version you have, go to the <span class="keyword wintitle">Apple</span> menu on the desktop and select <span class="ph uicontrol">About This Mac</span>.
                           
                        </p>
                     </div>
                  </div>
                  <div class="topic concept nested1" id="verify-gcc-installed"><a name="verify-gcc-installed" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#verify-gcc-installed" name="verify-gcc-installed" shape="rect">Command-Line Tools</a></h3>
                     <div class="body conbody">
                        <p class="p">
                           The CUDA Toolkit requires that the native command-line tools (gcc, clang,...) are already installed on the system.
                           
                        </p>
                        <p class="p">
                           To install those command-line tools, Xcode must be installed first.
                           Xcode is available from the Mac App Store.
                           
                        </p>
                        <div class="p">
                           Once Xcode is installed, the command-line tools can be installed by launching Xcode and following those steps:
                           
                           <ol class="ol">
                              <li class="li"><span class="ph menucascade"><span class="ph uicontrol">Xcode</span>
                                    &gt; <span class="ph uicontrol">Preferences...</span>
                                    &gt; <span class="ph uicontrol">Downloads</span>
                                    &gt; <span class="ph uicontrol">Components</span></span></li>
                              <li class="li">
                                 Install the <dfn class="term">Command Line Tools</dfn> package
                                 
                              </li>
                           </ol>
                        </div>
                        <p class="p">
                           Alternatively, you can install the command-line tools from the Terminal window by typing the following command: <samp class="ph codeph">xcode-select --install</samp>.
                           
                        </p>
                        <p class="p">
                           You can verify that the toolchain is installed by entering the command <samp class="ph codeph">/usr/bin/cc --help</samp> from a <span class="keyword wintitle">Terminal</span> window.
                           
                        </p>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested0" id="installation"><a name="installation" shape="rect">
                     <!-- --></a><h2 class="title topictitle1"><a href="#installation" name="installation" shape="rect">3.&nbsp;Installation</a></h2>
                  <div class="body conbody"></div>
                  <div class="topic concept nested1" id="download"><a name="download" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#download" name="download" shape="rect">3.1.&nbsp;Download</a></h3>
                     <div class="body conbody">
                        <p class="p">
                           Once you have verified that you have a supported NVIDIA GPU, a supported version the MAC OS, and gcc, you need to download
                           the NVIDIA CUDA Toolkit.
                           
                        </p>
                        <p class="p">
                           The NVIDIA CUDA Toolkit is available at no cost from the main <a class="xref" href="https://developer.nvidia.com/cuda-downloads" target="_blank" shape="rect">CUDA Downloads</a> page.
                           It contains the driver and tools needed to create, build and run a CUDA application as well as libraries, header files, CUDA
                           samples source code, and other resources.
                           
                        </p>
                        <p class="p">
                           The download can be verified by comparing the <a class="xref" href="http://developer.nvidia.com/cuda-downloads/checksums" target="_blank" shape="rect">posted MD5 checksum</a> with that of the downloaded file.
                           If either of the checksums differ, the downloaded file is corrupt and needs to be downloaded again.
                           
                        </p>
                        <div class="p">
                           To calculate the MD5 checksum of the downloaded file, run the following:
                           <pre class="pre screen" xml:space="preserve"><strong class="ph b">$</strong> openssl md5 &lt;file&gt;</pre></div>
                     </div>
                  </div>
                  <div class="topic concept nested1" id="install"><a name="install" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#install" name="install" shape="rect">3.2.&nbsp;Install</a></h3>
                     <div class="body conbody">
                        <p class="p">
                           Use the following procedure to successfully install the CUDA driver and the CUDA toolkit.
                           The CUDA driver and the CUDA toolkit must be installed for CUDA to function.
                           If you have not installed a stand-alone driver, install the driver provided with the CUDA Toolkit.
                           
                        </p>
                        <div class="p">
                           Choose which packages you wish to install. The packages are:
                           
                           <ul class="ul">
                              <li class="li"><strong class="ph b">CUDA Driver</strong>: This will install <samp class="ph codeph">/Library/Frameworks/CUDA.framework</samp> and the UNIX-compatibility stub <samp class="ph codeph">/usr/local/cuda/lib/libcuda.dylib</samp> that refers to it.
                                 
                              </li>
                              <li class="li"><strong class="ph b">CUDA Toolkit</strong>: The CUDA Toolkit supplements the CUDA Driver with compilers and additional libraries and header files that are installed
                                 into <samp class="ph codeph">/Developer/NVIDIA/CUDA-<span class="keyword">6.5</span></samp> by default. Symlinks are created in <samp class="ph codeph">/usr/local/cuda/</samp> pointing to their respective files in <samp class="ph codeph">/Developer/NVIDIA/CUDA-<span class="keyword">6.5</span>/</samp>.
                                 Previous installations of the toolkit will be moved to <samp class="ph codeph">/Developer/NVIDIA/CUDA-#.#</samp> to better support side-by-side installations.
                                 
                              </li>
                              <li class="li"><strong class="ph b">CUDA Samples (read-only)</strong>:
                                 A read-only copy of the  CUDA Samples is installed in <samp class="ph codeph">/Developer/NVIDIA/CUDA-<span class="keyword">6.5</span>/samples</samp>.
                                 Previous installations of the samples will be moved to <samp class="ph codeph">/Developer/NVIDIA/CUDA-#.#/samples</samp> to better support side-by-side installations.
                                 
                              </li>
                           </ul>
                        </div>
                        <div class="p">
                           Set up the required environment variables:
                           <pre class="pre screen" xml:space="preserve">export PATH=/Developer/NVIDIA/CUDA-<span class="keyword">6.5</span>/bin:$PATH
export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-<span class="keyword">6.5</span>/lib:$DYLD_LIBRARY_PATH</pre></div>
                        <p class="p">
                           In order to modify, compile, and run the samples, the samples must also be installed with write permissions.
                           A convenience installation script is provided: <samp class="ph codeph">cuda-install-samples-<span class="keyword">6.5</span>.sh</samp>.
                           This script is installed with the cuda-samples-<span class="keyword">6</span>-<span class="keyword">5</span> package.
                           
                        </p>
                        <div class="note note"><span class="notetitle">Note:</span> 
                           To run CUDA applications in console mode on MacBook Pro with both an integrated GPU and a discrete GPU, use the following
                           settings before dropping to console mode:
                           
                           <ol class="ol">
                              <li class="li">Uncheck 
                                 <span class="ph menucascade"><span class="ph uicontrol">System Preferences</span>
                                    &gt; <span class="ph uicontrol">Energy Saver</span>
                                    &gt; <span class="ph uicontrol">Automatic Graphic Switch</span></span></li>
                              <li class="li">Drag the <dfn class="term">Computer sleep</dfn> bar to <dfn class="term">Never</dfn> in
                                 <span class="ph menucascade"><span class="ph uicontrol">System Preferences</span>
                                    &gt; <span class="ph uicontrol">Energy Saver</span></span></li>
                           </ol>
                        </div>
                     </div>
                  </div>
                  <div class="topic task nested1" id="uninstall"><a name="uninstall" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#uninstall" name="uninstall" shape="rect">3.3.&nbsp;Uninstall</a></h3>
                     <div class="abstract">
                        <div class="p">The CUDA Driver, Toolkit and Samples can be uninstalled by executing the uninstall script provided with the Toolkit:
                           <pre class="pre screen" xml:space="preserve">/Developer/NVIDIA/CUDA-<span class="keyword">6.5</span>/bin/uninstall</pre></div>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested0" id="verification"><a name="verification" shape="rect">
                     <!-- --></a><h2 class="title topictitle1"><a href="#verification" name="verification" shape="rect">4.&nbsp;Verification</a></h2>
                  <div class="body conbody">
                     <p class="p">Before continuing, it is important to verify that the CUDA toolkit can find and communicate correctly with the CUDA-capable
                        hardware. To do this, you need to compile and run some of the included sample programs.
                     </p>
                     <div class="note note"><span class="notetitle">Note:</span> Ensure the PATH and DYLD_LIBRARY_PATH variables are <a class="xref" href="index.html#installation" shape="rect">set correctly</a>.
                     </div>
                  </div>
                  <div class="topic concept nested1" id="driver-verification"><a name="driver-verification" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#driver-verification" name="driver-verification" shape="rect">4.1.&nbsp;Driver</a></h3>
                     <div class="body conbody">
                        <div class="p">If the CUDA Driver is installed correctly, the CUDA kernel extension (<samp class="ph codeph">/System/Library/Extensions/CUDA.kext</samp>) should be loaded automatically at boot time. To verify that it is loaded, use the command
                           <pre class="pre screen" xml:space="preserve">kextstat | grep -i cuda</pre></div>
                     </div>
                  </div>
                  <div class="topic concept nested1" id="compiler-verification"><a name="compiler-verification" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#compiler-verification" name="compiler-verification" shape="rect">4.2.&nbsp;Compiler</a></h3>
                     <div class="body conbody">
                        <p class="p">
                           The installation of the compiler is first checked by running <samp class="ph codeph">nvcc -V</samp> in a terminal window.
                           The <samp class="ph codeph">nvcc</samp> command runs the compiler driver that compiles CUDA programs.
                           It calls the host compiler for C code and the NVIDIA PTX compiler for the CUDA code.
                        </p>
                        <div class="note note"><span class="notetitle">Note:</span>  
                           On Mac OS 10.8 with XCode 5, nvcc must be invoked with <samp class="ph codeph">--ccbin=path-to-clang-executable</samp>.
                           There are some features that are not yet supported:
                           Clang language extensions (see <a class="xref" href="http://clang.llvm.org/docs/LanguageExtensions.html" target="_blank" shape="rect">http://clang.llvm.org/docs/LanguageExtensions.html</a>),
                           LLVM libc++ (only GNU libstdc++ is currently supported), language features introduced in C++11,
                           and the <samp class="ph codeph">__global__</samp> function template explicit instantiation definition.
                           
                        </div>
                        <div class="p">
                           The NVIDIA CUDA Toolkit includes CUDA sample programs in source form.
                           To fully verify that the compiler works properly, a couple of samples should be built.
                           After switching to the directory where the samples were installed, type:
                           <pre class="pre screen" xml:space="preserve">make -C 0_Simple/vectorAdd
make -C 0_Simple/vectorAddDrv
make -C 1_Utilities/deviceQuery
make -C 1_Utilities/bandwidthTest</pre>
                           
                           The builds should produce no error message.
                           The resulting binaries will appear under <samp class="ph codeph">&lt;dir&gt;/bin/x86_64/darwin/release</samp>.
                           To go further and build all the CUDA samples, simply type <samp class="ph codeph">make</samp> from the samples root directory.
                           
                        </div>
                     </div>
                  </div>
                  <div class="topic concept nested1" id="runtime-verification"><a name="runtime-verification" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#runtime-verification" name="runtime-verification" shape="rect">4.3.&nbsp;Runtime</a></h3>
                     <div class="body conbody">
                        <p class="p">
                           After compilation, go to <samp class="ph codeph">bin/x86_64/darwin/release</samp> and run <samp class="ph codeph">deviceQuery</samp>.
                           If the CUDA software is installed and configured correctly, the output for <samp class="ph codeph">deviceQuery</samp> should look similar to that shown in <a class="xref" href="index.html#runtime-verification__valid-results-from-sample-cuda-devicequery-program" shape="rect">Figure 1</a>.
                           
                        </p>
                        <div class="fig fignone" id="runtime-verification__valid-results-from-sample-cuda-devicequery-program"><a name="runtime-verification__valid-results-from-sample-cuda-devicequery-program" shape="rect">
                              <!-- --></a><span class="figcap">Figure 1. Valid Results from deviceQuery CUDA Sample</span><br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/valid-results-from-sample-cuda-devicequery-program.png" width="550" alt="Valid Results from deviceQuery CUDA Sample."></img></div><br clear="none"></br></div>
                        <p class="p">
                           Note that the parameters for your CUDA device will vary. The key lines are the first and second ones that confirm a device
                           was found and what model it is.
                           Also, the next-to-last line, as indicated, should show that the test passed.
                           
                        </p>
                        <p class="p">
                           Running the <samp class="ph codeph">bandwidthTest</samp> sample ensures that the system and the CUDA-capable device are able to communicate correctly.
                           Its output is shown in <a class="xref" href="index.html#runtime-verification__valid-results-from-sample-cuda-bandwidthtest-program" shape="rect">Figure 2</a></p>
                        <div class="fig fignone" id="runtime-verification__valid-results-from-sample-cuda-bandwidthtest-program"><a name="runtime-verification__valid-results-from-sample-cuda-bandwidthtest-program" shape="rect">
                              <!-- --></a><span class="figcap">Figure 2. Valid Results from bandwidthTest CUDA Sample</span><br clear="none"></br><div class="imagecenter"><img class="image imagecenter" src="graphics/valid-results-from-sample-cuda-bandwidthtest-program.png" width="550" alt="Valid Results from bandwidthTest CUDA Sample."></img></div><br clear="none"></br></div>
                        <p class="p">Note that the measurements for your CUDA-capable device description will vary from system to system. The important point is
                           that you obtain measurements, and that the second-to-last line (in <a class="xref" href="index.html#runtime-verification__valid-results-from-sample-cuda-bandwidthtest-program" shape="rect">Figure 2</a>) confirms that all necessary tests passed.
                        </p>
                        <p class="p">Should the tests not pass, make sure you have a CUDA-capable NVIDIA GPU on your system and make sure it is properly installed.
                           
                        </p>
                        <p class="p">If you run into difficulties with the link step (such as libraries not being found), consult the <cite class="cite">Release Notes</cite> found in the <samp class="ph codeph">doc</samp> folder in the CUDA Samples directory.
                        </p>
                        <p class="p">To see a graphical representation of what CUDA can do, run the particles executable.</p>
                     </div>
                  </div>
               </div>
               <div class="topic concept nested0" id="additional-considerations"><a name="additional-considerations" shape="rect">
                     <!-- --></a><h2 class="title topictitle1"><a href="#additional-considerations" name="additional-considerations" shape="rect">5.&nbsp;Additional Considerations</a></h2>
                  <div class="body conbody">
                     <p class="p">Now that you have CUDA-capable hardware and the NVIDIA CUDA Toolkit installed, you can examine and enjoy the numerous included
                        programs. To begin using CUDA to accelerate the performance of your own applications, consult the <a class="xref" href="http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html" target="_blank" shape="rect">CUDA C Programming Guide</a>.
                     </p>
                     <p class="p">A number of helpful development tools are included in the CUDA Toolkit to assist you as you develop your CUDA programs, such
                        as NVIDIA<sup>®</sup> Nsight™ Eclipse Edition, NVIDIA Visual Profiler, cuda-gdb, and cuda-memcheck.
                     </p>
                     <p class="p">For technical support on programming questions, consult and participate in the <a class="xref" href="http://developer.nvidia.com/cuda/" target="_blank" shape="rect">Developer Forums</a>.
                     </p>
                  </div>
               </div>
               <div class="topic concept nested0" id="notices-header"><a name="notices-header" shape="rect">
                     <!-- --></a><h2 class="title topictitle1"><a href="#notices-header" name="notices-header" shape="rect">Notices</a></h2>
                  <div class="topic reference nested1" id="notice"><a name="notice" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#notice" name="notice" shape="rect"></a></h3>
                     <div class="body refbody">
                        <div class="section">
                           <h3 class="title sectiontitle">Notice</h3>
                           <p class="p">ALL NVIDIA DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS, DIAGNOSTICS, LISTS, AND OTHER DOCUMENTS (TOGETHER AND
                              SEPARATELY, "MATERIALS") ARE BEING PROVIDED "AS IS." NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE
                              WITH RESPECT TO THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS
                              FOR A PARTICULAR PURPOSE. 
                           </p>
                           <p class="p">Information furnished is believed to be accurate and reliable. However, NVIDIA Corporation assumes no responsibility for the
                              consequences of use of such information or for any infringement of patents or other rights of third parties that may result
                              from its use. No license is granted by implication of otherwise under any patent rights of NVIDIA Corporation. Specifications
                              mentioned in this publication are subject to change without notice. This publication supersedes and replaces all other information
                              previously supplied. NVIDIA Corporation products are not authorized as critical components in life support devices or systems
                              without express written approval of NVIDIA Corporation.
                           </p>
                        </div>
                     </div>
                  </div>
                  <div class="topic reference nested1" id="trademarks"><a name="trademarks" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#trademarks" name="trademarks" shape="rect"></a></h3>
                     <div class="body refbody">
                        <div class="section">
                           <h3 class="title sectiontitle">Trademarks</h3>
                           <p class="p">NVIDIA and the NVIDIA logo are trademarks or registered trademarks of NVIDIA Corporation
                              in the U.S. and other countries.  Other company and product names may be trademarks of
                              the respective companies with which they are associated.
                           </p>
                        </div>
                     </div>
                  </div>
                  <div class="topic reference nested1" id="copyright-past-to-present"><a name="copyright-past-to-present" shape="rect">
                        <!-- --></a><h3 class="title topictitle2"><a href="#copyright-past-to-present" name="copyright-past-to-present" shape="rect"></a></h3>
                     <div class="body refbody">
                        <div class="section">
                           <h3 class="title sectiontitle">Copyright</h3>
                           <p class="p">© <span class="ph">2009</span>-<span class="ph">2014</span> NVIDIA
                              Corporation. All rights reserved.
                           </p>
                           <p class="p">This product includes software developed by the Syncro Soft SRL (http://www.sync.ro/).</p>
                        </div>
                     </div>
                  </div>
               </div>
               
               <hr id="contents-end"></hr>
               
            </article>
         </div>
      </div>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/formatting/common.min.js"></script>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-write.js"></script>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-tracker.js"></script>
      <script type="text/javascript">var switchTo5x=true;</script><script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher: "998dc202-a267-4d8e-bce9-14debadb8d92", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script></body>
</html>