<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body>
    <div class="moz-cite-prefix">Amir,<br>
      Official clang does not support OpenMP yet. You should use
      clang/LLVM from clang-omp.github.com. <br>
      <pre class="moz-signature" cols="72">Best regards,
Alexey Bataev
=============
Software Engineer
Intel Compiler Team</pre>
      08.11.2014 0:19, Amir H. Ashouri пишет:<br>
    </div>
    <blockquote
cite="mid:CAPh1xCS4DO96sRhX5QYga6MfP4GKY8eH7304jJZaroHOD70tug@mail.gmail.com"
      type="cite">
      <div dir="ltr">Thanks Jeremy for the good call. 
        <div><br>
        </div>
        <div>I think something is missing here as I have :</div>
        <div>
          <p class="">clang: warning: argument unused during
            compilation: '-fopenmp'</p>
          <p class=""><br>
          </p>
          <p class="">p.s (TO: Milad): I make clean and make
            compile=clang and check all the needed exports.</p>
          <p class=""><br>
          </p>
          <p class="">-Amir</p>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Fri, Nov 7, 2014 at 3:31 PM, jeremy
          <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:jakemp@uh.edu" target="_blank">jakemp@uh.edu</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">If you
            build the IR with this:<br>
            <br>
            clang -g -emit-llvm -S -c -fopenmp hello.c -o hello.ll<br>
            <br>
            do you see  "__kmpc_fork_call" in hello.ll?<br>
            <br>
            <br>
            <br>
            On Fri, Nov 7, 2014 at 2:22 PM, Amir H. Ashouri<br>
            <div class="HOEnZb">
              <div class="h5"><<a moz-do-not-send="true"
                  href="mailto:amirhossein.ashouri@gmail.com">amirhossein.ashouri@gmail.com</a>>
                wrote:<br>
                > I did that.<br>
                ><br>
                > Downloaded and compiled with gcc, then export all
                the PATHs. Otherwise, It<br>
                > would have given me compile error because the
                "omp.h" is different here.<br>
                ><br>
                > -Amir<br>
                ><br>
                > On Fri, Nov 7, 2014 at 3:13 PM, Millad Ghane <<a
                  moz-do-not-send="true"
                  href="mailto:millad.mg@gmail.com">millad.mg@gmail.com</a>>
                wrote:<br>
                >><br>
                >> Hi,<br>
                >><br>
                >> You haven't imported the openmp library to
                Clang yet. It simply ignores<br>
                >> the pragmas.<br>
                >><br>
                >> Go to this link and follow the instructions.<br>
                >> <a moz-do-not-send="true"
                  href="http://clang-omp.github.io" target="_blank">clang-omp.github.io</a><br>
                >><br>
                >><br>
                >> Best Regards,<br>
                >> Millad<br>
                >><br>
                >><br>
                >> On Friday, November 7, 2014, Amir H. Ashouri<br>
                >> <<a moz-do-not-send="true"
                  href="mailto:amirhossein.ashouri@gmail.com">amirhossein.ashouri@gmail.com</a>>
                wrote:<br>
                >>><br>
                >>> Greetings,<br>
                >>><br>
                >>> so I tried to use opennp with one of the
                latest version of clang, clang<br>
                >>> version 3.4.2 (tags/RELEASE_34/dot2-final).
                Followed the procedure to<br>
                >>> compilre and export the library PATHs,
                Compiling my hello.c using :<br>
                >>><br>
                >>> clang -fopenmp hello.c<br>
                >>><br>
                >>> and then running it, still it can't use
                more than 1 thread:<br>
                >>><br>
                >>> Bash-4.1$ ./a.out<br>
                >>> Hello from thread 0, nthreads 1<br>
                >>><br>
                >>> I tried to manually export export
                OMP_NUM_THREADS=8 but that didn't solve<br>
                >>> anything as well, As a workaround I define 
                #pragma omp parallel<br>
                >>> num_threads(#noofthreads) inside the source
                code but still the issue is<br>
                >>> there.<br>
                >>><br>
                >>> Any suggestions would be appreciated.<br>
                >>><br>
                >>><br>
                >>> -Amir<br>
                >>><br>
                >>><br>
                >>> <a moz-do-not-send="true"
                  href="http://p.sl" target="_blank">p.sl</a>: This is
                the hello.c:<br>
                >>><br>
                >>> #include <omp.h><br>
                >>> #include <stdio.h><br>
                >>> int main() {<br>
                >>> #pragma omp parallel<br>
                >>> printf("Hello from thread %d, nthreads
                %d\n", omp_get_thread_num(),<br>
                >>> omp_get_num_threads<br>
                >><br>
                >><br>
                >><br>
                >> --<br>
                >> Sent from my iPhone<br>
                ><br>
                ><br>
                ><br>
              </div>
            </div>
            <div class="HOEnZb">
              <div class="h5">>
                _______________________________________________<br>
                > Openmp-dev mailing list<br>
                > <a moz-do-not-send="true"
                  href="mailto:Openmp-dev@dcs-maillist2.engr.illinois.edu">Openmp-dev@dcs-maillist2.engr.illinois.edu</a><br>
                > <a moz-do-not-send="true"
                  href="http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev"
                  target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev</a><br>
                ><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Openmp-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Openmp-dev@dcs-maillist2.engr.illinois.edu">Openmp-dev@dcs-maillist2.engr.illinois.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev">http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>