Skip to content
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

NCCL 2.x failed to build on Mac OS #201

Open
TomHeaven opened this issue Apr 2, 2019 · 1 comment
Open

NCCL 2.x failed to build on Mac OS #201

TomHeaven opened this issue Apr 2, 2019 · 1 comment

Comments

@TomHeaven
Copy link

I tried to build NCCL 2.4 on Mac OS but failed with the following errors:

iMac:nccl tomheaven$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src build BUILDDIR=/Volumes/Data/libraries/nccl/build
Compiling  init.cu                             > /Volumes/Data/libraries/nccl/build/obj/init.o
include/transport.h(64): error: identifier "pthread_mutex_t" is undefined

include/transport.h(71): error: identifier "pthread_cond_t" is undefined

include/transport.h(72): error: identifier "pthread_mutex_t" is undefined

include/cpuset.h(22): error: identifier "cpu_set_t" is undefined

include/cpuset.h(23): error: identifier "cpu_set_t" is undefined

include/cpuset.h(45): error: identifier "cpu_set_t" is undefined

include/cpuset.h(45): error: identifier "mask" is undefined

include/cpuset.h(45): error: expected a ")"

include/cpuset.h(45): error: expected a ";"

/usr/include/dlfcn.h(50): error: expected a declaration

/usr/include/dlfcn.h(52): error: identifier "Dl_info" is undefined

/usr/include/dlfcn.h(85): error: expected a declaration

init.cu(41): warning: parsing restarts here after previous syntax error

init.cu(861): error: "cpu_set_t" is not a type name

init.cu(862): error: identifier "CPU_ZERO_S" is undefined

init.cu(882): error: expected a ";"

init.cu(883): error: identifier "sched_getaffinity" is undefined

init.cu(886): error: expected a ";"

init.cu(887): error: identifier "gpuMask" is undefined

init.cu(888): error: expected a ";"

init.cu(889): error: identifier "finalMask" is undefined

init.cu(889): error: identifier "gpuMask" is undefined

init.cu(889): error: identifier "CPU_AND" is undefined

init.cu(892): error: identifier "CPU_COUNT" is undefined

init.cu(894): error: expression preceding parentheses of apparent call must have (pointer-to-) function type

init.cu(896): error: identifier "sched_setaffinity" is undefined

init.cu(902): error: expected a ";"

init.cu(903): error: identifier "affinitySave" is undefined

init.cu(903): error: identifier "sched_getaffinity" is undefined

init.cu(918): error: identifier "sched_setaffinity" is undefined

init.cu(1085): error: expected a ";"

init.cu(1086): error: identifier "affinitySave" is undefined

init.cu(1086): error: identifier "sched_getaffinity" is undefined

init.cu(1100): error: identifier "sched_setaffinity" is undefined

33 errors detected in the compilation of "/var/folders/2j/db1czwqj1jd1yf8n_m94y_6r0000gn/T//tmpxft_000059a2_00000000-11_init.compute_70.cpp1.ii".
make[1]: *** [/Volumes/Data/libraries/nccl/build/obj/init.o] Error 1
make: *** [src.build] Error 2

I find previous issues #61 and #62, which suggests minor changes may make the project work on Mac OS. I hope that come true in the near future.

@TomHeaven
Copy link
Author

I managed to migrate this project to MacOS by adding missing funcitons and fix building parameters. The project page is: https://github.com/TomHeaven/nccl-osx.

It is NOT fully funcitonal but can be used in Pytorch and enables GLOO backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant