question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

spgeom.repeat on particular tshs gives wrong results / crashes, at least when used twice

See original GitHub issue

I ran into a bug with an electrode that I wanted to .repeat instead of .tile. It resulted in a crash.

When doing Helec.repeat(3, 1).repeat(3, 0), the first repeat will always work well (as in, not crash), but the second one will usually, but not always, crash:

In [1]: import sisl as si

In [2]: H=si.get_sile("elec.TSHS").read_hamiltonian()

In [3]: H.repeat(3, 0).repeat(3, 1)
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-3-645fb0da8346> in <module>()
----> 1 H.repeat(3, 0).repeat(3, 1)

/home/jolub/git/sisl/sisl/sparse_geometry.py in repeat(self, reps, axis)
   1922 
   1923         # Now we should fill the data
-> 1924         isc = geom.o2isc(col)
   1925         # resulting orbital in the new geometry (without wrapping
   1926         # for correct supercell, that will happen below)

/home/jolub/git/sisl/sisl/geometry.py in o2isc(self, io)
   3089         """
   3090         idx = _a.asarrayi(io) // self.no
-> 3091         return self.sc.sc_off[idx, :]
   3092 
   3093     def o2sc(self, o):

IndexError: index -7976227 is out of bounds for axis 0 with size 225

The index which is said to be out of bounds (and clearly is) is always a new number. I guess it doesn’t crash if this number happens to be in bounds. The tshs can be gotten here (time- and download limited link).

Tested on current master.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
zerothicommented, Feb 4, 2020

I think I have narrowed down the problem, now I just need to solve it 😉

0reactions
zerothicommented, Feb 5, 2020

@jonaslb Great!

Read more comments on GitHub >

github_iconTop Results From Across the Web

His PC keeps crashing... let's figure out what went wrong...
His computer continues to crash, so let's troubleshoot what went wrong. New Players Sign Up for World of Warships using my link ...
Read more >
Game crashes or closes unexpectedly
Explains what to do if a Microsoft game crashes or closes unexpectedly when you try to ... Method 2: Restart the computer by...
Read more >
Plugin crashes website and uses massive CPU power for ...
We repeated this twice and your plugin twice followed the same pattern of spiraling php processor usage which takes the server down completely....
Read more >
Detect and diagnose crashes
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >
5 Troubleshoot System Crashes
Information and guidance about some specific procedures for troubleshooting system crashes. A crash, or fatal error, causes a process to terminate ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found