spgeom.repeat on particular tshs gives wrong results / crashes, at least when used twice
See original GitHub issueI 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:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think I have narrowed down the problem, now I just need to solve it 😉
@jonaslb Great!