0 Replies Latest reply on May 1, 2008 8:55 PM by michael.chu

    ***** AMD Stream SDK FAQ *****

    michael.chu
      Frequently Asked Questions About AMD Stream SDK

      AMD Stream SDK FAQ

      (here are some frequently asked questions our AEs have come across and their answers)

      1. Install/Build/Run:



      Q: I have build/runtime errors on Windows, how to I track down the cause?

      A1: Download hello_brook from the following location:

      ftp://streamcomputing:streamcomputing@ftp-developer.amd.com/samples/

      Drop the project directory into your Desktop, and select Win32 or x64
      build targets, depending on our system. Assuming you have CAL and Brook
      installed, this example should build in either combination of
      Win32/x64/Release/Debug.

      If your own project does not build, compare the following properties between
      your project and the example project:

      Project->Properties->Configuration Properties->C/C++->Command Line
      Project->Properties->Configuration Properties->Linker->Command Line

      Please refer to the Visual Studio documentation on how to select the various
      property settings that eventually result in these two command lines.

      A2: Verify that the following environment variables and properties
      are set, and that they are in agreement regarding the build target
      (Win32/x32 or x64):

      1. BROOKROOT (should be set by installer)
      2. CALROOT (should be set by installer)

      3. Build target in Visual Studio (Win32 or x64), should be in sync with
      the CAL/Brook+ installation (32-bit or 64-bit), and the PATH (see below).

      4. PATH or Path environment variable should include:
      $(CALROOT)\lib\$(x32), or $(CALROOT)\lib\$(x64) (for amdcalrt.dll,
      amdcalcl.dll)
      $(BROOKROOT)\sdk\lib (for brook.dll)
      $(BROOKROOT)\sdk\bin (for brcc.exe)

      For example, PATH should include:
      C:\Program Files (x86)\AMD\CAL 1.00.2-beta\lib\xp64;C:\Program Files
      (x86)\AMD\BROOKPLUS SDK v1.00.0_beta\sdk\lib;C:\Program Files
      (x86)\AMD\BROOKPLUS SDK v1.00.0_beta\sdk\bin

      5. To compile a .br file in Visual Studio, set its properties to:

      Field "Command line":

      brcc.exe o "$(ProjectDir)\built\$(ProjectName)" $(InputPath)

      Field "Outputs":

      $(ProjectDir)\built\$(InputName).cpp

      The Brook and CAL examples shipped with the installation images should
      build and run without modification (with the exception of switching to
      x64 build target in Visual Studio on an x64 system).



      Q: I am getting the following error when I run my Brook+ program:
      "The application has failed to start because MSVCP80.dll was not found."


      A: Check the following property, and make sure it is set to "/MD" (Release build)
      or "/MDd" (Debug build):

      Project->Properties->Configuration Properties->C/C++->Code Generation->Runtime Library



      Q: Is there a tutorial on Brook+ that will get me up and running?

      A: Try the Brook+ Programming Guide. Note that the guide gives examples
      for WinXP32; for WinXP64 please adjust the paths appropriately.



      Q: I'm getting the following link error in Visual Studio:

      1>Linking...
      1>sum.obj : error LNK2019: unresolved external symbol "public: __thiscall brook::stream::~stream(void)" (??1stream@brook@@QAE@XZ)
      1>sum.obj : error LNK2019: unresolved external symbol "public: __thiscall brook::kernel::kernel(void const * * const)" (??
      1>sum.obj : error LNK2019: unresolved external symbol "public: __thiscall brook::stream::stream(class brook::stream const &)" (??
      1>sum.obj : error LNK2019: unresolved external symbol "public: __cdecl brook::stream::stream(enum brook::StreamType const *,...)" (??
      1>sum.obj : error LNK2019: unresolved external symbol "class brook::Runtime * __cdecl brook::createRuntime(bool)" (?
      1>..\..\..\samples\bin\xp_x86_32\\sum_d.exe : fatal error LNK1120: 5 unresolved externals


      A1: Make sure you have brook.lib in "Project
      Properties->Linker->Input->Additional Dependencies".

      A2: You are probably trying to build a Brook+ Win32 target on an x64 system,
      which is currently not supported; there are no 32 bit Brook+ libraries in
      the x64 Brook+ installation image. Switch the Visual Studio build target
      to x64.



      Q: I am getting "LNK2001: unresolved external symbol" for any CAL symbol
      in my own example project.


      A: In Visual Studio, try adding amdcalrt.lib and amdcalcl.lib to Project
      Properties->Linker->Input->Additional Dependencies.



      Q: My Brook/CAL program fails to run with the following error:
      "This application has failed to start because amdcalrt.dll was not found ..."


      A1: Make sure that the CAL lib directory is in your path, e.g.

      C:\Program Files (x86)\AMD\AMD CAL 1.00.2-beta\lib\xp64 or
      C:\Program Files (x86)\AMD\AMD CAL 1.00.2-beta\lib\xp32

      should be part of the PATH or Path environment variables.

      A2: Make sure your Visual Studio build target is in sync with the CAL lib
      directory in PATH/Path, i.e. both are either x32/Win32 or x64.

      A3: If you reinstalled CAL/Brook+ without explicitly uninstalling a previous
      version, the environment setup may have been corrupted. Either correct them
      as mentioned above or try to uninstall and reinstall CAL/Brook+.



      Q: Where can I find the CAL libraries on my x64 system?

      A: On x64 versions of Windows, the AMD Stream SDK version v1.00.2-beta will
      by default install both x32 and x64 library directories in

      Program Files (x86)/AMD/AMD CAL 1.00.2-beta/lib

      and not in

      Program Files/AMD/AMD CAL 1.00.2-beta/lib

      In case of build or runtime errors, verify that your Visual Studio build
      target and the PATH (or system Path) environment variables are in sync.
      For example, if the Visual Studio build target is "x64", PATH (or Path)
      must include "$(CALROOT)\lib\x64".



      Q: Do I need to build Brook+ to build/run Brook+ code?

      A: No. The Brook+ compiler and runtime libraries come pre-built in the
      installer package.



      Q: How do I switch between GPU and CPU runtimes in Brook+?

      A: Set the environment variable BRT_RUNTIME to "cal" or "cpu".





      2. Programming/Language:



      Q: How does scatter work?

      A: Current scatter limitations are as follows

      - 1D scatter target stream
      - 128 bit element size

      There is a scatter example available at:

      ftp://streamcomputing:streamcomputing@ftp-developer.amd.com/samples

      Simply drop the scatter directory into your Desktop and build.