reid from https://github.com/michuanhaohao/reid-strong-baseline
zhangmeng
2020-01-14 5459ba1d3f7f944aa97923ed9c09a5dbc7663928
run.go
@@ -6,10 +6,12 @@
   "fmt"
   "io/ioutil"
   "os"
   "strings"
   "time"
   "unsafe"
   "basic.com/libgowrapper/sdkhelper.git"
   "reid/common"
   "basic.com/valib/gogpu.git"
   "basic.com/pubsub/protomsg.git"
@@ -34,7 +36,7 @@
// Create Reid
func Create(config string, typ, id string, gpu int, shm bool, ipc2Rule string, ruleMaxSize int, fn func(...interface{}), reserved map[string]interface{}) interface{} {
   cfg, err := sdkhelper.ReadConfig(config)
   cfg, err := common.ReadConfig(config)
   if err != nil {
      fn("Reid SDK Create Error When Read Config: ", err)
      return nil
@@ -54,7 +56,7 @@
      }
   }
   gpuM := sdkhelper.Atoi(cfg.Param[sGPU])
   gpuM := common.Atoi(cfg.Param[sGPU])
   rGPU := gpu
@@ -99,6 +101,13 @@
   for {
      if err = sock.Listen(s.ipc); err != nil {
         suf := "ipc://"
         p := strings.Index(s.ipc, suf)
         if p >= 0 {
            file := s.ipc[p+len(string(suf)):]
            os.Remove(file)
            s.fnLogger("remove:", file)
         }
         s.fnLogger("can't listen on rep socket: ", err)
         time.Sleep(5 * time.Millisecond)
      } else {