Skip to content

Commit

Permalink
Merge pull request #135 from LeelaChessZero/master
Browse files Browse the repository at this point in the history
Merge from master for release 31.
  • Loading branch information
borg323 committed Mar 4, 2021
2 parents ee76303 + d36eae0 commit b009546
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 7 additions & 4 deletions lc0_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func getExtraParams() map[string]string {
return map[string]string{
"user": *user,
"password": *password,
"version": "30",
"version": "31",
"token": strconv.Itoa(randId),
"train_only": strconv.FormatBool(*trainOnly),
"hostname": *localHost,
Expand Down Expand Up @@ -189,7 +189,8 @@ func uploadGame(httpClient *http.Client, path string, pgn string,
} else if strings.Contains(version, "rc") {
log.Printf("It is a release candidate")
}
log.Fatal("You probably need the latest release")
log.Printf("You probably need the latest release")
os.Exit(5)
}
break
}
Expand Down Expand Up @@ -425,6 +426,8 @@ func (c *cmdWrapper) launch(networkPath string, otherNetPath string, args []stri
case strings.HasPrefix(line, "Unknown command line flag"):
fmt.Println(line)
log.Fatal("You probably have an old lc0 version")
case strings.Contains(line, "GPU: GeForce GTX 16"):
fallthrough // Does not contain "fp16" so the following works fine.
case strings.Contains(line, "Switching to"):
fmt.Println(line)
if parallelism == 32 && parallelism32 && !strings.Contains(line, "fp16") {
Expand Down Expand Up @@ -894,7 +897,7 @@ func checkValidBook(path string, sha string) (string, error) {
if err == nil {
file, _ := os.Open(path)
sum := sha256.New()
_, err := io.Copy(sum, file);
_, err := io.Copy(sum, file)
got := fmt.Sprintf("%x", sum.Sum(nil))
if sha != got {
text := fmt.Sprintf("book sha mismatch want:\n%s\ngot\n%s\n", sha, got)
Expand Down Expand Up @@ -1133,7 +1136,7 @@ func main() {
}
dir, _ := os.Getwd()
fi, err := os.Stat(path.Join(dir, lc0Exe))
if err == nil && !fi.Mode().Perm().IsDir() {
if err == nil && !fi.Mode().IsDir() {
lc0Exe = path.Join(dir, lc0Exe)
}
checkLc0()
Expand Down
3 changes: 2 additions & 1 deletion src/client/client_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ func postParams(httpClient *http.Client, uri string, data map[string]string, tar
err = json.Unmarshal(b, target)
if err != nil {
if strings.Contains(string(b), " upgrade ") {
log.Fatal("The client version you are using is not accepted by the server")
log.Printf("The client version you are using is not accepted by the server")
os.Exit(5)
}
log.Printf("Bad JSON from %s -- %s\n", uri, string(b))
}
Expand Down

0 comments on commit b009546

Please sign in to comment.