thuyen / multicrop

MIT License
5 stars 2 forks source link

How to build multicrop on mac? #3

Open MountainAndMorning opened 5 years ago

MountainAndMorning commented 5 years ago

Hi,

When I build multicrop on my mac I get such error:

(simpleitk) iridiums-MacBook-Pro-2:~ iridium$ git clone https://github.com/thuyen/multicrop.git
Cloning into 'multicrop'...
remote: Enumerating objects: 58, done.
remote: Total 58 (delta 0), reused 0 (delta 0), pack-reused 58
Unpacking objects: 100% (58/58), done.
(simpleitk) iridiums-MacBook-Pro-2:~ iridium$ cd multicrop/
(simpleitk) iridiums-MacBook-Pro-2:multicrop iridium$ python setup.py install
running install
running bdist_egg
running egg_info
creating multicrop.egg-info
writing multicrop.egg-info/PKG-INFO
writing dependency_links to multicrop.egg-info/dependency_links.txt
writing top-level names to multicrop.egg-info/top_level.txt
writing manifest file 'multicrop.egg-info/SOURCES.txt'
reading manifest file 'multicrop.egg-info/SOURCES.txt'
writing manifest file 'multicrop.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.7-x86_64/egg
running install_lib
running build_ext
building 'multicrop' extension
creating build
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/iridium/anaconda3/envs/simpleitk/include -arch x86_64 -I/Users/iridium/anaconda3/envs/simpleitk/include -arch x86_64 -I/Users/iridium/anaconda3/envs/simpleitk/lib/python3.6/site-packages/torch/include -I/Users/iridium/anaconda3/envs/simpleitk/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/Users/iridium/anaconda3/envs/simpleitk/lib/python3.6/site-packages/torch/include/TH -I/Users/iridium/anaconda3/envs/simpleitk/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/Users/iridium/anaconda3/envs/simpleitk/include/python3.6m -c src/gpu_ops.cpp -o build/temp.macosx-10.7-x86_64-3.6/src/gpu_ops.o -g -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=multicrop -std=c++11
clang: error: unsupported option '-fopenmp'
error: command 'gcc' failed with exit status 1
(simpleitk) iridiums-MacBook-Pro-2:multicrop iridium$

Can you provide some tips to fix this error? Thanks. Mac OS 10.13.6 pytorch 1.0.1 whth CUDA support.

mraoaakash commented 1 year ago

I am getting this error as well. Any help will be much appreciated.