Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Mac BLAS
#Option 1 - install openblas with homebrew and link to CRAN installed R
brew tap homebrew/science
brew install openblas
ln -sf /usr/local/Cellar/openblas/0.2.12/lib/libopenblas.dylib /Library/Frameworks/R.framework/Resources/lib/libRblas.dylib
#Option 2 - install r with openblas through homebrew
brew tap homebrew/science
brew install r --with-openblas
#Option 1 - link CRAN installed R to veclib
ln -sf /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib /Library/Frameworks/R.framework/Resources/lib/libRblas.dylib
#Option 2 - install r with veclib through homebrew
brew tap homebrew/science
brew install r
Owner

zachmayer commented Jun 4, 2015

also:

ln -sf /usr/local/lib/libopenblas.dylib /Library/Frameworks/R.framework/Resources/lib/libRblas.dylib

Ewen2015 commented May 3, 2016

Got a problem when open the R.

Process: R [23438]
Path: /Applications/R.app/Contents/MacOS/R
Identifier: org.R-project.R
Version: ???
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: R [23438]
User ID: 501

Date/Time: 2016-05-03 02:38:25.066 -0600
OS Version: Mac OS X 10.11.4 (15E65)
Report Version: 11
Anonymous UUID: 1E914904-2D7C-1260-B018-6AFD159316C2

Sleep/Wake UUID: 500F1018-965C-44C5-8AD3-1B1AB2CD00A3

Time Awake Since Boot: 17000 seconds
Time Since Wake: 2400 seconds

System Integrity Protection: enabled

Crashed Thread: 0

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
Library not loaded: /Library/Frameworks/R.framework/Versions/3.2/Resources/lib/libRblas.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.2/Resources/lib/libR.dylib
Reason: image not found

Binary Images:
0x7fff62cd2000 - 0x7fff62d090d7 dyld (360.21) /usr/lib/dyld
0x7fff8b88a000 - 0x7fff8b88afff com.apple.quartzframework (1.5 - 21) <5DC3D0D9-9E3F-3AA5-92F1-F229907A49B9> /System/Library/Frameworks/Quartz.framework/Versions/A/Quartz
0x7fff8e631000 - 0x7fff8f87cfeb com.apple.CoreGraphics (1.600.0 - 957) <8C9F8E1A-274C-36CE-93FB-49906A9B9EE2> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x7fff8feca000 - 0x7fff9022cf3f libobjc.A.dylib (680) <7489D2D6-1EFD-3414-B18D-2AECCCC90286> /usr/lib/libobjc.A.dylib
0x7fff90bde000 - 0x7fff91807fff com.apple.AppKit (6.9 - 1404.46) <2492D315-76B6-320B-B542-231FCA44CA48> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x7fff94dd1000 - 0x7fff95247fff com.apple.CoreFoundation (6.9 - 1258.1) <943A1383-DA6A-3DC0-ABCD-D9AEB3D0D34D> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff96665000 - 0x7fff96666ffb libSystem.B.dylib (1226.10.1) /usr/lib/libSystem.B.dylib
0x7fff97a30000 - 0x7fff97a30fff com.apple.Cocoa (6.11 - 22) <807787AB-D231-3F51-A99B-A9314623C571> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
0x7fff9a0e9000 - 0x7fff9a383fff com.apple.security (7.0 - 57337.40.85) <7C5B8DEF-3D02-3410-9BD3-2B1251F84D4B> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x7fff9a8ab000 - 0x7fff9abebfff com.apple.WebKit (11601 - 11601.5.17.1) <6FA46AD7-3DF1-3654-A642-D9C5BE613ED7> /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit
0x7fff9ad83000 - 0x7fff9b0d7fff com.apple.Foundation (6.9 - 1258) <51833143-6CAE-3E1C-9FBA-BCDEB48D4ADF> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x7fff9c5ed000 - 0x7fff9c7fafff libicucore.A.dylib (551.51) <35315A29-E21C-3CC5-8BD6-E07A3AE8FC0D> /usr/lib/libicucore.A.dylib
0x7fffa0585000 - 0x7fffa0587ff7 com.apple.ExceptionHandling (1.5 - 11) <086E1FB3-8B75-3241-9585-06C43B51F2C8> /System/Library/Frameworks/ExceptionHandling.framework/Versions/A/ExceptionHandling

Model: MacBookPro12,1, BootROM MBP121.0167.B16, 2 processors, Intel Core i5, 2.7 GHz, 8 GB, SMC 2.28f7
Graphics: Intel Iris Graphics 6100, Intel Iris Graphics 6100, Built-In
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1867 MHz, 0x80AD, 0x483943434E4E4E424C54414C41522D4E5544
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1867 MHz, 0x80AD, 0x483943434E4E4E424C54414C41522D4E5544
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x133), Broadcom BCM43xx 1.0 (7.21.95.175.1a6)
Bluetooth: Version 4.4.4f4 17685, 3 services, 18 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM0128G, 121.33 GB
USB Device: USB 3.0 Bus
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1

leoluyi commented Oct 21, 2017

@Ewen2015

try this:

$ ln -sf /usr/local/opt/openblas/lib/libopenblas.dylib  /Library/Frameworks/

also see:

$ brew info openblas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment