<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Help: Want to setup the IPP environment inside of my program in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Want-to-setup-the-IPP-environment-inside-of-my-program/m-p/905097#M13338</link>
    <description>&lt;P&gt;Thank you for your reply, Paul.&lt;/P&gt;
&lt;P&gt;I also tried&lt;/P&gt;
&lt;P&gt;Environment::SetEnvironmentVariable Method (String, String) in my program. It works fine and I can read and write environment variables (user, system) for the whole application.&lt;/P&gt;
&lt;P&gt;Johnson&lt;/P&gt;</description>
    <pubDate>Mon, 01 Feb 2010 23:21:15 GMT</pubDate>
    <dc:creator>like2learn</dc:creator>
    <dc:date>2010-02-01T23:21:15Z</dc:date>
    <item>
      <title>Help: Want to setup the IPP environment inside of my program</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Want-to-setup-the-IPP-environment-inside-of-my-program/m-p/905094#M13335</link>
      <description>&lt;P&gt;Thank you for your time in reading my post.&lt;/P&gt;
&lt;P&gt;I am developing a C++ program with Visual Studio 2008 at Windows Vista platform. I would like to set a few OpenMP environment variables inside of my program. For example, I would like to set "KMP_AFFINITY=compact". Could anybody show me how to do it? I think setenv only works for UNIX and LINUX, right?&lt;/P&gt;
&lt;P&gt;I also would like to know how to set the OpenMP environment variables manually or in the script. Is there any script/configuration file for the IPP? Can I set the OpenMP environment variables the same way as other windows system variables? I mean, buy opening "My Computer", select "Environment Variables", and create a variable for the environment variable then set its value?&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;Johnson&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2010 22:54:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Want-to-setup-the-IPP-environment-inside-of-my-program/m-p/905094#M13335</guid>
      <dc:creator>like2learn</dc:creator>
      <dc:date>2010-01-29T22:54:44Z</dc:date>
    </item>
    <item>
      <title>Help: Want to setup the IPP environment inside of my program</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Want-to-setup-the-IPP-environment-inside-of-my-program/m-p/905095#M13336</link>
      <description>&lt;P&gt;I tried _putenv to assign the environment variables. However, I was not sure if it is the right way to assign to set the OpenMP environment variables. Please verify.&lt;/P&gt;
&lt;P&gt;_putenv( "KMP_AFFINITY=compact" );&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2010 23:20:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Want-to-setup-the-IPP-environment-inside-of-my-program/m-p/905095#M13336</guid>
      <dc:creator>like2learn</dc:creator>
      <dc:date>2010-01-29T23:20:52Z</dc:date>
    </item>
    <item>
      <title>Help: Want to setup the IPP environment inside of my program</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Want-to-setup-the-IPP-environment-inside-of-my-program/m-p/905096#M13337</link>
      <description>&lt;P&gt;Hello Johnson,&lt;/P&gt;
&lt;P&gt;On a Windows system you can use the _putenv() function, but the effect will be limited to your process, and it may not have an impact on the OpenMP component of your app, depending on when that component initializes and reads the application environment space (the application environment space is essentially a copy of the system environment when your app started, similar to a Linux/UNIX machine). So this approach might not work... but I've never tested it so I can't be sure. Here's more info on that for Windows:&lt;/P&gt;
&lt;P&gt;&lt;A target="_blank" href="http://msdn.microsoft.com/en-us/library/aa298540(VS.60).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa298540(VS.60).aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Here's a link to how to change the environment variables directly within your system environment space. You'll see there is a system environment and a personal environment. Both appear when you go to the command line (run a cmd.exe box) and type "set&lt;CR&gt;" at the command line:&lt;/CR&gt;&lt;/P&gt;
&lt;P&gt;&lt;A target="_blank" href="http://support.microsoft.com/kb/310519"&gt;http://support.microsoft.com/kb/310519&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You could also create a batch file that defines the environment variables and run it within a cmd.exe window before running your app (make sure to run the app from the same command line as the batch file, 'cause the environment variable changes implemented by the batch file will only apply to that cmd.exe window). Based on your post, the batch file could contain a single line:&lt;/P&gt;
&lt;P&gt;set KMP_AFFINITY=compact&lt;/P&gt;
&lt;P&gt;You could follow that line with the name of your app, so the batch file would set the environment variable and then start your app.&lt;/P&gt;
&lt;P&gt;Here's more info from Microsoft regarding the command line and batch files and environment variables.&lt;/P&gt;
&lt;P&gt;&lt;A target="_blank" href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx"&gt;http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Hope that helps,&lt;/P&gt;
&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jan 2010 00:17:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Want-to-setup-the-IPP-environment-inside-of-my-program/m-p/905096#M13337</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2010-01-30T00:17:16Z</dc:date>
    </item>
    <item>
      <title>Help: Want to setup the IPP environment inside of my program</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Want-to-setup-the-IPP-environment-inside-of-my-program/m-p/905097#M13338</link>
      <description>&lt;P&gt;Thank you for your reply, Paul.&lt;/P&gt;
&lt;P&gt;I also tried&lt;/P&gt;
&lt;P&gt;Environment::SetEnvironmentVariable Method (String, String) in my program. It works fine and I can read and write environment variables (user, system) for the whole application.&lt;/P&gt;
&lt;P&gt;Johnson&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2010 23:21:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Want-to-setup-the-IPP-environment-inside-of-my-program/m-p/905097#M13338</guid>
      <dc:creator>like2learn</dc:creator>
      <dc:date>2010-02-01T23:21:15Z</dc:date>
    </item>
  </channel>
</rss>

