Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use the Intel inflater or deflater on OS X 10.14 #534

Merged
merged 1 commit into from
Oct 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/main/scala/com/fulcrumgenomics/cmdline/FgBioMain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ private[cmdline] object SystemUtils {
private val OsName: Option[String] = getSystemProperty("os.name")
/** The current OS architecture */
private val OsArch: Option[String] = getSystemProperty("os.arch")
/** The current OS version */
private val OsVersion: Option[String] = getSystemProperty("os.version")

/** Gets a system property. Returns None if not found or not allowed to look at. */
private def getSystemProperty(property: String): Option[String] = {
Expand All @@ -66,11 +68,14 @@ private[cmdline] object SystemUtils {
private val IsOsMac: Boolean = MacNamePrefixes.exists(prefix => OsName.exists(_.startsWith(prefix)))
/** Returns true if the architecture is the given name, false otherwise. */
private def IsOsArch(name: String): Boolean = OsArch.contains(name)
/** Returns true if the operating system version starts with the given version string, false otherwise. */
private def IsOsVersion(prefix: String): Boolean = OsVersion.exists(_.startsWith(prefix))

/** True if the current system supports the Intel Inflater and Deflater, false otherwise. */
val IntelCompressionLibrarySupported: Boolean = {
if (!SystemUtils.IsOsLinux && !SystemUtils.IsOsMac) false
else if (SystemUtils.IsOsArch("ppc64le")) false
else if (SystemUtils.IsOsMac && SystemUtils.IsOsVersion("10.14.")) false // FIXME: https://github.com/Intel-HLS/GKL/issues/101
else true
}
}
Expand Down