Skip to content

Commit

Permalink
Fix OpenMP compilation bug (atcollab#891)
Browse files Browse the repository at this point in the history
* Fix openmp on MacPorts (setup.py)
* Fix openmp on MacPorts (atmexall)
  • Loading branch information
lfarv authored Jan 15, 2025
1 parent 2696171 commit c8c5844
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions atmat/atmexall.m
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,6 @@ function compile(mexargs, varargin)
incdir=homeb;
elseif exist('/opt/local/include/libomp/omp.h', 'file') % MacPorts
incdir='/opt/local/include/libomp';
libdir='/opt/local/lib';
libname='omp';
else
error('AT:MissingLibrary', strjoin({'', ...
'libomp.dylib must be installed with your favourite package manager:', '', ...
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def select_omp():
if exists(os.path.join(homeb, "include/omp.h")): # Homebrew
return "-I" + os.path.join(homeb, "include"), os.path.join(homeb, "lib")
elif exists("/opt/local/include/libomp/omp.h"): # MacPorts
return "/opt/local/include/libomp", "/opt/local/lib/libomp"
return "-I/opt/local/include/libomp", "/opt/local/lib/libomp"
else:
raise FileNotFoundError(
"\n".join(
Expand Down

0 comments on commit c8c5844

Please sign in to comment.