-
Notifications
You must be signed in to change notification settings - Fork 60
Added OpenCL compiler flags for Apple. #279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
First, a brief note for reference. Second, I have a question about libgfortran - can it be achieved with packages? I guess that is the default way and it works for clFFT and clBLAS, isn't it? @PStegmann |
src/ocl/Makefile
Outdated
@@ -80,8 +80,14 @@ endif | |||
# !!! End of control section. Everything below is not designed to be modified by user | |||
#======================================================================================================================= | |||
|
|||
UNAME_S := $(shell uname -s) | |||
ifeq ($(UNAME_S),Darwin) | |||
LDLIBS += -framework OpenCL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make two-spaces indent. The same two lines below.
The rest is fine - ready for merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I didn't pay attention to the auto-indent.
@PStegmann , while we are at it - have you added any library-link flags ( I am asking because I have to add it on Windows combined with recent gcc, but not on Linux with gcc 4.8.5. Thus, want to devise a general solution. |
I was using Homebrew gcc 10.2.0 and OpenCL 1.2 for the compilation and the test.
Aside from the flag for
I have to admit that I haven't worked with packages before. Are you planning to include the library in adda? |
I meant that Homebrew package (or module, not sure how it's called) for gcc or gfortran (if a separate one) should probably add some environment variables to make Concerning ADDA - not sure that I properly understood your question. We do link with Fortran libraries (since there is some Fortran sources), but do not plan to make ADDA operate as a library in the near future (#200). |
Ah, yes I am using the homebrew package for this. I suspect the cause of the problem might be that the C source is compiled with the native clang compiler and the Fortran source uses the homebrew gfortran.
I just wasn't fully clear about what you meant by packages. |
Description
Two minor changes have been implemented with this PR:
.DS_Store
to.gitignore
to remove clutter for Apple developers.Testing the executable provides the following result:
Related issues
No issues were created prior to this PR. Changes were discussed via email.
Types of changes
What types of changes does your code introduce to ADDA? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. This is simply a reminder of what we are going to look for before merging your code.Further comments
This is a very small change.
On macOS
make
also cannot link againstlibgfortran.a
out of the box, but I don't know how to fix that without hard-coding the gfortran directory in the makefile with-L/<location 8000 of libgfortran.a>
and thus didn't include it in the PR.