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

Segmentation fault when calling twice the function get_symmetry #192

Closed
mesonepigreco opened this issue Nov 12, 2024 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@mesonepigreco
Copy link

Seg fault
When executing twice in a row the function get_symmetry, I get a segmentation fault

To Reproduce
Steps to reproduce the behavior:

  1. Start Julia REPL
  2. Run
julia> using Spglib
julia> cell = [10.922687366041222 0.0 0.0; 5.46134368302061 9.459324736587035 0.0; 5.461343683020612 3.1531082455290136 8.919210198794858]
3×3 Matrix{Float64}:
 10.9227   0.0      0.0
  5.46134  9.45932  0.0
  5.46134  3.15311  8.91921

julia> pos =  [0.0 0.0 0.0; -8.326672684688674e-17 0.0 0.49999999999999994; 6.938893903907228e-17 0.4999999999999998 5.551115123125783e-17; 5.551115123125783e-17 0.4999999999999998 0.5; 0.49999999999999994 -1.3877787807814457e-17 -5.551115123125783e-17; 0.5000000000000002 0.0 0.4999999999999998; 0.49999999999999994 0.4999999999999996 0.0; 0.5 0.4999999999999997 0.4999999999999998]
8×3 Matrix{Float64}:
  0.0           0.0           0.0
 -8.32667e-17   0.0           0.5
  6.93889e-17   0.5           5.55112e-17
  5.55112e-17   0.5           0.5
  0.5          -1.38778e-17  -5.55112e-17
  0.5           0.0           0.5
  0.5           0.5           0.0
  0.5           0.5           0.5

julia> types = [1, 1, 1, 1, 1, 1, 1, 1]
8-element Vector{Int64}:
 1
 1
 1
 1
 1
 1
 1
 1

julia> cellspglib = Cell(cell', pos', types)
SpglibCell{Float64, Float64, Int64, Any}
 lattice:
   10.922687366041222  5.46134368302061  5.461343683020612
   0.0  9.459324736587035  3.1531082455290136
   0.0  0.0  8.919210198794858
 8 atomic positions:
   0.0  0.0  0.0
   -8.326672684688674e-17  0.0  0.49999999999999994
   6.938893903907228e-17  0.4999999999999998  5.551115123125783e-17
   5.551115123125783e-17  0.4999999999999998  0.5
   0.49999999999999994  -1.3877787807814457e-17  -5.551115123125783e-17
   0.5000000000000002  0.0  0.4999999999999998
   0.49999999999999994  0.4999999999999996  0.0
   0.5  0.4999999999999997  0.4999999999999998
 8 atoms:
   1  1  1  1  1  1  1  1


julia> R,T = Spglib.get_symmetry(cellspglib)
# ... 
julia> R,T = Spglib.get_symmetry(cellspglib)
Unreachable reached at 0x785068d560c3

[30456] signal (4.2): Illegal instruction
in expression starting at REPL[8]:1
== at /home/darth-vader/.julia/packages/SumTypes/aO6qd/src/sum_type.jl:294
unknown function (ip: 0x784ff778250f)
Allocations: 8597543 (Pool: 8588317; Big: 9226); GC: 14
Illegal instruction (core dumped)

Versions (please complete the following information):

  • OS: Ubuntu 22.04.04
  • Julia version: 1.10.4
  • Package version: 0.9.3
@mesonepigreco mesonepigreco added the bug Something isn't working label Nov 12, 2024
@singularitti
Copy link
Owner

Sorry, I could not reproduce on my macOS. Can you try with Julia v1.11.1?

@singularitti
Copy link
Owner

Also, could you please try version v0.9.4? This issue might be fixed after #183.

@singularitti
Copy link
Owner

Closed due to no response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants