Catalina

RossHRossH Posts: 4,683
edited 2020-10-03 - 11:28:43 in Propeller 2
I have just added Catalina 4.6 to SourceForge. This release enhances and integrates the new parallelizer into Catalina, and also allows it to be used stand-alone with other compilers and threads libraries (and example of using it with GCC and Posix threads is included).

Here is an extract from the README.TXT file:
RELEASE 4.6

1. The Catalina Parallelizer is now an integral component of Catalina. To
   invoke the parallelizer, use the -Z option in any Catalina command. Note
   that this option is positional - it will enable parallelizing all C source
   files in the command after it appears. You can also use -z (i.e. with a 
   lower case z) to stop parallelizing source files. This means the
   Parallelizer can now easily be used in Code::Blocks or Geany IDEs.

2. Added the demos\parallelize subdirectory, with documents and examples that
   demonstrate the Parallelizer.

3. Added the option of named exclusive code segments to the Parallelizer - all
   segments with the same name will all use the same lock, which means only
   one worker can be in ANY of the exclusive zones that specify that name. The
   name is optional, and _region will be used if no other name is specified.

4. Added more error checking to the Parallelizer, and reformatted the error 
   messages to use the same format as the compiler. Also, the line numbers will
   now generally refer to the input C source file, not the output C source.

5. Added support for other C compilers and thread libraries to the 
   Parallelizer - a complete example is provided in the demos/parallelize
   subdirectory - see the file custom_threads.h in that directory for more 
   details.

Comments

  • RossHRossH Posts: 4,683
    edited 2020-10-03 - 22:36:23
    Catalina 4.5 has been superseded by release 4.6. See the previous post for details.
  • Catalina 4.6 has been released. See the top post for details.
  • @RossH Thanks for keeping Catalina going. It's nice to have options...

    I just installed the latest version to see if it could run this MicroMax Chess code...

    It compiles and run, but just like FlexC, it hangs if you hit enter when it is supposed to look for a move.
    You can manually move pieces by entering moves like "e2e4", but also just like FlexC, there is something wrong with the black pawns... They don't move, for example.

    Anyway, don't expect you to do anything about it, just letting you know I'm testing out Catalina.

    This code was designed to use as few a characters as possible, which seems very silly to me... I imagine why that is why compilers might have a hard time with it...
  • RaymanRayman Posts: 11,372
    edited 2020-10-10 - 22:26:00
    This chess code seems to work, except that the function GetMillisecs() needs fixing because I hacked it to make it compile.
    The interface asks how many seconds to give computer. If you say "0", it moves right away. If you say "1", it thinks longer that I could wait for...

    Also, it can't find the opening book file even though I put it on the uSD card of the Eval board...

    I did the compile and load like this:
    catalina NGplay_61.c -p2 -lc -C P2_EVAL -C NATIVE
    payload -i -z -b230400 NGplay_61.bin
    
    c
    c
  • Rayman wrote: »
    @RossH Thanks for keeping Catalina going. It's nice to have options...

    I just installed the latest version to see if it could run this MicroMax Chess code...

    It compiles and run, but just like FlexC, it hangs if you hit enter when it is supposed to look for a move.
    You can manually move pieces by entering moves like "e2e4", but also just like FlexC, there is something wrong with the black pawns... They don't move, for example.

    Anyway, don't expect you to do anything about it, just letting you know I'm testing out Catalina.

    This code was designed to use as few a characters as possible, which seems very silly to me... I imagine why that is why compilers might have a hard time with it...

    Seems to work ok for me. But I must admit I only played a few moves, because each move takes a looooonnnnnggg time!

    What are you running it on, and what command did you use? I ran it on a P2, and used the command:
    catalina -p2 micromax.c -lci -ltiny -C P2_EVAL -C TTY -C NATIVE -C NO_FLOAT
    
  • Rayman wrote: »
    This chess code seems to work, except that the function GetMillisecs() needs fixing because I hacked it to make it compile.
    The interface asks how many seconds to give computer. If you say "0", it moves right away. If you say "1", it thinks longer that I could wait for...

    Also, it can't find the opening book file even though I put it on the uSD card of the Eval board...

    I did the compile and load like this:
    catalina NGplay_61.c -p2 -lc -C P2_EVAL -C NATIVE
    payload -i -z -b230400 NGplay_61.bin
    

    I haven't looked at the code, but to use the SD Card you need to use -lcx instead of -lc
  • Hi @Rayman

    I was interested as to why the MicroMax chess program is so slow, so I did some measurements on it. I only did a couple of runs, but the reason becomes clear almost immediately - most of the work is done by one function (D), which is recursive. This very complex function gets called anywhere between 200,000 and 500,000 times while searching for the best move, and it recurses to a depth of 25 or so calls.

    I think the author was concentrating on program size, not speed! :)

    Ross.
  • @RossH i think you are right. Although it seems to have been ported to microcontrollers. The code is very obtuse though. I think I like the look of ngplay better.
Sign In or Register to comment.