clang & OpenMP on macOS High Sierra

118 views
Skip to first unread message

Zach Davis

unread,
Mar 23, 2018, 3:09:34 PM3/23/18
to 'Hendrik' via PyFR Mailing List
My question may likely be addressed to Freddie.  Previously, I had been running the clang-omp compiler with PyFr as the cc compiler in order to use OpenMP as a backend..  Apparently clang-omp has been deprecated, since OpenMP has been rolled into the main llvm branch.  I have installed libomp, and it works with Apple’s built-in clang compiler, but they have disabled the requisite driver.  I can get it to work by using the frontend option which looks something like:

clang -Xclang -fopenmp test.c -I/usr/local/include -L/usr/local/lib -lomp -o test

Is there away to add these additional flags, so that PyFR uses them when compiling the kernel?  Will simply adding them to the cc line in the *.ini file work?

Best Regards,



Pointwise, Inc.
Zach Davis
Pointwise®, Inc.
Sr. Engineer, Sales & Marketing
213 South Jennings Avenue
Fort Worth, TX 76104-1107

E: zach....@pointwise.com
P: (817) 377-2807 x1202
F: (817) 377-2799


signature.asc

Freddie Witherden

unread,
Mar 23, 2018, 4:39:54 PM3/23/18
to pyfrmai...@googlegroups.com
Hi Zach,

On 23/03/18 19:09, Zach Davis wrote:
> My question may likely be addressed to Freddie.  Previously, I had been
> running the clang-omp compiler with PyFr as the cc compiler in order to
> use OpenMP as a backend..  Apparently clang-omp has been deprecated,
> since OpenMP has been rolled into the main llvm branch.  I have
> installed libomp, and it works with Apple’s built-in clang compiler, but
> they have disabled the requisite driver.  I can get it to work by using
> the frontend option which looks something like:
>
> clang -Xclang -fopenmp test.c -I/usr/local/include -L/usr/local/lib
> -lomp -o test
>
> Is there away to add these additional flags, so that PyFR uses them when
> compiling the kernel?  Will simply adding them to the cc line in the
> *.ini file work?

There is a cflags directive for this purpose. This will allow you to
add whatever flags you need.

Regards, Freddie.

signature.asc
Reply all
Reply to author
Forward
0 new messages