Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

OpenMP support on Mac #2

Open
djsutherland opened this issue Jul 21, 2017 · 3 comments
Open

OpenMP support on Mac #2

djsutherland opened this issue Jul 21, 2017 · 3 comments

Comments

@djsutherland
Copy link
Contributor

Might be possible with the openmp package, should try it out.

@isuruf
Copy link
Member

isuruf commented Mar 3, 2020

This failed with,

2020-03-03T21:28:00.0183640Z ld: warning: -pie being ignored. It is only used when linking a main executable
2020-03-03T21:28:00.1340780Z Undefined symbols for architecture x86_64:
2020-03-03T21:28:00.1341620Z   "___kmpc_barrier", referenced from:
2020-03-03T21:28:00.1342070Z       _.omp_outlined. in Distance.cpp.o
2020-03-03T21:28:00.1342530Z       _.omp_outlined..21 in Distance.cpp.o
2020-03-03T21:28:00.1343020Z       _.omp_outlined. in DotFeatures.cpp.o
2020-03-03T21:28:00.1343500Z       _.omp_outlined..10 in DotFeatures.cpp.o
2020-03-03T21:28:00.1354470Z       _.omp_outlined. in DistanceMachine.cpp.o
2020-03-03T21:28:00.1355130Z       _.omp_outlined..6 in DistanceMachine.cpp.o
2020-03-03T21:28:00.1355620Z       _.omp_outlined. in KernelMachine.cpp.o
2020-03-03T21:28:00.1356010Z       ...
2020-03-03T21:28:00.1451070Z   "___kmpc_critical", referenced from:
2020-03-03T21:28:00.1461560Z       _.omp_outlined..162 in Kernel.cpp.o
2020-03-03T21:28:00.1462120Z       _.omp_outlined..164 in Kernel.cpp.o
2020-03-03T21:28:00.1462590Z       _.omp_outlined..166 in Kernel.cpp.o
2020-03-03T21:28:00.1465580Z       _.omp_outlined. in tapkee_shogun.cpp.o
2020-03-03T21:28:00.1466140Z       _.omp_outlined..276 in tapkee_shogun.cpp.o
2020-03-03T21:28:00.1466640Z       _.omp_outlined..306 in tapkee_shogun.cpp.o
2020-03-03T21:28:00.1467100Z       _.omp_outlined..12 in BaggingMachine.cpp.o
2020-03-03T21:28:00.1467480Z       ...
2020-03-03T21:28:00.1563460Z   "___kmpc_end_critical", referenced from:
2020-03-03T21:28:00.1571860Z       _.omp_outlined..162 in Kernel.cpp.o
2020-03-03T21:28:00.1572390Z       _.omp_outlined..164 in Kernel.cpp.o
2020-03-03T21:28:00.1572850Z       _.omp_outlined..166 in Kernel.cpp.o
2020-03-03T21:28:00.1576130Z       _.omp_outlined. in tapkee_shogun.cpp.o
2020-03-03T21:28:00.1576690Z       _.omp_outlined..276 in tapkee_shogun.cpp.o
2020-03-03T21:28:00.1577160Z       _.omp_outlined..306 in tapkee_shogun.cpp.o
2020-03-03T21:28:00.1577660Z       _.omp_outlined..12 in BaggingMachine.cpp.o
2020-03-03T21:28:00.1578030Z       ...
2020-03-03T21:28:00.1676180Z   "___kmpc_end_reduce_nowait", referenced from:
2020-03-03T21:28:00.1676890Z       _.omp_outlined. in KMeans.cpp.o
2020-03-03T21:28:00.1684930Z       _.omp_outlined. in Kernel.cpp.o
2020-03-03T21:28:00.1685530Z       _.omp_outlined..154 in Kernel.cpp.o
2020-03-03T21:28:00.1685980Z       _.omp_outlined..160 in Kernel.cpp.o
2020-03-03T21:28:00.1803070Z   "___kmpc_end_serialized_parallel", referenced from:
2020-03-03T21:28:00.1803910Z       shogun::CKMeans::Lloyd_KMeans(shogun::SGMatrix<double>, int) in KMeans.cpp.o
2020-03-03T21:28:00.1929720Z   "___kmpc_end_single", referenced from:
2020-03-03T21:28:00.1930660Z       _.omp_outlined. in Distance.cpp.o
2020-03-03T21:28:00.1931390Z       _.omp_outlined..21 in Distance.cpp.o
2020-03-03T21:28:00.1932080Z       _.omp_outlined. in DotFeatures.cpp.o
2020-03-03T21:28:00.1932560Z       _.omp_outlined..10 in DotFeatures.cpp.o
2020-03-03T21:28:00.1943090Z       _.omp_outlined. in DistanceMachine.cpp.o
2020-03-03T21:28:00.1943600Z       _.omp_outlined..6 in DistanceMachine.cpp.o
2020-03-03T21:28:00.1944540Z       _.omp_outlined. in KernelMachine.cpp.o
2020-03-03T21:28:00.1944920Z       ...
2020-03-03T21:28:00.2041200Z   "___kmpc_for_static_fini", referenced from:
2020-03-03T21:28:00.2041810Z       _.omp_outlined. in KMeans.cpp.o
2020-03-03T21:28:00.2042300Z       _.omp_outlined. in KMeansBase.cpp.o
2020-03-03T21:28:00.2042810Z       _.omp_outlined..12 in KMeansBase.cpp.o
2020-03-03T21:28:00.2043290Z       _.omp_outlined. in EuclideanDistance.cpp.o
2020-03-03T21:28:00.2043750Z       _.omp_outlined..7 in EuclideanDistance.cpp.o
2020-03-03T21:28:00.2050340Z       _.omp_outlined. in CombinedKernel.cpp.o
2020-03-03T21:28:00.2051060Z       _.omp_outlined..35 in CombinedKernel.cpp.o
2020-03-03T21:28:00.2051470Z       ...
2020-03-03T21:28:00.2143430Z   "___kmpc_for_static_init_4", referenced from:
2020-03-03T21:28:00.2144100Z       _.omp_outlined. in KMeans.cpp.o
2020-03-03T21:28:00.2144670Z       _.omp_outlined. in KMeansBase.cpp.o
2020-03-03T21:28:00.2145070Z       _.omp_outlined..12 in KMeansBase.cpp.o
2020-03-03T21:28:00.2145530Z       _.omp_outlined. in EuclideanDistance.cpp.o
2020-03-03T21:28:00.2145980Z       _.omp_outlined..7 in EuclideanDistance.cpp.o
2020-03-03T21:28:00.2151190Z       _.omp_outlined. in CombinedKernel.cpp.o
2020-03-03T21:28:00.2151720Z       _.omp_outlined..35 in CombinedKernel.cpp.o
2020-03-03T21:28:00.2152290Z       ...
2020-03-03T21:28:00.2245370Z   "___kmpc_for_static_init_8", referenced from:
2020-03-03T21:28:00.2268880Z       _.omp_outlined. in StreamingMMD.cpp.o
2020-03-03T21:28:00.2269700Z       _.omp_outlined..5 in StreamingMMD.cpp.o
2020-03-03T21:28:00.2270220Z       _.omp_outlined. in ComputationManager.cpp.o
2020-03-03T21:28:00.2371230Z   "___kmpc_fork_call", referenced from:
2020-03-03T21:28:00.2371980Z       shogun::CKMeans::Lloyd_KMeans(shogun::SGMatrix<double>, int) in KMeans.cpp.o
2020-03-03T21:28:00.2372590Z       shogun::CKMeansBase::kmeanspp() in KMeansBase.cpp.o
2020-03-03T21:28:00.2373220Z       shogun::SGMatrix<double> shogun::CDistance::get_distance_matrix<double>() in Distance.cpp.o
2020-03-03T21:28:00.2373920Z       shogun::SGMatrix<float> shogun::CDistance::get_distance_matrix<float>() in Distance.cpp.o
2020-03-03T21:28:00.2374570Z       shogun::CEuclideanDistance::precompute_lhs() in EuclideanDistance.cpp.o
2020-03-03T21:28:00.2375160Z       shogun::CEuclideanDistance::precompute_rhs() in EuclideanDistance.cpp.o
2020-03-03T21:28:00.2375840Z       shogun::CDotFeatures::dense_dot_range(double*, int, int, double*, double*, int, double) in DotFeatures.cpp.o
2020-03-03T21:28:00.2376830Z       ...
2020-03-03T21:28:00.2465260Z   "___kmpc_global_thread_num", referenced from:
2020-03-03T21:28:00.2466040Z       shogun::CKMeans::Lloyd_KMeans(shogun::SGMatrix<double>, int) in KMeans.cpp.o
2020-03-03T21:28:00.2466640Z       _.omp_outlined. in KMeans.cpp.o
2020-03-03T21:28:00.2467120Z       _.omp_outlined. in KMeansBase.cpp.o
2020-03-03T21:28:00.2467620Z       _.omp_outlined..12 in KMeansBase.cpp.o
2020-03-03T21:28:00.2468130Z       _.omp_outlined. in EuclideanDistance.cpp.o
2020-03-03T21:28:00.2468640Z       _.omp_outlined..7 in EuclideanDistance.cpp.o
2020-03-03T21:28:00.2474160Z       _.omp_outlined. in CombinedKernel.cpp.o
2020-03-03T21:28:00.2474730Z       ...
2020-03-03T21:28:00.2574200Z   "___kmpc_reduce_nowait", referenced from:
2020-03-03T21:28:00.2575110Z       _.omp_outlined. in KMeans.cpp.o
2020-03-03T21:28:00.2582310Z       _.omp_outlined. in Kernel.cpp.o
2020-03-03T21:28:00.2582910Z       _.omp_outlined..154 in Kernel.cpp.o
2020-03-03T21:28:00.2583410Z       _.omp_outlined..160 in Kernel.cpp.o
2020-03-03T21:28:00.2702980Z   "___kmpc_serialized_parallel", referenced from:
2020-03-03T21:28:00.2703900Z       shogun::CKMeans::Lloyd_KMeans(shogun::SGMatrix<double>, int) in KMeans.cpp.o
2020-03-03T21:28:00.2829920Z   "___kmpc_single", referenced from:
2020-03-03T21:28:00.2830660Z       _.omp_outlined. in Distance.cpp.o
2020-03-03T21:28:00.2831260Z       _.omp_outlined..21 in Distance.cpp.o
2020-03-03T21:28:00.2832280Z       _.omp_outlined. in DotFeatures.cpp.o
2020-03-03T21:28:00.2832750Z       _.omp_outlined..10 in DotFeatures.cpp.o
2020-03-03T21:28:00.2843160Z       _.omp_outlined. in DistanceMachine.cpp.o
2020-03-03T21:28:00.2843740Z       _.omp_outlined..6 in DistanceMachine.cpp.o
2020-03-03T21:28:00.2844240Z       _.omp_outlined. in KernelMachine.cpp.o
2020-03-03T21:28:00.2844660Z       ...
2020-03-03T21:28:00.2943960Z   "_omp_get_max_threads", referenced from:
2020-03-03T21:28:00.2957100Z       tapkee::TapkeeOutput tapkee::embed<std::__1::__wrap_iter<int*>, pimpl_kernel_callback<shogun::CKernel>, pimpl_distance_callback<shogun::CDistance>, ShogunFeatureVectorCallback>(std::__1::__wrap_iter<int*>, std::__1::__wrap_iter<int*>, pimpl_kernel_callback<shogun::CKernel>, pimpl_distance_callback<shogun::CDistance>, ShogunFeatureVectorCallback, tapkee::ParametersSet) in tapkee_shogun.cpp.o
2020-03-03T21:28:00.2966170Z       shogun::CMMD::init() in MMD.cpp.o
2020-03-03T21:28:00.2967190Z       shogun::CStreamingMMD::CStreamingMMD() in StreamingMMD.cpp.o
2020-03-03T21:28:00.3080930Z   "_omp_get_num_threads", referenced from:
2020-03-03T21:28:00.3083050Z       _.omp_outlined. in Distance.cpp.o
2020-03-03T21:28:00.3095150Z       _.omp_outlined..21 in Distance.cpp.o
2020-03-03T21:28:00.3114190Z       _.omp_outlined. in DotFeatures.cpp.o
2020-03-03T21:28:00.3114780Z       _.omp_outlined..10 in DotFeatures.cpp.o
2020-03-03T21:28:00.3115280Z       _.omp_outlined. in DistanceMachine.cpp.o
2020-03-03T21:28:00.3115800Z       _.omp_outlined..6 in DistanceMachine.cpp.o
2020-03-03T21:28:00.3116320Z       _.omp_outlined. in KernelMachine.cpp.o
2020-03-03T21:28:00.3116740Z       ...
2020-03-03T21:28:00.3226580Z   "_omp_get_thread_num", referenced from:
2020-03-03T21:28:00.3227700Z       _.omp_outlined. in Distance.cpp.o
2020-03-03T21:28:00.3228230Z       _.omp_outlined..21 in Distance.cpp.o
2020-03-03T21:28:00.3228730Z       _.omp_outlined. in DotFeatures.cpp.o
2020-03-03T21:28:00.3233140Z       _.omp_outlined..10 in DotFeatures.cpp.o
2020-03-03T21:28:00.3240000Z       _.omp_outlined. in DistanceMachine.cpp.o
2020-03-03T21:28:00.3240770Z       _.omp_outlined..6 in DistanceMachine.cpp.o
2020-03-03T21:28:00.3241280Z       _.omp_outlined. in KernelMachine.cpp.o
2020-03-03T21:28:00.3241790Z       ...
2020-03-03T21:28:00.3346040Z   "_omp_get_wtime", referenced from:
2020-03-03T21:28:00.3360780Z       tapkee::tapkee_internal::ImplementationBase<std::__1::__wrap_iter<int*>, pimpl_kernel_callback<shogun::CKernel>, pimpl_distance_callback<shogun::CDistance>, ShogunFeatureVectorCallback>::embedUsing(tapkee::DimensionReductionMethod) in tapkee_shogun.cpp.o
2020-03-03T21:28:00.3363320Z       Eigen::SparseMatrix<double, 0, int> tapkee::tapkee_internal::linear_weight_matrix<std::__1::__wrap_iter<int*>, pimpl_kernel_callback<shogun::CKernel> >(std::__1::__wrap_iter<int*> const&, std::__1::__wrap_iter<int*> const&, std::__1::vector<std::__1::vector<int, std::__1::allocator<int> >, std::__1::allocator<std::__1::vector<int, std::__1::allocator<int> > > > const&, pimpl_kernel_callback<shogun::CKernel>, double, double) in tapkee_shogun.cpp.o
2020-03-03T21:28:00.3366100Z       std::__1::vector<std::__1::vector<int, std::__1::allocator<int> >, std::__1::allocator<std::__1::vector<int, std::__1::allocator<int> > > > tapkee::tapkee_internal::find_neighbors_bruteforce_impl<std::__1::__wrap_iter<int*>, tapkee::tapkee_internal::KernelDistance<std::__1::__wrap_iter<int*>, pimpl_kernel_callback<shogun::CKernel> > >(std::__1::__wrap_iter<int*> const&, std::__1::__wrap_iter<int*> const&, tapkee::tapkee_internal::KernelDistance<std::__1::__wrap_iter<int*>, pimpl_kernel_callback<shogun::CKernel> >, int) in tapkee_shogun.cpp.o
2020-03-03T21:28:00.3369070Z       std::__1::vector<std::__1::vector<int, std::__1::allocator<int> >, std::__1::allocator<std::__1::vector<int, std::__1::allocator<int> > > > tapkee::tapkee_internal::find_neighbors_vptree_impl<std::__1::__wrap_iter<int*>, tapkee::tapkee_internal::KernelDistance<std::__1::__wrap_iter<int*>, pimpl_kernel_callback<shogun::CKernel> > >(std::__1::__wrap_iter<int*> const&, std::__1::__wrap_iter<int*> const&, tapkee::tapkee_internal::KernelDistance<std::__1::__wrap_iter<int*>, pimpl_kernel_callback<shogun::CKernel> >, int) in tapkee_shogun.cpp.o
2020-03-03T21:28:00.3372190Z       std::__1::vector<std::__1::vector<int, std::__1::allocator<int> >, std::__1::allocator<std::__1::vector<int, std::__1::allocator<int> > > > tapkee::tapkee_internal::find_neighbors_covertree_impl<std::__1::__wrap_iter<int*>, tapkee::tapkee_internal::KernelDistance<std::__1::__wrap_iter<int*>, pimpl_kernel_callback<shogun::CKernel> > >(std::__1::__wrap_iter<int*>, std::__1::__wrap_iter<int*>, tapkee::tapkee_internal::KernelDistance<std::__1::__wrap_iter<int*>, pimpl_kernel_callback<shogun::CKernel> >, int) in tapkee_shogun.cpp.o
2020-03-03T21:28:00.3374570Z       bool tapkee::tapkee_internal::is_connected<std::__1::__wrap_iter<int*> >(std::__1::__wrap_iter<int*>, std::__1::__wrap_iter<int*>, std::__1::vector<std::__1::vector<int, std::__1::allocator<int> >, std::__1::allocator<std::__1::vector<int, std::__1::allocator<int> > > > const&) in tapkee_shogun.cpp.o
2020-03-03T21:28:00.3377460Z       std::__1::pair<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> > tapkee::tapkee_internal::eigendecomposition_impl_arpack<Eigen::SparseMatrix<double, 0, int>, tapkee::tapkee_internal::SparseInverseMatrixOperation>(Eigen::SparseMatrix<double, 0, int> const&, int, unsigned int) in tapkee_shogun.cpp.o
2020-03-03T21:28:00.3378660Z       ...
2020-03-03T21:28:00.3463890Z   "_omp_set_dynamic", referenced from:
2020-03-03T21:28:00.3464580Z       shogun::Parallel::Parallel() in Parallel.cpp.o
2020-03-03T21:28:00.3465100Z       shogun::Parallel::Parallel() in Parallel.cpp.o
2020-03-03T21:28:00.3465660Z       shogun::Parallel::Parallel(shogun::Parallel const&) in Parallel.cpp.o
2020-03-03T21:28:00.3466340Z       shogun::Parallel::Parallel(shogun::Parallel const&) in Parallel.cpp.o
2020-03-03T21:28:00.3596540Z   "_omp_set_num_threads", referenced from:
2020-03-03T21:28:00.3597690Z       shogun::Parallel::Parallel() in Parallel.cpp.o
2020-03-03T21:28:00.3598310Z       shogun::Parallel::Parallel() in Parallel.cpp.o
2020-03-03T21:28:00.3598900Z       shogun::Parallel::Parallel(shogun::Parallel const&) in Parallel.cpp.o
2020-03-03T21:28:00.3599550Z       shogun::Parallel::Parallel(shogun::Parallel const&) in Parallel.cpp.o
2020-03-03T21:28:00.3600180Z       shogun::Parallel::set_num_threads(int) in Parallel.cpp.o
2020-03-03T21:28:00.3824220Z ld: symbol(s) not found for architecture x86_64

@isuruf
Copy link
Member

isuruf commented Mar 3, 2020

This might be because -fopenmp is not given in the link line.

@vigsterkr
Copy link
Contributor

mmm yeah, we rely on cmake for setting these things... i guess should look into it before the next release

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

No branches or pull requests

3 participants