Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>IMPORTANT EDIT</strong></p> <p>What is wrote under this edit works at least when I run the executable "from XCODE". When I find the directory it is built in, and double click on it there, I receive this message :</p> <pre><code>Last login: Sun Nov 24 17:05:19 on ttys002 MacBook-Pro-de-totouser:~ totouser$ /Users/totouser/Library/Developer/Xcode/DerivedData/THECONSOLEAPPLICATION-hknajgycvjjcotdtkeeyxbzmtfty/Build/Products/Debug/THECONSOLEAPPLICATION ; exit; dyld: Library not loaded: libmkl_sequential.dylib Referenced from: /Users/totouser/Library/Developer/Xcode/DerivedData/THECONSOLEAPPLICATION-hknajgycvjjcotdtkeeyxbzmtfty/Build/Products/Debug/THECONSOLEAPPLICATION Reason: image not found Trace/BPT trap: 5 logout </code></pre> <p>[Process completed]</p> <p>If someone could help, that would be nice, because I am really stuck here</p> <p>/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</p> <p>Ok, I succeeded in doing what you wanted to do :</p> <p>I have installed m_ccompxe_2013_sp1.1.103 under mac os 10.8.5 64bits where I am using XCode 5.0.2.</p> <p>The first thing is to reference mkl include directory in the project. Before doing it, I would like stress that even after having done it, I was never able in c++ code to write something like this</p> <pre><code>#include "mkl.h" </code></pre> <p>and I was obliged to put the full path to the mkl.h file, which was a bit boring, as I want ideally to put like this :</p> <pre><code>#include &lt;mkl&gt; #include &lt;mkl_vsl.h&gt; #include &lt;mkl_vsl_functions.h&gt; </code></pre> <p>etc. So I found for instance the "iostream" file on my mac, copied it somewhere, modified the copy's name to mkl, and put the content of mkl.h (which is in "/opt/intel/composer_xe_2013_sp1.1.103/mkl/include" on my mac) in it, save it in "/opt/intel/composer_xe_2013_sp1.1.103/mkl/include", and I referenced the directory "/opt/intel/composer_xe_2013_sp1.1.103/mkl/include" in the include directories of my xcode project. How did I do this ?</p> <p>I double clicked on "target", then on "build settings", then on "all", and searched for "search paths" menu. There</p> <p>1) in "header search path", debug and release, I put "/opt/intel/composer_xe_2013_sp1.1.103/mkl/include" and "/opt/intel/composer_xe_2013_sp1.1.103/mkl/include/intel64"</p> <p>2) in "library search path", debug and release I put "/opt/intel/composer_xe_2013_sp1.1.103/compiler/lib/intel64" and "/opt/intel/composer_xe_2013_sp1.1.103/compiler/lib" and "/opt/intel/composer_xe_2013_sp1.1.103/mkl/lib"</p> <p>Then I edited the "DYLD_LIBRARY_PATH" environment variable (only in my project) to make equal to "/opt/intel/composer_xe_2013_sp1.1.103/compiler/lib:/opt/intel/composer_xe_2013_sp1.1.103/compiler/lib/intel64:/opt/intel/composer_xe_2013_sp1.1.103/mkl/lib". How did I do this ? I cliked on the name of my project icon at the immediate right next to the triangle and square buttons at the left of the upper bar, and then I clicked on "edit scheme" which opened a window, and then clicked on "run my project debug" in the left column of that window, and then I clicked on "Argument", went in "environment variables", and +'d a new variable called DYLD_LIBRARY_PATH with value </p> <p>/opt/intel/composer_xe_2013_sp1.1.103/compiler/lib:/opt/intel/composer_xe_2013_sp1.1.103/compiler/lib/intel64:/opt/intel/composer_xe_2013_sp1.1.103/mkl/lib</p> <p>Bizarrly, this set it also for "run my project release", which was ok for me, but I still find this bizarre. Anyway.</p> <p>After this, I had to add command telling the compiler (LLVM 5, didn't modify anything related to this) to link to the libraries I was about to use :</p> <p>for this I double cliked back on "target", then went in "build settings", then in "all", and searched then for "other linker flags" where in debug and in release I put :</p> <p>-lmkl_sequential -lmkl_core -lmkl_intel_lp64 -lpthread -lmkl_intel_thread -liomp5</p> <p>Then In the main.cpp I put for instance :</p> <pre><code>#include &lt;iostream&gt; // #include "/opt/intel/composer_xe_2013_sp1.1.103/mkl/include/mkl.h" // #include "/opt/intel/composer_xe_2013_sp1.1.103/mkl/include/mkl_vsl.h" // #include "/opt/intel/composer_xe_2013_sp1.1.103/mkl/include/mkl_vsl_functions.h" #include &lt;mkl&gt; #include &lt;mkl_vsl.h&gt; #include &lt;mkl_vsl_functions.h&gt; int main(int argc, const char * argv[]) { VSLStreamStatePtr stream; vslNewStream(&amp;stream, VSL_BRNG_SFMT19937, 777); double * pUNIF = new double [ 1000000 ] ; vdRngUniform(VSL_RNG_METHOD_UNIFORM_STD_ACCURATE, stream, 1000000, pUNIF, 0.0, 1.0); vslDeleteStream(&amp;stream); for (int i = 0 ; i &lt; 100000 ; ++i ) { std::cout &lt;&lt; *(pUNIF+i) &lt;&lt; std::endl; } std::cout &lt;&lt; "END." &lt;&lt; std::endl; getchar(); return 0; } </code></pre> <p>Then I built and ran, I everything was ok ;-)</p> <p>As would dear sir Malcolm Tucker say : "never easy, never f***** easy."</p> <p>Regards,</p> <p>MEF.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload