Data.table: Das Laden von data.table fĂŒhrt dazu, dass mclapply() unter MacOS hĂ€ngen bleibt

Erstellt am 13. Okt. 2017  Â·  39Kommentare  Â·  Quelle: Rdatatable/data.table

Dieses Problem https://github.com/Bioconductor/BiocParallel/issues/67 scheint zu fĂŒhren

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

rumhÀngen mit

> 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

Hilfreichster Kommentar

@davidgohel : Bitte lesen Sie diese Anleitung, um die R LLVM-Toolchain lokal zu installieren. http://thecoatlessprofessor.com/programming/openmp-in-r-on-os-x/

Alternativ wĂŒrde ich empfehlen, die Datei unter R.home("etc/Makeconf") zu bearbeiten und einfach alle Instanzen von -fopenmp zu entfernen, die Sie dort sehen, damit die Kompilierung nicht versucht, OpenMP mit der Apple-System-Toolchain zu verwenden.

Alle 39 Kommentare

Danke fĂŒr den Bericht.

Punkt 4 von NEWS fĂŒr 1.10.4-1:

Versuchte Verbesserung auf dem Mac mit OpenMP von Intel, wenn sich das Paket „parallel“ verzweigt, nachdem data.table parallel zu OpenMP ausgefĂŒhrt wurde. Diese OpenMP-Implementierung scheint Threads laufen zu lassen, nachdem die parallele Region beendet ist. Wenn dieser Fix immer noch nicht funktioniert, rufen Sie setDTthreads(1) unmittelbar nach library(data.table) auf, von der gemeldet wurde, dass sie das Problem behebt.

In dev habe ich denselben Punkt verbessert, aber es versĂ€umt, diese Änderung der Neuigkeiten auf den CRAN-Patch zurĂŒckzuportieren. Aus der Entwickler-NEWS-Datei :

Versuchte Verbesserung auf dem Mac – nur wenn auch das parallele Paket verwendet wird (das sich verzweigt), #2137. Die OpenMP-Implementierung von Intel scheint Threads laufen zu lassen, nachdem die OpenMP-Parallelregion (innerhalb von data.table) im Gegensatz zu GNU libgomp beendet ist. Wenn also der Fork von parallel vom Benutzer aufgerufen wird, nachdem data.table bereits parallel ausgefĂŒhrt wurde, tritt InstabilitĂ€t auf. Das Problem tritt nur bei Mac-PaketbinĂ€rdateien von CRAN auf, da sie von CRAN mit Intels OpenMP-Bibliothek erstellt werden. Keine bekannten Probleme unter Windows oder Linux und keine bekannten Probleme auf irgendeiner Plattform, wenn Parallel nicht verwendet wird. Wenn diese Nur-Mac-Korrektur immer noch nicht funktioniert, rufen Sie setDTthreads(1) unmittelbar nach library(data.table) auf, von der berichtet wurde, dass sie das Problem behebt, indem sie data.table frĂŒher in den Single-Thread-Modus versetzt.

In Ihrem Fall haben Sie jedoch vor dem Forken nicht einmal data.table verwendet. Das ist also ein neuer Aspekt, ĂŒber den noch nie berichtet wurde. Ist Ihr reproduzierbares Beispiel genau richtig, da diese 3 Zeilen buchstĂ€blich alles sind, was in einer neuen R-Sitzung vorkommt? dh keine Verwendung von data.table zwischen dem Laden und Aufrufen mclapply ? Sie könnten trotzdem versuchen, setDTthreads(1) unmittelbar nach library(data.table) aufzurufen, aber ich bezweifle, dass es helfen wĂŒrde, wenn data.table vor mclapply wirklich nicht verwendet wird.

Haben Sie die CRAN-Mac-BinÀrdatei oder von der Quelle installiert? Unter MacOS scheint es in Bezug auf dieses mclapply -Problem entscheidend zu sein, welche OpenMP-Bibliothek Sie verwenden. Können Sie feststellen, ob die OpenMP-Implementierung von Intel (libomp) oder GNU (libgomp) auf dem Computer verwendet wird?

Können Sie mithilfe der MacOS-Anweisungen aus dem Quellcode kompilieren, und hilft das? Vielleicht verlinkt das lokal auf die richtige OpenMP-Bibliothek fĂŒr Sie oder so Ă€hnlich. Einige Leute haben die Anweisungen nicht genau genug befolgt, daher mĂŒssen sie unter MacOS genau befolgt werden.

Funktioniert test.data.table() fĂŒr Sie? Test 1705 testet mclapply und gibt CRAN weiter. Ich gehe davon aus, dass CRAN die Mac-BinĂ€rdateien unter MacOS testet, aber es ist möglich, dass es einen anderen Build testet.

Punkt 1 von NEWS von 1.10.4-2 Ich bezweifle, dass er verwandt ist, aber ich erwÀhne ihn der VollstÀndigkeit halber:

OpenMP auf MacOS wird jetzt von CRAN unterstĂŒtzt und ist in CRANs Paket-BinĂ€rdateien fĂŒr Mac enthalten. Die Installation von v1.10.4-1 aus dem Quellcode unter MacOS ist jedoch fehlgeschlagen, wenn OpenMP zur Kompilierzeit nicht aktiviert war, #2409. Danke an Liz Macfie und @fupangpangpang fĂŒr die Berichterstattung. Die Startmeldung, wenn OpenMP nicht aktiviert ist, wurde aktualisiert.

Hier sind verwandte Probleme:
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

Ich kĂ€mpfe grundsĂ€tzlich mit MacOS. Wenn jemand von Apple und/oder Intel zuhört, der ihre Produkte unterstĂŒtzen kann, wĂ€re das großartig. Ich habe MĂŒhe zu sehen, wie es wirklich ein data.table-Problem ist. Ich habe alles versucht, was ich mir vorstellen kann, um es zu umgehen und es in NEWS zu dokumentieren. Hilfe und VorschlĂ€ge sehr geschĂ€tzt.

Ja, das einfache Skript nur mit

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

Dies ist auf den Bioconductor-Baumaschinen. Ich glaube, dass dies eine einfache binÀre Installation ist, werde es aber bestÀtigen. Wir haben

$ 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

und

$ 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)

Also vermutlich Link zu libomp.

test.data.table() sagt

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

Danke dafĂŒr. Ja, diese __kmp_* -Aufrufe sind, glaube ich, spezifisch fĂŒr die Intel OpenMP Runtime und ich habe sie schon frĂŒher gemeldet gesehen. Test 1705 testet genau das. Es verwendet 2 OpenMP-Threads innerhalb von data.table selbst, gefolgt vom Aufruf von parallel::mclapply . Die __kmp_ -Fehler sind darauf zurĂŒckzufĂŒhren, dass Intels Implementierung die Threads laufen lĂ€sst, selbst nachdem alle parallelen Regionen beendet sind, sodass der nachfolgende Fork instabil ist. In diesem Fall sieht es so aus, als wĂ€re es nicht abgestĂŒrzt, aber das ist nur GlĂŒck. Die Tatsache, dass Sie diese Ausgabe mit 1.10.4-2 sehen, bedeutet, dass meine versuchte Problemumgehung nicht funktioniert hat. Es gibt einen Pre-Fork-Callback, in dem es jetzt omp_set_num_threads(1) aufruft, in der Hoffnung, dass die Intel-Bibliothek ihre laufenden Threads vor dem Fork aufrĂ€umen wĂŒrde. Aber es sieht so aus, als ob es nicht so wĂ€re. Uns bleibt also, was angeblich funktioniert, nĂ€mlich setDTthreads(1) unmittelbar nach library(data.table) aufzurufen, um Intels OpenMP daran zu hindern, die Threads ĂŒberhaupt zu erstellen.

Ist es jedoch möglich, dass die OpenMP-Bibliothek von Intel ihre Threads beim VerknĂŒpfen oder Initialisieren erstellt, wenn sie mit nur 3 Zeilen hĂ€ngt? Wenn ja, könnte das das erklĂ€ren. Ansonsten bin ich da ratlos.

Außerdem weiß ich nicht, wie sich die OpenMP-FĂ€higkeiten von clang und gcc auf die 3 OpenMP-Bibliotheken beziehen: libomp , libiomp und libgomp . Sie scheinen libomp zu haben. Aber ich denke, CRAN kompiliert mit libiomp ? Vielleicht hĂ€ngt es damit zusammen. Außerdem hat eine Person ( hier ) berichtet, dass "das Ändern von llvm zu gcc" die AbstĂŒrze unter MacOS gestoppt hat, aber sie kompilierten aus dem Quellcode.

Ich bin gerade auf den Quellcode fĂŒr die Intel OpenMP-Laufzeit gestoßen. Ich weiß nicht, was dieses Projekt ist, weil ich dachte, Intels Bibliothek sei Closed Source. Aber vielleicht ist es möglich, dagegen zu kompilieren und es zu debuggen. https://www.openmprtl.org/ Wahrscheinlich einfacher, zuerst lokal zu kompilieren und zu sehen, ob das funktioniert, oder die GNU-Bibliothek zu verwenden.

Test 1705 gibt CRAN weiter, also ist das vielleicht hoffnungsvoll, indem Sie herausfinden, was zwischen der/den CRAN-Maschine(n) und Ihrer Maschine anders ist. Test 1705 wird tatsĂ€chlich fĂŒr Sie und CRAN bestanden, aber libomp gibt dann Behauptungsfehler an die Konsole aus, die vom Test nicht erfasst werden. Ich frage mich, ob es möglich ist, die CRAN-Protokolle irgendwie zu sehen, um zu sehen, ob diese __kmp -Meldungen auch in den Protokollen von CRAN enthalten sind. Wenn die Meldungen nicht in den Protokollen von CRAN vorhanden sind, lohnt es sich möglicherweise, den Unterschied zwischen der CRAN-Maschine und Ihrer Maschine zu untersuchen.

Möglicherweise wird dies mit der CRAN-PaketbinÀrdatei benötigt: http://macappstore.org/libiomp/
Oder wird libiomp vielleicht statisch von CRAN in die PaketbinĂ€rdatei kompiliert? Mir ist aufgefallen, dass der Abschnitt „BinĂ€rpakete“ von ?install.packages fĂŒr MacOS ziemlich kompliziert ist und es dort mehrere binĂ€re Optionen fĂŒr das type= -Argument gibt.

Intels Bibliothek druckt:

OMP: Fehler Nr. 13: Behauptungsfehler bei kmp_runtime.cpp (6480)
OMP: Hinweis: Bitte senden Sie einen Fehlerbericht mit dieser Nachricht, den verwendeten Befehlen zum Kompilieren und AusfĂŒhren sowie Informationen zur Computerkonfiguration, einschließlich nativer Compiler- und Betriebssystemversionen. Durch Einbeziehung aller Programmquellen wird eine schnellere Reaktion erzielt. Informationen zum Einreichen dieses Problems finden Sie unter http://www.intel.com/software/products/support/.

Könnte jemand mit dem Problem unter MacOS bitte ein Problem bei Intel einreichen?

Hallo, ich habe das Problem ursprĂŒnglich mit dem BiocParallel-Repository gemeldet, da ich auf das Problem gestoßen bin, als ich Funktionen aus diesem Paket verwendet habe. Sie haben das Problem darauf eingegrenzt, dass mclapply aufgerufen wird, wĂ€hrend data.table geladen wird.

Ich habe die Anweisungen hier befolgt, um die neueste Version von data.table auf meinem MacOS zu installieren, bin aber immer noch auf das Problem gestoßen.

Interessanterweise hatte ein Kollege die neueste Version von data.table auf seinem Mac installiert und hatte keine Probleme. Allerdings hatte er OpenMP nicht auf seinem System installiert.

Ich konnte das Problem beheben, indem ich auf data.table 1.10.2 zurĂŒckrollte.

@asenabouth Können Sie bitte eine Support-Anfrage bei Intel stellen (siehe meinen Kommentar oben)? Es scheint ein Problem mit ihrer Bibliothek zu sein. Alternativ kann vielleicht jemand von Apple helfen. Kannst du ĂŒberhaupt ihre UnterstĂŒtzung bekommen? Ich bin nicht davon ĂŒberzeugt, dass die Installation aus dem Quellcode das Problem nicht löst. Können Sie bitte die Befehle und die Ausgabe zeigen? Ist jemand anderes nicht in der Lage, parallel::mclapply zu verwenden, nachdem data.table 1.10.4 geladen wurde, selbst nach dem Kompilieren aus der Quelle und dem Vermeiden der CRAN-BinĂ€rdatei?

Ich werde eine Support-Anfrage bei Intel einreichen.

Was die Installation von der Quelle betrifft, hier ist die Installation und der anschließende Test:
```{r}
[Zuvor gespeicherter Arbeitsbereich wiederhergestellt]

remove.packages("data.table")
Paket aus „/Users/a.senabouth/Library/R/3.4/library“ entfernen
(da 'lib' nicht spezifiziert ist)
install.packages("data.table", type = "source",

Inhaltstyp „application/gzip“ LĂ€nge 3312731 Byte (3,2 MB)

heruntergeladen 3,2 MB

  • Installieren des Quellpakets ‚data.table‘ ...
    * Bibliotheken/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, -Rahmen -Wl,CoreFoundationmv data.table.so datatable.soif [ "" != "Windows_NT" ] && [ uname -s = 'Darwin' ]; fiInstallation nach /Users/a.senabouth/Library/R/3.4/library/data.table/libs* R
    *inst* Byte-kompilieren und Paket fĂŒr verzögertes Laden vorbereiten
    * Hilfe* * Installation von Hilfeindizes
    * Erstellen von Paketindizes* Installation von Vignetten
    ** Testen, ob installiertes Paket geladen werden kann
  • FERTIG (data.table)

Die heruntergeladenen Quellpakete sind in
'/private/var/folders/zz/zyxvpxvq6csfxvn_n0001lp0000cxh/T/Rtmpl7TqS4/downloaded_packages'

R
Fehler: Objekt 'R' nicht gefunden
Bibliothek (parallel)
Bibliothek (data.table)
data.table 1.10.5 IN ENTWICKLUNG gebaut am 16.10.2017 07:29:07 UTC; Travis
Der schnellste Weg zum Lernen (von data.table-Autoren): https://www.datacamp.com/courses/data-analysis-the-data-table-way
Dokumentation: ?data.table, example(data.table) und browseVignettes("data.table")
Versionshinweise, Videos und Folien: http://r-datatable.com
Mclapply (1:2, Quadrat)

* Illegalen Betrieb erwischt *
Adresse 0x7fffa9730ae4, Ursache 'illegaler Opcode'

ZurĂŒck verfolgen:
1: mcfork()
2: SPASS(X[[i]], ...)
3: lapply(seq_len(Kerne), inner.do)
4: Mclapply (1:2, Quadrat)

Mögliche Aktionen:
1: abbrechen (mit Core-Dump, falls aktiviert)
2: normaler R-Ausgang
3: Beenden Sie R, ohne den Arbeitsbereich zu speichern
4: Beenden Sie R und speichern Sie den Arbeitsbereich

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

BEARBEITEN :
Ich habe es zum Laufen gebracht, indem ich 1.10.4 aus dem Quellcode installiert habe.
```{r}

erfordern (devtools)
Erforderliches Paket wird geladen: devtools
install_version("data.table", version = "1.10.4", repos = "http://cran.us.r-project.org")
Herunterladen des Pakets von der URL: http://cran.us.r-project.org/src/contrib/Archive/data.table/data.table_1.10.4.tar.gz
data.table installieren
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ
--no-save --no-restore --quiet CMD-INSTALLATION
'/private/var/folders/zz/zyxvpxvq6csfxvn_n0001lp0000cxh/T/RtmpXDSgR8/devtoolsdf05280c79d9/data.table'
--library='/Users/a.senabouth/Library/R/3.4/library' --install-tests

  • Installieren des Quellpakets ‚data.table‘ ...
    * Paket 'data.table' erfolgreich entpackt und MD5-Summen ĂŒberprĂŒft* Bibliotheken
    /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 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 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 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
    if [ "" != "Windows_NT" ] && [ uname -s = 'Darwin' ]; dann install_name_tool -id datatable.so datatable.so; fi
    Installation nach /Users/a.senabouth/Library/R/3.4/library/data.table/libs
    * R* inst
    * Tests* Byte-kompilieren und Paket fĂŒr verzögertes Laden vorbereiten
    * Hilfe* * Installation von Hilfeindizes
    * Erstellen von Paketindizes* Installation von Vignetten
    ** Testen, ob installiertes Paket geladen werden kann
  • FERTIG (data.table)
    > Bibliothek (Datentabelle)
    Datentabelle 1.10.4
    Der schnellste Weg zum Lernen (von data.table-Autoren): https://www.datacamp.com/courses/data-analysis-the-data-table-way
    Dokumentation: ?data.table, example(data.table) und browseVignettes("data.table")
    Versionshinweise, Videos und Folien: http://r-datatable.com
    > Bibliothek (parallel)
    > mclapply(1:2, Quadrat)
    [[1]]
    [1] 1

[[2]]
[1] 1.414214
```

Ich habe das folgende https://software.intel.com/en-us/forums/intel-c-compiler/topic/746943 gepostet

Es ist wahrscheinlich am falschen Ort und ich werde wahrscheinlich geflammt, aber hoffentlich bringt es den Ball ins Rollen.

@mattdowle lassen Sie mich wissen, wenn Sie möchten, dass ich etwas hinzufĂŒge/erledige

Wollte bestÀtigen, dass ich denselben Fehler wie @asenabouth reproduziert habe und dass die Neuinstallation von 1.10.4 von der Quelle das Problem behoben hat.

Sitzungsinfo:

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 

Ich protokolliere nur einige Details auf meinem Computer

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

produziert

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

mit 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

Interessant,

> 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")

produziert

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

Ich werde mal schauen ob das zusammenhÀngt

Ich habe auch die Anweisungen unter https://github.com/Rdatatable/data.table/wiki/Installation befolgt und das Problem tritt immer noch auf ....

BEARBEITEN:
Das ursprĂŒngliche Problem mit mclapply und dem illegal operation (nicht der Compiler-Fehler unsupported option '-fopenmp' - der durch Befolgen der Anleitung behoben wurde)

Danke an alle. Es ist interessant, dass 1.10.4 gut zu funktionieren scheint, 1.10.4-2 jedoch nicht. Es scheint abzustĂŒrzen, sobald der Fork aufgerufen wird. Der Versuch, den ich in NEWS erwĂ€hnt habe, war in diesem Bereich.

Erstens, was sich nicht geÀndert hat. Beim Laden von data.table ruft init.c dies in openmp-utils.c auf :

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

Wenn parallel::mclapply also fork() #$ aufruft, wird die Funktion when_fork ausgefĂŒhrt. Was in 1.10.4-2 so aussieht:

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;
}

vorher (in 1.10.4) wurde omp_set_num_threads(1) nicht aufgerufen, sondern nur die statische Variable DTthreads gesetzt:

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

Ich kann nur denken, dass der Aufruf von omp_set_num_threads(1) es zum Absturz bringt. Aber das ist die einfachste Funktion, die Sie in OpenMP aufrufen können. Vielleicht wurde es irgendwie nicht richtig an die Bibliothek gebunden?

  1. FĂŒr die Leute, die den Absturz beim Aufrufen parallel::mclapply reproduzieren können, funktioniert einfaches fwrite() in einer neuen Sitzung ohne Laden des Pakets parallel ? Verwendet es viele CPUs, wie es sollte? Sie benötigen zum Testen einen großen DT , ansonsten wird nur 1 Thread fĂŒr kleine Daten verwendet. Wenn es bei Verwendung von OpenMP abstĂŒrzt, haben wir ein VerknĂŒpfungsproblem. Weiß jemand, was diese Flags in der Linkzeile bedeuten und könnten sie etwas damit unter MacOS zu tun haben? : -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress

  2. Ich könnte versuchen, diesen Aufruf von omp_set_num_threads(1) in dev erneut zu entfernen, und jemand mit dem Problem jetzt mit 1.10.5 könnte dev erneut versuchen, nachdem ich es geÀndert habe?

  3. Das Seltsame ist, dass CRAN-Tests unter MacOS ohne Absturz bestanden werden. Test 1705 testet den Aufruf parallel::mclapply und alle Tests laufen auf CRAN mit 2 Threads. Was ist der Unterschied zwischen der CRAN-Maschine und den Maschinen, mit denen die Leute das Problem haben?

@joethorley Das ist seltsam. Sie erhalten unsupported option '-fopenmp' auch nach AusfĂŒhren der MacOS-Anweisungen hier . Kann jemand anderes vorschlagen, wie man dann vorankommt? Ich bin ratlos.

@joethorley Hast du gettext installiert? Es stellte sich heraus, dass ich es nicht tat. Sobald dies erledigt war, konnte ich das Paket auf meinem System korrekt kompilieren.

@mattdowle nein der unsupported option '-fopenmp' Fehler ist verschwunden nachdem ich die Anleitung hier befolgt habe aber der Fehler

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

aufgetreten.

Mein Makevar ist

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

Meine 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] 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 

und meine R-Sitzung

> 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'

@mattdowle

  1. fwrite() scheint auf meinem Rechner zu funktionieren
> 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 Ich habe gettext installiert und konnte das Paket korrekt kompilieren, sobald ich den Anweisungen gefolgt bin. Mein Beitrag war etwas unklar, daher habe ich ihn geÀndert.

@mattdowle

  1. Wenn Sie diesen Aufruf von omp_set_num_threads(1) in dev entfernen, versuche ich es erneut mit dev.

Die Installation von 1.10.4.2 von CRAN, entweder Quell- oder BinĂ€rdatei, fĂŒhrt zum AufhĂ€ngen von Mclapply. Installieren von github.com/Rdatatable/data. table@master aus der Quelle erzeugte immer noch den ursprĂŒnglichen Mclapply-Hang.

Installieren dieser modifizierten Version des aktuellen Masters

$ 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

$ git diff
diff --git a/src/openmp-utils.cb/src/openmp-utils.c
Index d6e3b70..8c0236d 100644
--- a/src/openmp-utils.c
+++ b/src/openmp-utils.c
@@ -62,7 +62,7 @@ void when_fork() {
// versuchte Problemumgehung fĂŒr Intels OpenMP-Implementierung, die Threads hinterher laufen lĂ€sst
// parallele Region; diese stĂŒrzen ab, wenn sie gegabelt werden.
#ifdef _OPENMP

  • omp_set_num_threads(1);
    +// omp_set_num_threads(1);
    #endif

// GNU OpenMP scheint in Ordnung zu sein, wenn DTthreads einfach auf 1 gesetzt wird, wodurch die nÀchste parallele Region begrenzt wird

clears the hang for me.

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

R.Version
_
Plattform x86_64-apple-darwin15.6.0
arch x86_64
os darwin15.6.0
system x86_64, darwin15.6.0
Status
Hauptfach 3
Moll 4.2
Jahr 2017
Monat 09
Tag 28
svn rev 73368
Sprache r
version.string R-Version 3.4.2 (2017-09-28)
Spitzname Kurzer Sommer
```

Das Setzen der Umgebungsvariable OMP_NUM_THREADS=2 hat das Ergebnis nicht geÀndert.

Ich kann bestÀtigen, dass das Auskommentieren von omp_set_num_threads(1); in when_fork() das Problem auch auf meinem Computer behebt

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

[[2]]
[1] 1.414214

Danke an alle. Fix in dev gemacht und wird bestanden. @joethorley WĂŒrden Sie oder jemand anderes bestĂ€tigen, dass die neueste Version 1.10.5 jetzt in Ordnung ist? Ich werde anfangen, 1.10.4-3 vorzubereiten, um zu CRAN zu gehen.

@mattdowle

Ich kann bestÀtigen, dass es behoben ist.

$ 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

Vielen Dank @joethorley! Bis 1.10.4-3 bei CRAN eingereicht und alles in Ordnung, wird es ein paar Tage dauern, bis die Magie von CRAN ihren Lauf nimmt.

Änderungen in v1.10.4-3 (am CRAN 20. Okt. 2017)

  1. Absturz/HĂ€ngen unter MacOS behoben, wenn parallel::mclapply verwendet und data.table lediglich geladen wurde, #2418 . Seltsamerweise bestanden alle Tests einschließlich Test 1705 (der mclapply mit data.table testet) auf CRAN einwandfrei. Es scheint vielleicht einige Versionen von MacOS oder einige Versionen von Bibliotheken auf MacOS zu sein. Vielen Dank an Martin Morgan fĂŒr die Meldung und BestĂ€tigung, dass dieser Fix funktioniert. Vielen Dank auch an asenabouth, Joe Thorley und Danton Noriega fĂŒr das Testen, Debuggen und BestĂ€tigen, dass die automatische ParallelitĂ€t innerhalb von data.table (wie fwrite ) sogar auf diesen MacOS-Installationen gut funktioniert. Siehe auch Neuigkeiten unten fĂŒr 1.10.4-1 und 1.10.4-2.

Schließt vorerst. Bitte öffnen Sie erneut oder öffnen Sie ein neues Problem, wenn es ein Problem mit 1.10.4-3 gibt.

@mattdowle : Es sieht so aus, als ob v1.10.4-2 immer noch die Version ist, die von CRAN vertrieben wird. Wartet v1.10.4-3 immer noch in der CRAN-Übermittlungswarteschlange oder ist etwas anderes schief gelaufen?

(Danke, dass Sie so schnell eine Problemumgehung fĂŒr dieses Problem gefunden haben; es scheint leider eine große Anzahl von Benutzern unter macOS zu betreffen.)

@kevinushey Ja, 1.10.4-3 wartete in der Warteschlange (im Status „Erneut prĂŒfen“, von dem ich nicht weiß, was das bedeutet, fĂŒr 6 Tage). Ich habe eine E-Mail an CRAN gesendet und sie ist jetzt an CRAN freigegeben.

Vielleicht mache ich etwas falsch, aber ich habe das Problem immer noch auf meinem 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

Bei der Installation der Cran-Version aus dem Quellcode erhalte ich:

> 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

NĂ€here Angaben kann ich bei Bedarf machen.

@davidgohel : Bitte lesen Sie diese Anleitung, um die R LLVM-Toolchain lokal zu installieren. http://thecoatlessprofessor.com/programming/openmp-in-r-on-os-x/

Alternativ wĂŒrde ich empfehlen, die Datei unter R.home("etc/Makeconf") zu bearbeiten und einfach alle Instanzen von -fopenmp zu entfernen, die Sie dort sehen, damit die Kompilierung nicht versucht, OpenMP mit der Apple-System-Toolchain zu verwenden.

@kevinushey OK, ich werde es mit der alternativen Lösung versuchen. Ich glaube, ich habe etwas mit der ersten Lösung durcheinander gebracht.

Das HinzufĂŒgen zu meiner ~/.R/Makevars -Datei funktionierte zum Kompilieren von data.table ohne OpenMP auf 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 danke, es hat funktioniert

Ich habe versucht, die Datei unter R.home("etc/Makeconf") zu bearbeiten, aber ich darf sie nicht bearbeiten. Ich scheine auch keine Datei namens ~/.R/Makevars zu haben. Irgendwelche weiteren VorschlÀge :) Danke

@ValeriVoev Die Datei unter ~/.R/Makevars existiert normalerweise nicht; Sie mĂŒssen es selbst erstellen. (Das heißt, erstellen Sie einen Ordner namens .R in Ihrem Home-Verzeichnis und erstellen Sie dann eine Makevars -Datei in diesem Ordner.)

Danke @kevinushey - ich habe es endlich zum Laufen gebracht, data.table 1.10.4-3 installiert und R Studio stĂŒrzt nicht mehr ab. Ich habe auch clang installiert - nicht sicher, ob das auch geholfen hat oder nicht.

Ich sehe diesen Fehler immer noch zufÀllig

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/.

Und der Fall ist wirklich knifflig.

  1. data.table 1.10.4 und 1.10.4-3 sind fĂŒr mich gleich.
  2. Ich habe eine Vignette mit parallelem Code, der problemlos ausgefĂŒhrt werden kann, wenn ich alle Chunks ausfĂŒhre. Wenn Sie diese Vignette jedoch stricken, tritt der obige Fehler auf.
  3. Wenn ich am Anfang der Vignette einen einfachen parallelen Code mclapply(1:2, sqrt) setze, tritt beim Stricken der Vignette der Fehler nicht mehr auf!

Dies alles schien mit UmweltverÀnderungen zusammenzuhÀngen. Leider habe ich jetzt kein einfaches reproduzierbares Beispiel. Mein Code ist ziemlich komplex und beinhaltet viele andere Dinge.

Lassen Sie wie bei Dracodoc den (6480) zufÀllig fangen. macOS 10.13.3, R 3.4.3, Datentabelle 1.10.4-3. Nur einfaches R hier und zu komplexer Code zum Reproduzieren.

Einfache Mclapplys am Anfang des Codes funktionieren und manchmal auch der Rest des Codes. In meinem Fall wĂŒrde das HinzufĂŒgen mclapply(1:2, sqrt) nicht ausreichen, aber das AusfĂŒhren einer scheinbar zufĂ€lligen Anzahl von Versuchen tut es (beginnen Sie jetzt den Code mit for (i in 1:10) mclapply(1:10000000, sqrt) ).

EDIT: Leider scheint die AusfĂŒhrung nicht stabil zu sein, und obwohl mcmapply startet, hĂ€ngt es nach einiger Zeit.

Ich habe gerade diese weiteren Kommentare gesehen. Bitte versuchen Sie entweder dev 1.10.5 oder warten Sie auf die nÀchste CRAN-Veröffentlichung (hoffentlich bald). Wenn das Problem danach immer noch besteht, eröffne bitte ein neues Problem.

Ich sehe immer noch das gleiche Problem mit dev 1.10.5. Neues Problem erstellt.

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen