Banksia - Yet another Chess Tournament Manager

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
phhnguyen
Posts: 449
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Banksia version 1.5

Post by phhnguyen » Wed Jul 10, 2019 1:33 am

I have just released version 1.5 to support WinBoard protocol and Polyglot opening books. So far all main/big chess functions are completed.

For coming versions I have been working on a special function to auto generate Json files which are mainly used to configure engines and control tournaments.

Hope to get some feedbacks / bug reports from you soon :D
https://banksiagui.com
A freeware chess GUI, based on opensource Banksia - the chess tournament manager

petero2
Posts: 587
Joined: Mon Apr 19, 2010 5:07 pm
Location: Sweden
Contact:

Re: Banksia - Yet another Chess Tournament Manager

Post by petero2 » Wed Jul 10, 2019 12:47 pm

Hi,

Interesting project.

I tested it in Linux and it worked fine except for one compile problem. I also added CMake build files to make compilation in Linux easier. I have created a pull request that you may want to review.

User avatar
phhnguyen
Posts: 449
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: Banksia - Yet another Chess Tournament Manager

Post by phhnguyen » Wed Jul 10, 2019 1:49 pm

Wow, thank you. I have never written a makefile myself before :D
https://banksiagui.com
A freeware chess GUI, based on opensource Banksia - the chess tournament manager

User avatar
phhnguyen
Posts: 449
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Banksia - version 2.0

Post by phhnguyen » Fri Jul 12, 2019 9:38 am

I have just released version 2.0. The new feature is to auto-generate JSON files which are used to play tournaments. Instead of spending hours or even days to create manually parameters for command line and/or JSON files, now all are auto-generated in few minutes.

Bellow is the introduction from the Readme:

Auto generate JSON files
------------------------------
A chess tournament may have tens or even hundreds of chess engines. Each engine has name, command line, working folder and may have tens parameters. Any wrong in data may cause engines to refuse to run, crash or run with wrong performances. However, writing down manually all information into a command line and/or some JSON files is so boring, hard job and easy to make mistake (from my experience, it is not easy to find and fix those mistakes). Defend on experience, it may take from hours to days to create a runnable configuration for a new tournament. Furthermore, new engines may frequently add or change parameters without notice to users.

Banksia can help to solve the above problems by generating/updating automatically all data needed for a tournament. If the old data exists, Banksia can update it without erasing nor modifying non-involving information. Thus users can update frequently their data.

What a user should do to generate or update JSON files:
- copy all engines into a folder (including their belonging files as well as all subfolders)
- run Banksia with that folder as a parameter and wait for few minutes. That all!

For example:

Code: Select all

banksia -u -c 4 -d c:\allenginefolder
Bankisa scans that given folder, including all subfolder for all executable files, then runs those files to detect if they are chess engines, what their chess protocols and options are. Bankisa can run and test concurrently those files (the parameter -c 4 means that is a concurrency of 4) to speed up the process (for a tournament within 20 engines, 4 concurrencies all may take about 1 - 5 minutes). All information is saved or updated into two key JSON files (if their paths are not specified, they will be created in the current working folder).

If users don't want Banksia to scan (or engines are not scannable, or located in different folders/drivers) or run not-involving executable files, they can create a simple and short JSON file (file engines.json) contains only commands of engines they need. Banksia will verify and fill all other information.

Code: Select all

[
    { "command" : "d:/stockfish/stockfish.exe" },
    { "command" : "c:/match/crafty25.3" }
]
Right after generating JSON files, users can start their tournaments:

Code: Select all

banksia -jsonpath c:\tour.json
Of course, users can edit those JSON files such as removing redundant, unused fields, re-order them to be easier to read! Some data fields are written down in empty forms (e.g. opening book folders) and need to fill in.
https://banksiagui.com
A freeware chess GUI, based on opensource Banksia - the chess tournament manager

User avatar
phhnguyen
Posts: 449
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Banksia 2.2

Post by phhnguyen » Sun Jul 14, 2019 5:16 am

Version 2.2! It supposes knockout (elimination) type and resumption last incomplete tournaments. There are also compiled binaries for Mac OS and Windows 64 bits you can quickly try.

Now Bansia has almost all features/functions I have dreamed for: small, fast, portable, easy to use, easy to integrate to other systems, resumable, able to automatically generate all configurations, files which are needed for tournaments.

Hope it could help users to create chess tournaments with much more ease and fun!

I will slowdown its development a bit, focusing on fixing bugs and small improvements.

All bug reports, suggestions, contributions are more than welcome!

/pham
https://banksiagui.com
A freeware chess GUI, based on opensource Banksia - the chess tournament manager

User avatar
phhnguyen
Posts: 449
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Banksia 3.0

Post by phhnguyen » Mon Jul 29, 2019 11:24 pm

Banksia 3.0 is released!

New main features:
  • Swiss tournament
  • detect opening names, variants, ECOs (save to PGN files)
  • profile (for Windows only): detect the number of threads, memory and CPU usage for engines
  • adjudication: finish a game if its length exceeds the given limit or the position hits Syzygy tablebase
  • improve JSON updating: keep almost all user-added information (such as notes/comments)
When working with engines, I am always curious about how they use memory, CPU, how good/effectiveness my engine compares to others, if I do something wrong about their settings for tournaments... The new feature 'profile' can provide some information for those questions. Below is an example (settings of all engines: 1 cores/threads, 64MB memory/hash).

/pham

Code: Select all

C:\match>banksia -jsonpath tour.json -no -profile
Banksia, Chess Tournament Manager, by Nguyen Pham - version 3.0
Warning: profile mode is on.
Opening book items: 44624, selection: allnew; Syzygy endgames: 145, missing: 0;
type: roundrobin, timer: 40/20:0.5, players: 3, games per pair: 2, matches: 6, concurrency: 1, ponder: off, book: on
 pgn: c:\match\logs\games.pgn, on
 result: c:\match\logs\logresult.txt, on
 engines: c:\match\logs\logengine.txt, on

1. Komodo 10 64-bit vs Crafty-25.2
1) Komodo 10 64-bit vs Crafty-25.2, #109, 1-0 (mate)
        Komodo 10 64-bit: cpu%: 4.7, think: 9.3, mem(MB): 125, max: 125, threads: 2, max: 3
             Crafty-25.2: cpu%: 5.8, think: 12.5, mem(MB): 63, max: 69, threads: 1, max: 3
2. Crafty-25.2 vs Komodo 10 64-bit
2) Crafty-25.2 vs Komodo 10 64-bit, #210, 1/2-1/2 (repetition)
             Crafty-25.2: cpu%: 5.8, think: 12.4, mem(MB): 64, max: 69, threads: 1, max: 3
        Komodo 10 64-bit: cpu%: 5.6, think: 11.8, mem(MB): 126, max: 226, threads: 2, max: 3
3. Crafty-25.2 vs Stockfish 10 64
3) Crafty-25.2 vs Stockfish 10 64, #101, 0-1 (adjudication)
            Crafty-25.2: cpu%: 6.0, think: 12.4, mem(MB): 64, max: 69, threads: 1, max: 4
        Stockfish 10 64: cpu%: 5.8, think: 12.2, mem(MB): 75, max: 76, threads: 3, max: 4
4. Stockfish 10 64 vs Crafty-25.2
4) Stockfish 10 64 vs Crafty-25.2, #127, 1-0 (mate)
        Stockfish 10 64: cpu%: 5.4, think: 10.8, mem(MB): 75, max: 76, threads: 3, max: 4
            Crafty-25.2: cpu%: 5.8, think: 11.8, mem(MB): 63, max: 69, threads: 1, max: 4
5. Stockfish 10 64 vs Komodo 10 64-bit
5) Stockfish 10 64 vs Komodo 10 64-bit, #130, 1-0 (adjudication)
         Stockfish 10 64: cpu%: 5.8, think: 12.3, mem(MB): 76, max: 77, threads: 3, max: 4
        Komodo 10 64-bit: cpu%: 5.3, think: 10.8, mem(MB): 126, max: 226, threads: 2, max: 3
6. Komodo 10 64-bit vs Stockfish 10 64
6) Komodo 10 64-bit vs Stockfish 10 64, #116, 0-1 (adjudication)
        Komodo 10 64-bit: cpu%: 5.8, think: 11.2, mem(MB): 125, max: 178, threads: 2, max: 3
         Stockfish 10 64: cpu%: 5.8, think: 12.4, mem(MB): 76, max: 77, threads: 3, max: 4
------------------------------------------------------------------------------
  #  name              games   wins%  draws% losses%   score    los%  elo+/-
  1. Stockfish 10 64       4   100.0     0.0     0.0     4.0     0.0     0.0
  2. Komodo 10 64-bit      4    25.0    25.0    50.0     1.5    28.2   -88.7
  3. Crafty-25.2           4     0.0    25.0    75.0     0.5     4.2  -338.0
------------------------------------------------------------------------------

Tech (average nodes, depths, time/m per move, others per game):
  #  name                 nodes  depths  time/m   moves    time    cpu  think    mem    max threads   max
  1. Stockfish 10 64       839K    21.8     0.9    58.8    53.8    5.7   11.9     75     77      3      4
  2. Komodo 10 64-bit      822K    18.3     0.9    70.0    64.7    5.4   11.0    125    226      2      3
  3. Crafty-25.2          2201K    17.9     0.9    67.5    61.5    5.8   12.3     64     69      1      4
     all ---              1301K    19.2    65.4    60.0     0.9    5.6   11.7     89    226      2      4

Tournamemt finished! Elapsed: 12:40

https://banksiagui.com
A freeware chess GUI, based on opensource Banksia - the chess tournament manager

Ferdy
Posts: 4111
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Banksia 3.0

Post by Ferdy » Tue Jul 30, 2019 11:18 am

I generated engines json file and there is

Code: Select all

"inclusive players" : 
  {
    "guide" : "matches are counted with players in this list only; side: white, black, any",
    "mode" : false,
    "players" : [],
    "side" : "black"
  },

Could you explain what is this?

I am actually looking for a setting where 2 engines play each other, but sides don't switch. Example first player is engine_white against second player engine_black, They play some games but engine_white will always play as white and engine_black will always play as black. I will run this from a pgn opening suite. Is this possible in Banksia 3.0?

User avatar
phhnguyen
Posts: 449
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: Banksia - Yet another Chess Tournament Manager

Post by phhnguyen » Tue Jul 30, 2019 1:28 pm

"inclusive players" is used to lock an (or some) engine to matches, including sides. This function can help in your case. To make two engines play again each other which one (engine A) always plays on white side (it is locked to all games and locked to one side), you may edit some fields as below:

Code: Select all

  "base" : 
  {
    "concurrency" : 2,
    "games per pair" : 20,
    "ponder" : false,
    "resumable" : true,
    "type" : "roundrobin"
  },
  
  "inclusive players" : 
  {
    "mode" : true,
    "players" : [ "engine A" ],
    "side" : "white"
  },

  "players" :
  [
      "engine A",
      "engine B"
  ],
For total 20 games ("games per pair") of the round-robin, Banksia will discard 10 games based on the condition in "inclusive players" and play only 10 games. Simply double the number of games you need.

Tip: Sometime I set that number ("games per pair") very large, say 20000 then run it, the tournament may take days to complete. Whenever I want current result, just type from keyboard "status", Banksia will print out that result and I can decide to stop or continue.

To use a PGN opening book:

Code: Select all

      {
        "mode" : true,
        "path" : "your_path_to_pgn_opening",
        "type" : "pgn"
      },
Hope it can help and have fun :D
https://banksiagui.com
A freeware chess GUI, based on opensource Banksia - the chess tournament manager

pferd
Posts: 122
Joined: Thu Jul 24, 2014 12:49 pm

Re: Banksia - Yet another Chess Tournament Manager

Post by pferd » Tue Jul 30, 2019 5:17 pm

I wanted to try this out on Ubuntu 1904 compiled with cmake. I had to do a little change:

Code: Select all

diff --git a/src/3rdparty/fathom/CMakeLists.txt b/src/3rdparty/fathom/CMakeLists.txt
index feff497..ba7aa58 100644
--- a/src/3rdparty/fathom/CMakeLists.txt
+++ b/src/3rdparty/fathom/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_library(json OBJECT
+add_library(fathom OBJECT
   stdendian.h tbchess.h tbconfig.h tbprobe.h tbprobe.cpp)
 #target_include_directories(fathom
 #  INTERFACE .)
diff --git a/src/game/tourmng.h b/src/game/tourmng.h
index 163e4b7..5c9907d 100755
--- a/src/game/tourmng.h
+++ b/src/game/tourmng.h
@@ -26,6 +26,8 @@
 #ifndef tourmng_hpp
 #define tourmng_hpp
 
+#include <cmath>
+
 #include "game.h"
 #include "configmng.h"
 #include "uciengine.h"

My c++ is a bit rusty, but casting them explicitly seems to do the job, but I get more of this error after I fixed them

Code: Select all

ox:~/Downloads/Banksia/build$ make
[  4%] Building CXX object src/game/CMakeFiles/game.dir/engineprofile.cpp.o
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp: In member function ‘std::__cxx11::string banksia::Profile::toString(bool) const’:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:48:62: error: no matching function for call to ‘max(long long unsigned int, const uint64_t&)’
  auto cpu = double(cpuTotal) * 100.0 / std::max(1ULL, cpuTime);
                                                              ^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
                 from /usr/include/c++/8/ios:40,
                 from /usr/include/c++/8/istream:38,
                 from /usr/include/c++/8/sstream:38,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:26:
/usr/include/c++/8/bits/stl_algobase.h:219:5: note: candidate: ‘template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)’
     max(const _Tp& __a, const _Tp& __b)
     ^~~
/usr/include/c++/8/bits/stl_algobase.h:219:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:48:62: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long long unsigned int’ and ‘uint64_t’ {aka ‘long unsigned int’})
  auto cpu = double(cpuTotal) * 100.0 / std::max(1ULL, cpuTime);
                                                              ^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
                 from /usr/include/c++/8/ios:40,
                 from /usr/include/c++/8/istream:38,
                 from /usr/include/c++/8/sstream:38,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:26:
/usr/include/c++/8/bits/stl_algobase.h:265:5: note: candidate: ‘template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)’
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/8/bits/stl_algobase.h:265:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:48:62: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long long unsigned int’ and ‘uint64_t’ {aka ‘long unsigned int’})
  auto cpu = double(cpuTotal) * 100.0 / std::max(1ULL, cpuTime);
                                                              ^
In file included from /usr/include/c++/8/algorithm:62,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:27:
/usr/include/c++/8/bits/stl_algo.h:3462:5: note: candidate: ‘template<class _Tp> _Tp std::max(std::initializer_list<_Tp>)’
     max(initializer_list<_Tp> __l)
     ^~~
/usr/include/c++/8/bits/stl_algo.h:3462:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:48:62: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long long unsigned int’
  auto cpu = double(cpuTotal) * 100.0 / std::max(1ULL, cpuTime);
                                                              ^
In file included from /usr/include/c++/8/algorithm:62,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:27:
/usr/include/c++/8/bits/stl_algo.h:3468:5: note: candidate: ‘template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare)’
     max(initializer_list<_Tp> __l, _Compare __comp)
     ^~~
/usr/include/c++/8/bits/stl_algo.h:3468:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:48:62: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long long unsigned int’
  auto cpu = double(cpuTotal) * 100.0 / std::max(1ULL, cpuTime);
                                                              ^
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:49:83: error: no matching function for call to ‘max(long long unsigned int, const uint64_t&)’
  auto thinking = double(cpuThinkingTotal) * 100.0 / std::max(1ULL, cpuThinkingTime);
                                                                                   ^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
                 from /usr/include/c++/8/ios:40,
                 from /usr/include/c++/8/istream:38,
                 from /usr/include/c++/8/sstream:38,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:26:
/usr/include/c++/8/bits/stl_algobase.h:219:5: note: candidate: ‘template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)’
     max(const _Tp& __a, const _Tp& __b)
     ^~~
/usr/include/c++/8/bits/stl_algobase.h:219:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:49:83: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long long unsigned int’ and ‘uint64_t’ {aka ‘long unsigned int’})
  auto thinking = double(cpuThinkingTotal) * 100.0 / std::max(1ULL, cpuThinkingTime);
                                                                                   ^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
                 from /usr/include/c++/8/ios:40,
                 from /usr/include/c++/8/istream:38,
                 from /usr/include/c++/8/sstream:38,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:26:
/usr/include/c++/8/bits/stl_algobase.h:265:5: note: candidate: ‘template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)’
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/8/bits/stl_algobase.h:265:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:49:83: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long long unsigned int’ and ‘uint64_t’ {aka ‘long unsigned int’})
  auto thinking = double(cpuThinkingTotal) * 100.0 / std::max(1ULL, cpuThinkingTime);
                                                                                   ^
In file included from /usr/include/c++/8/algorithm:62,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:27:
/usr/include/c++/8/bits/stl_algo.h:3462:5: note: candidate: ‘template<class _Tp> _Tp std::max(std::initializer_list<_Tp>)’
     max(initializer_list<_Tp> __l)
     ^~~
/usr/include/c++/8/bits/stl_algo.h:3462:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:49:83: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long long unsigned int’
  auto thinking = double(cpuThinkingTotal) * 100.0 / std::max(1ULL, cpuThinkingTime);
                                                                                   ^
In file included from /usr/include/c++/8/algorithm:62,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:27:
/usr/include/c++/8/bits/stl_algo.h:3468:5: note: candidate: ‘template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare)’
     max(initializer_list<_Tp> __l, _Compare __comp)
     ^~~
/usr/include/c++/8/bits/stl_algo.h:3468:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:49:83: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long long unsigned int’
  auto thinking = double(cpuThinkingTotal) * 100.0 / std::max(1ULL, cpuThinkingTime);
                                                                                   ^
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:50:51: error: no matching function for call to ‘max(long long unsigned int, const uint64_t&)’
  auto mem = int(memTotal / (std::max(1ULL, memCall) * 1024 * 1024));
                                                   ^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
                 from /usr/include/c++/8/ios:40,
                 from /usr/include/c++/8/istream:38,
                 from /usr/include/c++/8/sstream:38,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:26:
/usr/include/c++/8/bits/stl_algobase.h:219:5: note: candidate: ‘template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)’
     max(const _Tp& __a, const _Tp& __b)
     ^~~
/usr/include/c++/8/bits/stl_algobase.h:219:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:50:51: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long long unsigned int’ and ‘uint64_t’ {aka ‘long unsigned int’})
  auto mem = int(memTotal / (std::max(1ULL, memCall) * 1024 * 1024));
                                                   ^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
                 from /usr/include/c++/8/ios:40,
                 from /usr/include/c++/8/istream:38,
                 from /usr/include/c++/8/sstream:38,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:26:
/usr/include/c++/8/bits/stl_algobase.h:265:5: note: candidate: ‘template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)’
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/8/bits/stl_algobase.h:265:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:50:51: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long long unsigned int’ and ‘uint64_t’ {aka ‘long unsigned int’})
  auto mem = int(memTotal / (std::max(1ULL, memCall) * 1024 * 1024));
                                                   ^
In file included from /usr/include/c++/8/algorithm:62,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:27:
/usr/include/c++/8/bits/stl_algo.h:3462:5: note: candidate: ‘template<class _Tp> _Tp std::max(std::initializer_list<_Tp>)’
     max(initializer_list<_Tp> __l)
     ^~~
/usr/include/c++/8/bits/stl_algo.h:3462:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:50:51: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long long unsigned int’
  auto mem = int(memTotal / (std::max(1ULL, memCall) * 1024 * 1024));
                                                   ^
In file included from /usr/include/c++/8/algorithm:62,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:27:
/usr/include/c++/8/bits/stl_algo.h:3468:5: note: candidate: ‘template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare)’
     max(initializer_list<_Tp> __l, _Compare __comp)
     ^~~
/usr/include/c++/8/bits/stl_algo.h:3468:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:50:51: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long long unsigned int’
  auto mem = int(memTotal / (std::max(1ULL, memCall) * 1024 * 1024));
                                                   ^
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:52:60: error: no matching function for call to ‘max(long long unsigned int, const uint64_t&)’
  auto threads = int(threadTotal / std::max(1ULL, threadCall));
                                                            ^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
                 from /usr/include/c++/8/ios:40,
                 from /usr/include/c++/8/istream:38,
                 from /usr/include/c++/8/sstream:38,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:26:
/usr/include/c++/8/bits/stl_algobase.h:219:5: note: candidate: ‘template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)’
     max(const _Tp& __a, const _Tp& __b)
     ^~~
/usr/include/c++/8/bits/stl_algobase.h:219:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:52:60: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long long unsigned int’ and ‘uint64_t’ {aka ‘long unsigned int’})
  auto threads = int(threadTotal / std::max(1ULL, threadCall));
                                                            ^
In file included from /usr/include/c++/8/bits/char_traits.h:39,
                 from /usr/include/c++/8/ios:40,
                 from /usr/include/c++/8/istream:38,
                 from /usr/include/c++/8/sstream:38,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:26:
/usr/include/c++/8/bits/stl_algobase.h:265:5: note: candidate: ‘template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)’
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/8/bits/stl_algobase.h:265:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:52:60: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long long unsigned int’ and ‘uint64_t’ {aka ‘long unsigned int’})
  auto threads = int(threadTotal / std::max(1ULL, threadCall));
                                                            ^
In file included from /usr/include/c++/8/algorithm:62,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:27:
/usr/include/c++/8/bits/stl_algo.h:3462:5: note: candidate: ‘template<class _Tp> _Tp std::max(std::initializer_list<_Tp>)’
     max(initializer_list<_Tp> __l)
     ^~~
/usr/include/c++/8/bits/stl_algo.h:3462:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:52:60: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long long unsigned int’
  auto threads = int(threadTotal / std::max(1ULL, threadCall));
                                                            ^
In file included from /usr/include/c++/8/algorithm:62,
                 from /home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:27:
/usr/include/c++/8/bits/stl_algo.h:3468:5: note: candidate: ‘template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare)’
     max(initializer_list<_Tp> __l, _Compare __comp)
     ^~~
/usr/include/c++/8/bits/stl_algo.h:3468:5: note:   template argument deduction/substitution failed:
/home/tobias/Downloads/Banksia/src/game/engineprofile.cpp:52:60: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long long unsigned int’
  auto threads = int(threadTotal / std::max(1ULL, threadCall));
                                                            ^
make[2]: *** [src/game/CMakeFiles/game.dir/build.make:102: src/game/CMakeFiles/game.dir/engineprofile.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:481: src/game/CMakeFiles/game.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

User avatar
phhnguyen
Posts: 449
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: Banksia - Yet another Chess Tournament Manager

Post by phhnguyen » Wed Jul 31, 2019 3:13 am

pferd wrote:
Tue Jul 30, 2019 5:17 pm
I wanted to try this out on Ubuntu 1904 compiled with cmake. I had to do a little change:
My c++ is a bit rusty, but casting them explicitly seems to do the job, but I get more of this error after I fixed them
Thanks for your report. I have fixed some bugs/issues and tested on my Ubuntu 12 using gcc/g++ 6.2.0.

To compile you may use cmake. Another way is to use the script c.sh in the project folder:

Code: Select all

sh c.sh
https://banksiagui.com
A freeware chess GUI, based on opensource Banksia - the chess tournament manager

Post Reply