From 26cdb35b1850a4ed14a960c81874d1ebff74c4e0 Mon Sep 17 00:00:00 2001
From: Maximilian Reininghaus <maximilian.reininghaus@kit.edu>
Date: Tue, 30 Apr 2019 12:48:38 -0300
Subject: [PATCH] avoid infinite loop when UrQMD can't generate a collision

---
 Processes/UrQMD/urqmd.f | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Processes/UrQMD/urqmd.f b/Processes/UrQMD/urqmd.f
index e71329318..9319dae63 100644
--- a/Processes/UrQMD/urqmd.f
+++ b/Processes/UrQMD/urqmd.f
@@ -337,6 +337,10 @@ cdh        write(*,*)'(W) No collision in event ',event
              print *,'no collision problem in UrQMD'
 c~              stop
            endif
+           if (noc.ge.50000) then
+             call exit(2) ! think of a better way to hand over the error
+                          ! to C++
+           endif
            goto 1
          endif
          
-- 
GitLab