Skip to content

Intermittent freezes with libarb in Julia 1.11 #75

@bcarneirodacunha

Description

@bcarneirodacunha

I have been experiencing freezes since upgrading to 1.11. The freezes seem related to libarb when dealing with large (N~100x100) complex dense matrices. The freeze happens differently based on the size of the matrix and the precision of ArbComplex. This makes me suspect something awry with memory allocation from Julia 1.11 breaks compatibility with libarb (1.10 LTS works fine).

I can try to reproduce the freeze with a small code that repeatedly computes some matrix operations -- like the determinant -- with a randomly generated large complex dense matrices. Here's something I could come up with (sorry for the horrible coding). In my setup (base M1 air, 8GB) it runs about ~4 times before freezing.

Runs flawlessly in 1.10.

  using LinearAlgebra
  using ArbNumerics

  setprecision(ArbComplex,digits=128)

  function compute_random_determinants(matrix_size::Int, iterations::Int)
        determinants = Vector{ArbComplex}(undef, iterations) 

  for i in 1:iterations
        # Generate a random complex matrix of the specified size
        r1 = rand(ArbComplex, matrix_size, matrix_size)
        r2 = rand(ArbComplex, matrix_size, matrix_size)
        id = Matrix{ArbComplex}(I, matrix_size, matrix_size)
        Fred = Matrix(id - r1*r2)
        determinants[i] = det(ArbNumerics.ArbComplexMatrix(Fred))
  end

  return determinants
  end

  matrix_size = 128  # Size of the square matrix
  iterations = 100  # Number of iterations

  determinants = compute_random_determinants(matrix_size, iterations)

  println(determinants)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions