Data.table: يؤدي تحميل data.table إلى تعليق mclapply () على نظام التشغيل MacOS

تم إنشاؤها على ١٣ أكتوبر ٢٠١٧  ·  39تعليقات  ·  مصدر: Rdatatable/data.table

يبدو أن هذه المشكلة https://github.com/Bioconductor/BiocParallel/issues/67 تؤدي إلى

library(parallel)
library(data.table)
mclapply(1:2, sqrt)

خرج مع

> sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] data.table_1.10.4-2

loaded via a namespace (and not attached):
[1] compiler_3.4.2
openmp

التعليق الأكثر فائدة

davidgohel : يرجى الاطلاع على هذا الدليل لتركيب سلسلة أدوات R LLVM محليًا. http://thecoatlessprofessor.com/programming/openmp-in-r-on-os-x/

بدلاً من ذلك ، أوصي بتحرير الملف على R.home("etc/Makeconf") وإزالة أي مثيل من -fopenmp تراه هناك ، بحيث لا يحاول هذا التجميع استخدام OpenMP مع سلسلة أدوات نظام Apple.

ال 39 كومينتر

شكرا على التقرير.

البند 4 من الأخبار لـ 1.10.4-1:

محاولة التحسين على Mac باستخدام OpenMP من Intel عندما يتم عمل تفرعات الحزمة "المتوازية" بعد أداء data.table بالتوازي مع OpenMP. يبدو أن تطبيق OpenMP هذا يترك سلاسل الرسائل قيد التشغيل بعد انتهاء المنطقة المتوازية. إذا كان هذا الإصلاح لا يزال لا يعمل ، فاتصل بـ setDTthreads (1) مباشرة بعد مكتبة (data.table) التي تم الإبلاغ عنها لإصلاح المشكلة.

في dev ، قمت بتحسين هذا العنصر نفسه ولكنني أهملت أن يتم تغيير العناصر الإخبارية إلى تصحيح CRAN. من ملف dev NEWS :

تمت محاولة التحسين على نظام التشغيل Mac فقط عند استخدام الحزمة المتوازية أيضًا (التي تتفرع) ، # 2137. يبدو أن تطبيق OpenMP من Intel يترك الخيوط قيد التشغيل بعد انتهاء المنطقة المتوازية OpenMP (داخل data.table) على عكس GNU libgomp. لذلك ، إذا وعندما يتم استدعاء fork الخاص بالموازاة من قبل المستخدم بعد تشغيل data.table بالتوازي بالفعل ، يحدث عدم الاستقرار. تحدث المشكلة فقط مع ثنائيات حزمة Mac من CRAN لأنها تم إنشاؤها بواسطة CRAN باستخدام مكتبة OpenMP من Intel. لا توجد مشاكل معروفة على نظامي التشغيل Windows أو Linux ولا توجد مشاكل معروفة على أي نظام أساسي عند عدم استخدام التوازي. إذا كان الإصلاح الخاص بنظام Mac فقط لا يزال لا يعمل ، فاتصل بـ setDTthreads (1) مباشرة بعد مكتبة (data.table) التي تم الإبلاغ عنها لإصلاح المشكلة عن طريق وضع data.table في الوضع المفرد في وقت سابق.

ومع ذلك ، في حالتك ، لم تستخدم data.table قبل التفرع. هذا جانب جديد لم يتم الإبلاغ عنه من قبل. هل مثالك القابل للتكرار صحيح تمامًا من حيث أن هذه الأسطر الثلاثة هي حرفياً كل ما يحدث في جلسة R جديدة؟ أي لا يوجد استخدام data.table بين تحميله واستدعاء mclapply ؟ يمكنك محاولة الاتصال بـ setDTthreads(1) فورًا بعد library(data.table) أي حال ، لكنني أشك في أنه سيساعد إذا لم يكن هناك بالفعل استخدام data.table قبل mclapply .

هل قمت بتثبيت برنامج CRAN mac الثنائي ، أو من المصدر؟ يبدو أنه مهم على نظام MacOS ، فيما يتعلق بهذه المشكلة mclapply التي تستخدمها مكتبة OpenMP. هل أنت قادر على تحديد ما إذا كان تطبيق OpenMP الخاص بـ Intel (libomp) أو GNU (libgomp) الذي يتم استخدامه على الجهاز؟

هل يمكنك التجميع من المصدر باستخدام تعليمات MacOS وهل هذا يساعد؟ ربما يرتبط ذلك بمكتبة OpenMP المناسبة محليًا لك ، أو شيء من هذا القبيل. بعض الأشخاص لم يتبعوا التعليمات بدقة كافية ، لذلك يجب اتباعهم بدقة على نظام MacOS.

هل يعمل لك test.data.table() ؟ اختبار 1705 يختبر mclapply ويمرر على CRAN. أفترض أن CRAN تختبر ثنائيات Mac على نظام MacOS ، لكن من الممكن أن أفترض أنها تختبر بنية مختلفة.

العنصر 1 من NEWS من 1.10.4-2 أشك في أنه مرتبط ، لكنني سأذكره للتأكد من اكتماله:

OpenMP على MacOS مدعوم الآن بواسطة CRAN ومضمن في ثنائيات حزم CRAN لنظام التشغيل Mac. لكن تثبيت v1.10.4-1 من المصدر على MacOS فشل عندما لم يتم تمكين OpenMP في وقت الترجمة ، # 2409. بفضل ليز ماكفي و fupangpangpang للإبلاغ. تم تحديث رسالة بدء التشغيل عند عدم تمكين OpenMP.

فيما يلي القضايا ذات الصلة:
https://github.com/Rdatatable/data.table/issues/2413
https://github.com/Rdatatable/data.table/issues/2409
https://github.com/Rdatatable/data.table/issues/2406
https://github.com/Rdatatable/data.table/issues/2137

أنا أكافح أساسًا مع نظام التشغيل MacOS. إذا كان هناك أي شخص يستمع من Apple و / أو Intel يمكنه دعم منتجاتهم ، فسيكون ذلك رائعًا. أجد صعوبة في معرفة كيف أنها مشكلة جدول بيانات حقًا. لقد جربت كل ما يمكنني التفكير فيه للتغلب عليه وتوثيقه في NEWS. المساعدة والاقتراحات محل تقدير كبير.

نعم ، البرنامج النصي البسيط مع فقط

library(parallel)
library(data.table)
mclapply(1:2, sqrt)

هذا على آلات بناء الموصلات الحيوية. أعتقد أن هذا تثبيت ثنائي بسيط ، لكنني سأؤكد ذلك. لدينا

$ ls /Library/Frameworks/R.framework/Resources/lib
libR.dylib      libRlapack.dylib.dSYM   libquadmath.0.dylib
libR.dylib.dSYM     libc++.1.dylib      libreadline.5.2.dylib
libRblas.0.dylib    libc++abi.1.dylib   libreadline.dylib
libRblas.dylib      libgcc_s.1.dylib    libunwind.1.dylib
libRblas.dylib.dSYM libgfortran.3.dylib
libRlapack.dylib    libomp.dylib

و

$ otool -L  /Library/Frameworks/R.framework/Resources/bin/exec/R 
/Library/Frameworks/R.framework/Resources/bin/exec/R:
    /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libR.dylib (compatibility version 3.4.0, current version 3.4.2)
    /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.dylib (compatibility version 0.0.0, current version 0.0.0)
    /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libomp.dylib (compatibility version 5.0.0, current version 5.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

لذلك من المفترض ربط libomp.

test.data.table() يقول

Running test id 1705     Assertion failure at kmp_runtime.cpp(6480): __kmp_thread_pool == __null.
Assertion failure at kmp_runtime.cpp(6480): __kmp_thread_pool == __null.
OMP: Error #13: Assertion failure at kmp_runtime.cpp(6480).
OMP: Hint: Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see http://www.intel.com/software/products/support/.
OMP: Error #13: Assertion failure at kmp_runtime.cpp(6480).
OMP: Hint: Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see http://www.intel.com/software/products/support/.
Assertion failure at kmp_runtime.cpp(6480): __kmp_thread_pool == __null.
OMP: Error #13: Assertion failure at kmp_runtime.cpp(6480).
OMP: Hint: Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see http://www.intel.com/software/products/support/.
Assertion failure at kmp_runtime.cpp(6480): __kmp_thread_pool == __null.
OMP: Error #13: Assertion failure at kmp_runtime.cpp(6480).
OMP: Hint: Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see http://www.intel.com/software/products/support/.
Running test id 1750     Test 1751 not run. If required call library(nanotime) first.

endian==little, sizeof(long double)==16, sizeof(pointer)==8

All 5936 tests in inst/tests/tests.Rraw completed ok in 00:01:45 on Sat Oct 14 21:25:30 2017

شكرا على هذا. نعم ، أعتقد أن هذه المكالمات __kmp_* خاصة بـ Intel OpenMP Runtime ولقد رأيتها تم الإبلاغ عنها من قبل. اختبار 1705 يختبر ذلك على وجه التحديد. يستخدم خيوط 2 OpenMP داخل data.table نفسه متبوعًا باستدعاء parallel::mclapply . ترجع أخطاء __kmp_ إلى أن تنفيذ Intel ، iiuc ، يترك الخيوط قيد التشغيل حتى بعد انتهاء جميع المناطق المتوازية ، وبالتالي فإن الانقسام التالي غير مستقر. في هذه الحالة ، يبدو أنه لم يتحطم ، لكن هذا مجرد حظ. حقيقة أنك ترى هذا الناتج مع 1.10.4-2 يعني أن محاولتي لم تنجح. هناك رد اتصال مسبق والذي يستدعي فيه الآن omp_set_num_threads(1) على أمل أن تقوم مكتبة Intel بمسح سلاسل الرسائل قيد التشغيل قبل الشوكة. لكن يبدو أنه ليس كذلك. لذلك ، يتبقى لنا ما تم الإبلاغ عنه للعمل ، وهو استدعاء setDTthreads(1) فورًا بعد library(data.table) لإيقاف OpenMP الخاص بـ Intel من إنشاء سلاسل الرسائل في المقام الأول.

في حالة تعليق الخطوط الثلاثة فقط ، هل من الممكن أن تنشئ مكتبة OpenMP الخاصة بـ Intel مؤشرات الترابط الخاصة بها عند الارتباط أو التهيئة؟ إذا كان الأمر كذلك ، فقد يفسر ذلك. خلاف ذلك ، أنا في حيرة من ذلك.

علاوة على ذلك ، لا أعرف كيف ترتبط قدرات OpenMP البالغة clang و gcc بمكتبات OpenMP الثلاثة: libomp ، libiomp و libgomp . يبدو أن لديك libomp . لكن أعتقد أن CRAN تجمع بـ libiomp ؟ ربما هذا له علاقة به. أيضًا ، أبلغ شخص واحد ( هنا ) أن "تغيير llvm إلى gcc" أوقف الأعطال على MacOS ، لكنهم كانوا يجمعون من المصدر.

لقد جئت للتو عبر الكود المصدري لوقت تشغيل Intel OpenMP. لا أعرف ما هو هذا المشروع لأنني اعتقدت أن مكتبة Intel كانت مغلقة المصدر. لكن ربما من الممكن تجميعها وتصحيحها. https://www.openmprtl.org/ ربما يكون من الأسهل فقط التجميع محليًا أولاً ومعرفة ما إذا كان ذلك يعمل ، أو استخدام مكتبة GNU.

يمر الاختبار 1705 على CRAN ، لذا ربما يكون هذا أمرًا مأمولًا ، من خلال معرفة الاختلاف بين آلة (آلات) CRAN وجهازك. يمر الاختبار 1705 بالفعل نيابة عنك وعلى CRAN ، ولكن libomp يُخرج أخطاء التأكيد إلى وحدة التحكم التي لم يتم التقاطها من خلال الاختبار. أتساءل عما إذا كان من الممكن رؤية سجلات CRAN بطريقة ما لمعرفة ما إذا كانت هذه الرسائل __kmp موجودة في سجلات CRAN أيضًا. إذا لم تكن الرسائل موجودة في سجلات CRAN ، فقد يكون من المفيد استكشاف الفرق بين جهاز CRAN وجهازك.

ربما يكون هذا مطلوبًا مع حزمة CRAN الثنائية: http://macappstore.org/libiomp/
أو ربما يتم تجميع libiomp بشكل ثابت في حزمة ثنائية بواسطة CRAN؟ لقد لاحظت أن قسم "الحزم الثنائية" ?install.packages معقد جدًا لنظام MacOS وهناك العديد من الخيارات الثنائية للوسيطة type= .

مكتبة إنتل تطبع:

OMP: الخطأ رقم 13: فشل التأكيد في kmp_runtime.cpp (6480)
OMP: تلميح: يرجى إرسال تقرير خطأ بهذه الرسالة ، وتجميع وتشغيل الأوامر المستخدمة ، ومعلومات تكوين الجهاز بما في ذلك المترجم الأصلي وإصدارات نظام التشغيل. سيتم الحصول على استجابة أسرع من خلال تضمين جميع مصادر البرنامج. للحصول على معلومات حول إرسال هذه المشكلة ، يرجى مراجعة http://www.intel.com/software/products/support/.

هل يمكن لشخص لديه مشكلة في MacOS تقديم مشكلة مع Intel من فضلك؟

مرحبًا ، لقد أبلغت في الأصل عن المشكلة مع مستودع BiocParallel حيث واجهت المشكلة أثناء استخدام وظائف من تلك الحزمة. لقد قاموا بتضييق نطاق المشكلة بحيث يتم استدعاء mclapply أثناء تحميل data.table.

لقد اتبعت الإرشادات هنا لتثبيت أحدث إصدار من data.table على جهاز MacOS الخاص بي ، لكنني ما زلت أواجه المشكلة.

ومن المثير للاهتمام ، أن أحد الزملاء كان لديه أحدث إصدار من data.table مثبتًا على جهاز Mac الخاص به ولم يكن لديه أي مشكلات. ومع ذلك ، لم يكن OpenMP مثبتًا على نظامه.

تمكنت من حل المشكلة بالرجوع إلى data.table 1.10.2.

asenabouth هل يمكنك تقديم طلب دعم مع Intel من فضلك (انظر تعليقي أعلاه)؟ يبدو أن هناك مشكلة في مكتبتهم. بدلاً من ذلك ، ربما يمكن لشخص من Apple المساعدة. هل أنت قادر على الحصول على دعمهم على الإطلاق؟ لست مقتنعًا بأن التثبيت من المصدر لا يحل المشكلة. هل يمكنك إظهار الأوامر والإخراج من فضلك. هل أي شخص آخر غير قادر على استخدام parallel::mclapply بعد تحميل data.table 1.10.4 ، حتى بعد التجميع من المصدر وتجنب ثنائي CRAN؟

سأقدم طلب دعم إلى Intel.

بالنسبة للتثبيت من المصدر ، إليك التثبيت والاختبار اللاحق:
"" {r}
[تمت استعادة مساحة العمل المحفوظة مسبقًا]

remove.packages ("data.table")
إزالة الحزمة من "/Users/a.senabouth/Library/R/3.4/library"
(مثل "lib" غير محدد)
install.packages ("data.table" ، اكتب = "مصدر" ،

نوع المحتوى "application / gzip" بطول 3312731 بايت (3.2 ميجا بايت)

تم تنزيله 3.2 ميجا بايت

  • تثبيت حزمة المصدر 'data.table' ...
    * ليبس/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c assign.c -o assign.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلي -أنبوب -c between.c -o between.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c bmerge.c -o bmerge.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c chmatch.c -o chmatch.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c dogroups.c -o dogroups.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c fastmean.c -o fastmean.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c fcast.c -o fcast.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c fmelt.c -o fmelt.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c forder.c -o forder.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c frank.c -o frank.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c fread.c -o fread.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c freadR.c -o freadR.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c fsort.c -o fsort.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c fwrite.c -o fwrite.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c fwriteR.c -o fwriteR.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c gsumm.c -o gsumm.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c ijoin.c -o ijoin.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c init.c -o init.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c inrange.c -o inrange.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = original -pipe -c openmp-utils.c -o openmp-utils.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c quickselect.c -o quickselect.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = original -pipe -c rbindlist.c -o rbindlist.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c reorder.c -o reorder.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلي-ماسورة -c shift.c -o shift.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c subset.c -o subset.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c transpose.c -o transpose.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = original -pipe -c uniqlist.c -o uniqlist.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c vecseq.c -o vecseq.o/ usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c wrappers.c -o wrappers.o/ usr / local / opt / llvm / bin / clang -fopenmp -dynamiclib -Wl، -headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L / Library / Frameworks / R.framework / Resources / lib -L / usr / local / opt / gettext / lib -L / usr / local / opt / llvm / lib -Wl، -rpath، / usr / local / opt / llvm / lib -o data.table.so assign.o between.o bmerge.o chmatch .o dogroups.o fastmean.o fcast.o fmelt.o forder.o frank.o fread.o freadR.o fsort.o fwrite.o fwriteR.o gsumm.o ijoin.o init.o inrange.o openmp-utils .o quickselect.o rbindlist.o reorder.o shift.o subset.o transpose.o uniqlist.o vecseq.o wrappers.o -fopenmp -F / Library / Frameworks / R.framework / .. -framework R -Wl، -Framework -Wl ، CoreFoundationmv data.table.so datatable.soإذا [""! = "Windows_NT"] && [ uname -s = 'Darwin']؛ فايالتثبيت على /Users/a.senabouth/Library/R/3.4/library/data.table/libs* ص
    * inst* تجميع البايت وتحضير الحزمة للتحميل البطيء
    * مساعدة* * تثبيت فهارس المساعدة
    * بناء مؤشرات الحزمة* تثبيت المقالات القصيرة
    ** اختبار إمكانية تحميل الحزمة المثبتة
  • تم (جدول البيانات)

حزم المصدر التي تم تنزيلها بتنسيق
'/ private / var / folder / zz / zyxvpxvq6csfxvn_n0001lp0000cxh / T / Rtmpl7TqS4 / download_packages'

ص
خطأ: الكائن 'R' غير موجود
مكتبة (متوازية)
مكتبة (جدول البيانات)
جدول البيانات 1.10.5 في التنمية المبنية 2017-10-16 07:29:07 بالتوقيت العالمي ؛ ترافيس
أسرع طريقة للتعلم (عن طريق مؤلفي data.table): https://www.datacamp.com/courses/data-analysis-the-data-table-way
التوثيق:؟ data.table، example (data.table) and browseVignettes ("data.table")
ملاحظات الإصدار ومقاطع الفيديو والشرائح: http://r-datatable.com
mclapply (1: 2 ، الجذر التربيعي)

* ضبطت عملية غير قانونية *
العنوان 0x7fffa9730ae4 يسبب "كود التشغيل غير القانوني"

تتبع الأثر:
1: ماكفورك ()
2: FUN (X [[i]] ، ...)
3: لابلي (seq_len (النوى) ، inner.do)
4: mclapply (1: 2، sqrt)

الإجراءات الممكنة:
1: إحباط (مع تفريغ النواة ، إذا تم تمكينه)
2: خروج عادي R
3: الخروج R دون حفظ مساحة العمل
4: الخروج R توفير مساحة العمل

And here's the session info:
```{r}
R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] data.table_1.10.5

loaded via a namespace (and not attached):
[1] compiler_3.4.2

تحرير :
حصلت عليه للعمل عن طريق تثبيت 1.10.4 من المصدر.
"" {r}

تتطلب (devtools)
تحميل الحزمة المطلوبة: devtools
install_version ("data.table" ، الإصدار = "1.10.4" ، repos = "http://cran.us.r-project.org")
تنزيل الحزمة من عنوان url: http://cran.us.r-project.org/src/contrib/Archive/data.table/data.table_1.10.4.tar.gz
جاري تثبيت data.table
'/Library/Frameworks/R.framework/Resources/bin/R' - no-site-file - no-environ
--لا يحفظ - لا - استعادة - تثبيت CMD الهادئ
"/private/var/folders/zz/zyxvpxvq6csfxvn_n0001lp0000cxh/T/RtmpXDSgR8/devtoolsdf05280c79d9/data.table"
--library = '/ Users / a.senabouth / Library / R / 3.4 / library' - اختبارات التثبيت

  • تثبيت حزمة المصدر 'data.table' ...
    * تم تفريغ حزمة "data.table" بنجاح وفحص مبالغ MD5* ليبس
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c assign.c -o assign.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c between.c -o between.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c bmerge.c -o bmerge.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c chmatch.c -o chmatch.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c dogroups.c -o dogroups.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c fastmean.c -o fastmean.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c fcast.c -o fcast.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c fmelt.c -o fmelt.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c forder.c -o forder.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c frank.c -o frank.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c fread.c -o fread.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c fsort.c -o fsort.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c fwrite.c -o fwrite.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c gsumm.c -o gsumm.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c ijoin.c -o ijoin.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c init.c -o init.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c inrange.c -o inrange.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = original -pipe -c openmp-utils.c -o openmp-utils.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c quickselect.c -o quickselect.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = original -pipe -c rbindlist.c -o rbindlist.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c reorder.c -o reorder.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلي-ماسورة -c shift.c -o shift.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c subset.c -o subset.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c transpose.c -o transpose.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = original -pipe -c uniqlist.c -o uniqlist.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -edantic -std = gnu99 -mtune = أصلية -pipe -c vecseq.c -o vecseq.o
    / usr / local / opt / llvm / bin / clang -fopenmp -I / Library / Frameworks / R.framework / Resources / include -DNDEBUG -I / usr / local / opt / gettext / include -I / usr / local / opt / llvm / include -fopenmp -fPIC -g -O3 -Wall -pedantic -std = gnu99 -mtune = أصلية -pipe -c wrappers.c -o wrappers.o
    / usr / local / opt / llvm / bin / clang -fopenmp -dynamiclib -Wl، -headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L / Library / Frameworks / R.framework / Resources / lib -L / usr / local / opt / gettext / lib -L / usr / local / opt / llvm / lib -Wl، -rpath، / usr / local / opt / llvm / lib -o data.table.so assign.o between.o bmerge.o chmatch .o dogroups.o fastmean.o fcast.o fmelt.o forder.o frank.o fread.o fsort.o fwrite.o gsumm.o ijoin.o init.o inrange.o openmp-utils.o quickselect.o rbindlist .o reorder.o shift.o subset.o transpose.o uniqlist.o vecseq.o wrappers.o -fopenmp -F / Library / Frameworks / R.framework / .. -framework R -Wl، -framework -Wl، CoreFoundation
    mv data.table.so datatable.so
    إذا [""! = "Windows_NT"] && [ uname -s = 'Darwin']؛ ثم install_name_tool -id datatable.so datatable.so ؛ فاي
    التثبيت على /Users/a.senabouth/Library/R/3.4/library/data.table/libs
    * ص* inst
    * الاختبارات* تجميع البايت وتحضير الحزمة للتحميل البطيء
    * مساعدة* * تثبيت فهارس المساعدة
    * بناء مؤشرات الحزمة* تثبيت المقالات القصيرة
    ** اختبار إمكانية تحميل الحزمة المثبتة
  • تم (جدول البيانات)
    > مكتبة (جدول البيانات)
    جدول البيانات 1.10.4
    أسرع طريقة للتعلم (عن طريق مؤلفي data.table): https://www.datacamp.com/courses/data-analysis-the-data-table-way
    التوثيق:؟ data.table، example (data.table) and browseVignettes ("data.table")
    ملاحظات الإصدار ومقاطع الفيديو والشرائح: http://r-datatable.com
    > مكتبة (متوازية)
    > mclapply (1: 2، sqrt)
    [[1]]
    [1] 1

[[2]]
[1] 1.414214
""

لقد قمت بنشر https://software.intel.com/en-us/forums/intel-c-compiler/topic/746943

من المحتمل أن يكون في المكان الخطأ ومن المحتمل أن ألهب ولكن آمل أن تتدحرج الكرة.

mattdowle اسمحوا لي أن أعرف إذا كانت هناك أشياء تريد مني إضافتها / القيام بها

أردت أن أؤكد أنني أعدت نفس الخطأ مثل asenabouth وأن إعادة تثبيت 1.10.4 من المصدر أصلحت المشكلة.

معلومات الجلسة:

R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  base     

other attached packages:
[1] data.table_1.10.4

loaded via a namespace (and not attached):
[1] compiler_3.4.2 methods_3.4.2 

مجرد تسجيل بعض التفاصيل على جهازي

library(parallel)
library(data.table)
mclapply(1:2, sqrt)

ينتج عنه

 *** caught illegal operation ***
address 0x7fffb500eae4, cause 'illegal opcode'

بـ sessionInfo()

R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] parallel  stats     graphics  utils     datasets  grDevices methods  
[8] base     

other attached packages:
[1] data.table_1.10.4-2 testthat_1.0.2      devtools_1.13.3    

loaded via a namespace (and not attached):
[1] compiler_3.4.2 magrittr_1.5   R6_2.2.2       withr_2.0.0    crayon_1.3.4  
[6] memoise_1.1.0  digest_0.6.12

ومن المثير للاهتمام،

> remove.packages("data.table")
Removing package from ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library’
(as ‘lib’ is unspecified)
> install.packages("data.table", type = "source",
+ repos = "http://Rdatatable.github.io/data.table")

ينتج عنه

trying URL 'http://Rdatatable.github.io/data.table/src/contrib/data.table_1.10.5.tar.gz'

Content type 'application/gzip' length 3312726 bytes (3.2 MB)
==================================================
downloaded 3.2 MB

* installing *source* package ‘data.table’ ...
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/include  -fopenmp -fPIC  -Wall -g -O2  -c assign.c -o assign.o
clang: error: unsupported option '-fopenmp'
make: *** [assign.o] Error 1
ERROR: compilation failed for package ‘data.table’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/data.table’

The downloaded source packages are in
    ‘/private/var/folders/48/q6ltldjs251000_wvjrdy_vm0000gn/T/Rtmp6eZFXj/downloaded_packages’
Warning message:
In install.packages("data.table", type = "source", repos = "http://Rdatatable.github.io/data.table") :
  installation of package ‘data.table’ had non-zero exit status

سأرى ما إذا كان هذا مرتبطًا

لقد اتبعت أيضًا الإرشادات الموجودة على https://github.com/Rdatatable/data.table/wiki/Installation وما زالت المشكلة تحدث ...

تعديل:
المشكلة الأصلية مع mclapply و illegal operation (وليس خطأ المترجم unsupported option '-fopenmp' - الذي تم إصلاحه باتباع التعليمات)

شكرا لكم جميعا. من المثير للاهتمام أن 1.10.4 يبدو أنها تعمل بشكل جيد ولكن 1.10.4-2 لا تعمل. يبدو أنه يتعطل بمجرد استدعاء الشوكة. المحاولة التي ذكرتها في NEWS كانت في تلك المنطقة.

أولاً ، ما لم يتغير. عند تحميل data.table ، يستدعي init.c هذا في openmp-utils.c :

void avoid_openmp_hang_within_fork() {
  // Called once on loading data.table from init.c
  #ifdef _OPENMP
    pthread_atfork(&when_fork, NULL, NULL);
  #endif
}

لذلك عندما يقوم parallel::mclapply باستدعاء fork() ، يتم تشغيل وظيفة when_fork . الذي في 1.10.4-2 يبدو كالتالي:

void when_fork() {    # v 1.10.4-2
  // attempted workaround for Intel's OpenMP implementation which leaves threads
  // running after parallel region; these crash when forked.
  #ifdef _OPENMP
    omp_set_num_threads(1);
  #endif

  DTthreads = 1;
}

من قبل (في 1.10.4) ، لم يتم استخدامه لاستدعاء omp_set_num_threads(1) ، وكان فقط تعيين هذا المتغير الثابت DTthreads :

void when_fork() {    # v 1.10.4
  DTthreads = 1;
}

كل ما يمكنني التفكير فيه هو أن الدعوة إلى omp_set_num_threads(1) تحطمها. ولكن هذه هي أبسط وظيفة يمكنك الاتصال بها في OpenMP. ربما لم يتم ربطها بشكل صحيح بالمكتبة ، بطريقة ما؟

  1. بالنسبة للأشخاص الذين يمكنهم إعادة إنتاج العطل عند استدعاء parallel::mclapply ، هل يعمل fwrite() البسيط بشكل جيد بالنسبة لك في جلسة جديدة بدون تحميل الحزمة parallel ؟ هل تستخدم العديد من وحدات المعالجة المركزية كما ينبغي؟ ستحتاج إلى DT كبير للاختبار وإلا فإنه يستخدم مؤشر ترابط واحد فقط للبيانات الصغيرة. إذا تعطل عند أي استخدام لبرنامج OpenMP ، فسنواجه مشكلة في الارتباط. هل يعرف أي شخص ما تعنيه هذه العلامات الموجودة في خط الارتباط وقد يكون لها علاقة بها على نظام MacOS؟ : -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress

  2. يمكنني محاولة إزالة هذه المكالمة إلى omp_set_num_threads(1) مرة أخرى في dev ويمكن لشخص لديه مشكلة الآن مع 1.10.5 محاولة dev مرة أخرى بعد أن أغيره؟

  3. الشيء الغريب هو أن الاختبارات تمر على CRAN على نظام MacOS دون حدوث أي عطل. اختبار 1705 يستدعي parallel::mclapply وجميع الاختبارات تعمل على CRAN باستخدام خيطين. ما الفرق بين آلة CRAN والآلات التي يواجهها الأشخاص مشكلة؟

تضمين التغريدة تحصل على unsupported option '-fopenmp' حتى بعد تشغيل إرشادات MacOS هنا . هل يمكن لأي شخص آخر اقتراح كيفية التقدم بعد ذلك؟ أنا في حيرة.

joethorley هل قمت بتثبيت gettext؟ تبين أنني لم أفعل. تمكنت من تجميع الحزمة بشكل صحيح على نظامي بمجرد الانتهاء من ذلك.

mattdowle no اختفى الخطأ unsupported option '-fopenmp' بعد أن اتبعت التعليمات هنا ولكن الخطأ

 *** caught illegal operation ***
address 0x7fffb500eae4, cause 'illegal opcode'

حدث.

ماكفارس بلدي هو

CC=/usr/local/opt/llvm/bin/clang -fopenmp
CXX=/usr/local/opt/llvm/bin/clang++
# -O3 should be faster than -O2 (default) level optimisation ..
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe
LDFLAGS=-L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib
CPPFLAGS=-I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include

معلومات الجلسة الخاصة بي ()

R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] stats     graphics  utils     datasets  grDevices methods   base     

other attached packages:
[1] testthat_1.0.2  devtools_1.13.3

loaded via a namespace (and not attached):
[1] compiler_3.4.2 magrittr_1.5   R6_2.2.2       withr_2.0.0    crayon_1.3.4  
[6] memoise_1.1.0  digest_0.6.12 

وجلسة R الخاصة بي

> remove.packages("data.table")
Removing package from ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library’
(as ‘lib’ is unspecified)
> install.packages("data.table", type = "source", repos = "http://Rdatatable.github.io/data.table")
trying URL 'http://Rdatatable.github.io/data.table/src/contrib/data.table_1.10.5.tar.gz'
Content type 'application/gzip' length 3312684 bytes (3.2 MB)
==================================================
downloaded 3.2 MB

* installing *source* package ‘data.table’ ...
** libs
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c assign.c -o assign.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c between.c -o between.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c bmerge.c -o bmerge.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c chmatch.c -o chmatch.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c dogroups.c -o dogroups.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fastmean.c -o fastmean.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fcast.c -o fcast.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fmelt.c -o fmelt.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c forder.c -o forder.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c frank.c -o frank.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fread.c -o fread.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c freadR.c -o freadR.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fsort.c -o fsort.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fwrite.c -o fwrite.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fwriteR.c -o fwriteR.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c gsumm.c -o gsumm.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c ijoin.c -o ijoin.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c init.c -o init.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c inrange.c -o inrange.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c openmp-utils.c -o openmp-utils.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c quickselect.c -o quickselect.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c rbindlist.c -o rbindlist.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c reorder.c -o reorder.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c shift.c -o shift.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c subset.c -o subset.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c transpose.c -o transpose.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c uniqlist.c -o uniqlist.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c vecseq.c -o vecseq.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c wrappers.c -o wrappers.o
/usr/local/opt/llvm/bin/clang -fopenmp -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -o data.table.so assign.o between.o bmerge.o chmatch.o dogroups.o fastmean.o fcast.o fmelt.o forder.o frank.o fread.o freadR.o fsort.o fwrite.o fwriteR.o gsumm.o ijoin.o init.o inrange.o openmp-utils.o quickselect.o rbindlist.o reorder.o shift.o subset.o transpose.o uniqlist.o vecseq.o wrappers.o -fopenmp -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
mv data.table.so datatable.so
if [ "" != "Windows_NT" ] && [ `uname -s` = 'Darwin' ]; then install_name_tool -id datatable.so datatable.so; fi
installing to /Library/Frameworks/R.framework/Versions/3.4/Resources/library/data.table/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (data.table)

The downloaded source packages are in
    ‘/private/var/folders/48/q6ltldjs251000_wvjrdy_vm0000gn/T/RtmpWku3yc/downloaded_packages’
> library(parallel)
> library(data.table)
data.table 1.10.5 IN DEVELOPMENT built 2017-10-18 23:12:32 UTC; travis
  The fastest way to learn (by data.table authors): https://www.datacamp.com/courses/data-analysis-the-data-table-way
  Documentation: ?data.table, example(data.table) and browseVignettes("data.table")
  Release notes, videos and slides: http://r-datatable.com
> mclapply(1:2, sqrt)

 *** caught illegal operation ***
address 0x7fffb500eae4, cause 'illegal opcode'

تضمين التغريدة

  1. يبدو أن fwrite() يعمل على جهازي
> mtcars <- rbind(mtcars, mtcars)
> nrow(mtcars)                                       
[1] 16777216
> fwrite(mtcars, "mtcars.csv")
Written 45.1% of 16777216 rows in 2 secs using 8 threads. anyBufferGrown=no; max
Written 69.5% of 16777216 rows in 3 secs using 8 threads. anyBufferGrown=no; max
Written 93.9% of 16777216 rows in 4 secs using 8 threads. anyBufferGrown=no; max                                                                         

asenabouth لدي برنامج gettext مثبت وتمكنت من تجميع الحزمة بشكل صحيح بمجرد اتباع التعليمات. كانت رسالتي غير واضحة بعض الشيء لذا قمت بتحريرها.

تضمين التغريدة

  1. إذا قمت بإزالة هذا الاستدعاء إلى omp_set_num_threads (1) في dev سأحاول مرة أخرى.

يؤدي تثبيت 1.10.4.2 من CRAN ، سواء أكان مصدرًا أم ثنائيًا ، إلى تعليق mclapply. تثبيت github.com/Rdatatable/data. table @ master من المصدر لا يزال ينتج تعليق mclapply الأصلي.

تثبيت هذا الإصدار المعدل من الرئيسي الحالي

$ git diff
diff --git a/src/openmp-utils.c b/src/openmp-utils.c
index d6e3b70..bf104fc 100644
--- a/src/openmp-utils.c
+++ b/src/openmp-utils.c
@@ -78,7 +78,7 @@ void when_fork() {
 void avoid_openmp_hang_within_fork() {
   // Called once on loading data.table from init.c
 #ifdef _OPENMP
-  pthread_atfork(&when_fork, NULL, NULL);
+//  pthread_atfork(&when_fork, NULL, NULL);
 #endif
 }
 ```

or this version

فرق بوابة $
diff --git a / src / openmp-utils.cb / src / openmp-utils.c
الفهرس d6e3b70..8c0236d 100644
--- a / src / openmp-utils.c
+++ b / src / openmp-utils.c
-62،7 +62،7void when_fork () {
// حاول الحل البديل لتطبيق OpenMP من Intel والذي يترك الخيوط قيد التشغيل بعد ذلك
// منطقة موازية ؛ هذه تحطم عندما متشعب.
#ifdef _OPENMP

  • omp_set_num_threads (1) ،
    + // omp_set_num_threads (1) ،
    #إنهاء إذا

// يبدو GNU OpenMP جيدًا بمجرد ضبط DTthreads على 1 والذي يحد من المنطقة المتوازية التالية

clears the hang for me.

The R we use (installed as a binary from CRAN) is the 3.4.2 release

R. الإصدار
_
المنصة x86_64-apple-darwin15.6.0
قوس x86_64
نظام التشغيل داروين 15.6.0
نظام x86_64 ، داروين15.6.0
الحالة
رئيسي 3
ثانوي 4.2
عام 2017
الشهر 09
اليوم 28
svn rev 73368
لغة R
version.string R الإصدار 3.4.2 (2017-09-28)
لقب قصير الصيف
""

إعداد متغير البيئة OMP_NUM_THREADS = 2 لم يغير النتيجة.

يمكنني تأكيد التعليق على omp_set_num_threads(1); في when_fork() لإصلاح المشكلة على جهازي أيضًا

> mclapply(1:2, sqrt)
[[1]]
[1] 1

[[2]]
[1] 1.414214

شكرا لكم جميعا. أجرى الإصلاح في ديف ويمر. joethorley هل تؤكد أنت أو أي شخص آخر أن الإصدار 1.10.5 الأحدث على ما يرام الآن. سأبدأ في التحضير 1.10.4-3 للذهاب إلى CRAN.

تضمين التغريدة

أستطيع أن أؤكد أنه تم إصلاحه.

$ R

R version 3.4.2 (2017-09-28) -- "Short Summer"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> remove.packages("data.table")
Removing package from ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library’
(as ‘lib’ is unspecified)
> install.packages("data.table", type = "source", repos = "http://Rdatatable.github.io/data.table")
trying URL 'http://Rdatatable.github.io/data.table/src/contrib/data.table_1.10.5.tar.gz'
Content type 'application/gzip' length 3313284 bytes (3.2 MB)
==================================================
downloaded 3.2 MB

* installing *source* package ‘data.table’ ...
** libs
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c assign.c -o assign.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c between.c -o between.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c bmerge.c -o bmerge.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c chmatch.c -o chmatch.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c dogroups.c -o dogroups.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fastmean.c -o fastmean.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fcast.c -o fcast.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fmelt.c -o fmelt.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c forder.c -o forder.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c frank.c -o frank.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fread.c -o fread.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c freadR.c -o freadR.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fsort.c -o fsort.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fwrite.c -o fwrite.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c fwriteR.c -o fwriteR.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c gsumm.c -o gsumm.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c ijoin.c -o ijoin.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c init.c -o init.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c inrange.c -o inrange.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c openmp-utils.c -o openmp-utils.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c quickselect.c -o quickselect.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c rbindlist.c -o rbindlist.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c reorder.c -o reorder.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c shift.c -o shift.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c subset.c -o subset.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c transpose.c -o transpose.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c uniqlist.c -o uniqlist.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c vecseq.c -o vecseq.o
/usr/local/opt/llvm/bin/clang -fopenmp -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c wrappers.c -o wrappers.o
/usr/local/opt/llvm/bin/clang -fopenmp -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -o data.table.so assign.o between.o bmerge.o chmatch.o dogroups.o fastmean.o fcast.o fmelt.o forder.o frank.o fread.o freadR.o fsort.o fwrite.o fwriteR.o gsumm.o ijoin.o init.o inrange.o openmp-utils.o quickselect.o rbindlist.o reorder.o shift.o subset.o transpose.o uniqlist.o vecseq.o wrappers.o -fopenmp -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
mv data.table.so datatable.so
if [ "" != "Windows_NT" ] && [ `uname -s` = 'Darwin' ]; then install_name_tool -id datatable.so datatable.so; fi
installing to /Library/Frameworks/R.framework/Versions/3.4/Resources/library/data.table/libs
** R
** inst
** byte-compile and prepare package for lazy loading
session** help
In*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (data.table)

The downloaded source packages are in
    ‘/private/var/folders/48/q6ltldjs251000_wvjrdy_vm0000gn/T/RtmpmAMLnD/downloaded_packages’
> library(parallel)
> library(data.table)
data.table 1.10.5 IN DEVELOPMENT built 2017-10-19 19:32:41 UTC; travis
  The fastest way to learn (by data.table authors): https://www.datacamp.com/courses/data-analysis-the-data-table-way
  Documentation: ?data.table, example(data.table) and browseVignettes("data.table")
  Release notes, videos and slides: http://r-datatable.com
> sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] parallel  stats     graphics  utils     datasets  grDevices methods  
[8] base     

other attached packages:
[1] data.table_1.10.5 testthat_1.0.2    devtools_1.13.3  

loaded via a namespace (and not attached):
[1] compiler_3.4.2 magrittr_1.5   R6_2.2.2       tools_3.4.2    withr_2.0.0   
[6] crayon_1.3.4   memoise_1.1.0  digest_0.6.12 
> mclapply(1:2, sqrt)
[[1]]
[1] 1

[[2]]
[1] 1.414214

جزيل الشكر @ joethorley! تم تقديمه إلى 1.10.4-3 إلى CRAN وكل شيء على ما يرام ، سيستغرق سحر CRAN بضعة أيام ليأخذ مجراه.

التغييرات في v1.10.4-3 (في CRAN 20 أكتوبر 2017)

  1. تم إصلاح التعطل / التعطل على نظام التشغيل MacOS عند استخدام parallel::mclapply وتحميل data.table فقط ، # 2418 . الغريب أن جميع الاختبارات بما في ذلك الاختبار 1705 (الذي يختبر mclapply مع data.table) مرت بخير على CRAN. يبدو أن بعض إصدارات MacOS أو بعض إصدارات المكتبات على MacOS ، ربما. شكرًا جزيلاً لمارتن مورغان للإبلاغ عن نجاح هذا الإصلاح وتأكيده. شكرًا أيضًا لـ asenabouth و Joe Thorley و Danton Noriega للاختبار وتصحيح الأخطاء والتأكيد على أن التوازي التلقائي داخل data.table (مثل fwrite ) يعمل جيدًا حتى على تثبيتات MacOS هذه. راجع أيضًا عناصر الأخبار أدناه للحصول على 1.10.4-1 و 1.10.4-2.

يغلق الآن. يرجى إعادة فتح أو فتح مشكلة جديدة إذا كانت هناك مشكلة في 1.10.4-3.

mattdowle : يبدو أن v1.10.4-2 لا يزال هو الإصدار الذي يتم توزيعه بواسطة CRAN. هل ما زال الإصدار v1.10.4-3 ينتظر في قائمة انتظار إرسال CRAN ، أم حدث خطأ آخر؟

(شكرًا لك على حل هذه المشكلة بسرعة كبيرة ؛ يبدو للأسف أنها تؤثر على عدد كبير من المستخدمين على macOS)

kevinushey Yes 1.10.4-3 كان ينتظر في قائمة الانتظار (في حالة "إعادة الفحص" التي لا أعرف ماذا يعني ذلك ، لمدة 6 أيام). لقد أرسلت بريدًا إلكترونيًا إلى CRAN وتم إصداره الآن إلى CRAN.

ربما أرتكب شيئًا خاطئًا ولكن لا تزال لدي المشكلة على جهاز Mac الخاص بي.

> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] httr_1.3.1      compiler_3.4.1  R6_2.2.2        tools_3.4.1     withr_2.0.0     curl_3.0       
 [7] yaml_2.1.14     memoise_1.1.0   knitr_1.17      git2r_0.19.0    digest_0.6.12   devtools_1.13.3

عند تثبيت إصدار الرافعة من المصدر ، أحصل على:

> install.packages("data.table", type = "source", repos = "https://cran.rstudio.com")
essai de l'URL 'https://cran.rstudio.com/src/contrib/data.table_1.10.4-3.tar.gz'
Content type 'application/x-gzip' length 3071833 bytes (2.9 MB)
==================================================
downloaded 2.9 MB

* installing *source* package ‘data.table’ ...
** package ‘data.table’ correctement décompressé et sommes MD5 vérifiées
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG   -I/usr/local/include  -fopenmp -fPIC  -Wall -g -O2  -c assign.c -o assign.o
clang: error: unsupported option '-fopenmp'
make: *** [assign.o] Error 1
ERROR: compilation failed for package ‘data.table’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/data.table’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/data.table’

Les packages source téléchargés sont dans
    ‘/private/var/folders/51/6jygptvs3bb4njv0t6x7br900000gn/T/Rtmp8NJ0di/downloaded_packages’
Warning message:
In install.packages("data.table", type = "source", repos = "https://cran.rstudio.com") :
  l'installation du package ‘data.table’ a eu un statut de sortie non nul

يمكنني تقديم المزيد من التفاصيل إذا لزم الأمر.

davidgohel : يرجى الاطلاع على هذا الدليل لتركيب سلسلة أدوات R LLVM محليًا. http://thecoatlessprofessor.com/programming/openmp-in-r-on-os-x/

بدلاً من ذلك ، أوصي بتحرير الملف على R.home("etc/Makeconf") وإزالة أي مثيل من -fopenmp تراه هناك ، بحيث لا يحاول هذا التجميع استخدام OpenMP مع سلسلة أدوات نظام Apple.

kevinushey حسنًا ، سأحاول الحل البديل. أعتقد أنني أفسدت شيئًا ما مع الحل الأول.

عملت إضافة هذا إلى ملفي ~/.R/Makevars لتجميع data.table بدون OpenMP على High Sierra:

# Suppress `-fopenmp` in R.home("etc/Makeconf")
# MAIN_LDFLAGS = -fopenmp
# SHLIB_OPENMP_CFLAGS = -fopenmp
# SHLIB_OPENMP_CXXFLAGS = -fopenmp
# SHLIB_OPENMP_FCFLAGS = -fopenmp
# SHLIB_OPENMP_FFLAGS = -fopenmp
MAIN_LDFLAGS =
SHLIB_OPENMP_CFLAGS =
SHLIB_OPENMP_CXXFLAGS =
SHLIB_OPENMP_FCFLAGS =
SHLIB_OPENMP_FFLAGS =

mjsteinbaugh شكرا kevinushey ، لقد نجحت

حاولت تحرير الملف على R.home("etc/Makeconf") لكن لا يسمح لي بتحريره. يبدو أيضًا أنه ليس لدي ملف يسمى ~/.R/Makevars . أي اقتراحات أخرى :) شكرا

ValeriVoev الملف الموجود في ~/.R/Makevars غير موجود عادة ؛ سيتعين عليك إنشائه بنفسك. (أي ، قم بإنشاء مجلد يسمى .R في الدليل الرئيسي الخاص بك ، ثم قم بإنشاء ملف Makevars داخل هذا المجلد)

شكرًا kevinushey - لقد نجحت أخيرًا في العمل ، وقمت بتثبيت data.table 1.10.4-3 ولم يعد R Studio يتعطل بعد الآن. لقد قمت أيضًا بتثبيت clang - لست متأكدًا مما إذا كان ذلك قد ساعد أيضًا أم لا.

ما زلت أرى هذا الخطأ بشكل عشوائي

Assertion failure at kmp_runtime.cpp(6480): __kmp_thread_pool == __null.
OMP: Error #13: Assertion failure at kmp_runtime.cpp(6480).
OMP: Hint: Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see http://www.intel.com/software/products/support/.

والقضية صعبة حقًا.

  1. جدول البيانات 1.10.4 و 1.10.4-3 هما نفس الشيء بالنسبة لي.
  2. لديّ نقش صغير به بعض التعليمات البرمجية المتوازية التي يمكن تشغيلها بدون مشكلة عند تشغيل جميع الأجزاء. مهما كانت متماسكة تلك المقالة القصيرة سيكون لها الخطأ أعلاه.
  3. إذا وضعت رمزًا متوازيًا بسيطًا mclapply(1:2, sqrt) في بداية المقالة القصيرة ، فلن يكون هناك خطأ في حياكة المقالة القصيرة!

يبدو أن كل هذا مرتبط بالتغيرات البيئية. للأسف ليس لدي مثال بسيط قابل للتكرار الآن. الكود الخاص بي معقد للغاية ويتضمن الكثير من الأشياء الأخرى.

مثل dracodoc ، احصل على (6480) عشوائياً. macOS 10.13.3 ، R 3.4.3 ، جدول البيانات 1.10.4-3. فقط عادي R هنا ورمز معقد للغاية لإعادة إنتاجه.

يعمل mclapply البسيط في بداية الكود وأحيانًا يجعل باقي الكود يعمل أيضًا. في حالتي ، فإن إضافة mclapply(1:2, sqrt) لن يفي بالغرض ، لكن تشغيل عدد عشوائي ظاهريًا من التجارب يفعل (الآن ابدأ الكود بـ for (i in 1:10) mclapply(1:10000000, sqrt) ).

تحرير: للأسف ، لا يبدو أن التنفيذ مستقر ، وعلى الرغم من بدء تشغيل mcmapply ، فإنه يتوقف بعد بعض الوقت.

لقد رأيت للتو هذه التعليقات الإضافية. يرجى إما محاولة dev 1.10.5 أو الانتظار حتى إصدار CRAN التالي (نأمل قريبًا). إذا استمرت المشكلة بعد ذلك ، فيرجى طرح مشكلة جديدة.

ما زلت أرى نفس المشكلة مع dev 1.10.5. تم إنشاء عدد جديد.

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات