ConwayLife.com - A community for Conway's Game of Life and related cellular automata
Home  •  LifeWiki  •  Forums  •  Download Golly

CatForce new catalyst search utility (LifeAPI based)

For scripts to aid with computation or simulation in cellular automata.

Re: CatForce new catalyst search utility (LifeAPI based)

Postby Scorbie » January 6th, 2018, 5:56 pm

danny wrote:I'm really sorry to necrobump this thread, but I'm running the example 1.in and it returns with no 1.rle and no console output. What's going on? I'm not very skilled in C. If you need it, here is the example 1.in:
Hmm, could you paste the messages on your terminal (with basic information such as your OS, 32/64bit, C compiler etc. would certainly help)? Mine goes like this: (in the examples directory)
$ ../catforce 1.in
Input: 1.in
Initializing please wait...
Approximated Total: 2038431744

Initialization finished, searching...

13.8%,281M/2038M, cats/find: 1/1, now: 0:0:11, est: 0:1:19, 25547K/sec
Saving 1.rle
30.0%,611M/2038M, cats/find: 1/1, now: 0:0:21, est: 0:1:10, 29110K/sec
Saving 1.rle
47.4%,966M/2038M, cats/find: 1/1, now: 0:0:31, est: 0:1:5, 31186K/sec
Saving 1.rle
64.6%,1317M/2038M, cats/find: 1/1, now: 0:0:41, est: 0:1:3, 32122K/sec
Saving 1.rle
79.3%,1616M/2038M, cats/find: 1/1, now: 0:0:51, est: 0:1:4, 31704K/sec
Saving 1.rle
88.4%,1802M/2038M, cats/find: 1/1, now: 0:1:1, est: 0:1:8, 29549K/sec
Saving 1.rle
98.5%,2008M/2038M, cats/find: 1/1, now: 0:1:11, est: 0:1:12, 28282K/sec
Saving 1.rle
99.9%,2035M/2038M, cats/find: 1/1, now: 0:1:14, est: 0:1:14, 27510K/sec
Saving 1.rle


FINISH
Total elapsed time: 73.066585 seconds
Best wishes to you, Scorbie
User avatar
Scorbie
 
Posts: 1358
Joined: December 7th, 2013, 1:05 am

Re: CatForce new catalyst search utility (LifeAPI based)

Postby danny » January 6th, 2018, 6:10 pm

Scorbie wrote:Hmm, could you paste the messages on your terminal (with basic information such as your OS, 32/64bit, C compiler etc. would certainly help)? Mine goes like this: (in the examples directory)
CatForce output


First of all, thanks dearly for your help. Second of all, it's not outputting anything to the console. It just returns after less than a second with no output.

Dan@[i]Computer Name[/i] ~/catforce
$ ./catforce 1.in

Dan@[i]Computer Name[/i] ~/catforce
$


Also I don't have an example directory, it's all in the same directory for me, it looks like this:
Untitled.png
My directory for CatForce.
Untitled.png (113.94 KiB) Viewed 1529 times


EDIT: Oops, I forgot. My computer is Windows 7, 64-bit, I don't know anything about compilation so I wouldn't know how to check that, the .exe came with the file
get down with the sickness.
User avatar
danny
 
Posts: 673
Joined: October 27th, 2017, 3:43 pm
Location: i love to eat bees

Re: CatForce new catalyst search utility (LifeAPI based)

Postby Scorbie » January 6th, 2018, 6:13 pm

Whoop, I get it... Clicking catforce.exe won't work.
You should launch the terminal (type cmd + Enter on the file explorer's search bar) and type
catforce.exe  examples/1.in
or something alike.

Edit: Actually, that might not work. I see you have Cygwin, so your best bet would be to launch mintty (this is cygwin's terminal as far as I remember), navigate to the catforce directory, and call something like
./catforce examples/1.in
there.
Best wishes to you, Scorbie
User avatar
Scorbie
 
Posts: 1358
Joined: December 7th, 2013, 1:05 am

Re: CatForce new catalyst search utility (LifeAPI based)

Postby danny » January 6th, 2018, 6:25 pm

Scorbie wrote:I see you have Cygwin, so your best bet would be to launch mintty (this is cygwin's terminal as far as I remember), navigate to the catforce directory, and call something like
./catforce examples/1.in
there.

I get that, I typed
./catforce 1.in

While in the catforce directory and it did the same thing. The examples are in the same directly. Running it does the same thing every time regardless of any input. Running it from mintty directly doesn't do anything different either.
EDIT: Should I try recompiling? How do I recompile the catforce.c? Am I missing any files in the screenshot?
get down with the sickness.
User avatar
danny
 
Posts: 673
Joined: October 27th, 2017, 3:43 pm
Location: i love to eat bees

Re: CatForce new catalyst search utility (LifeAPI based)

Postby danny » January 14th, 2018, 2:43 pm

Alright, so dvgrn sent me a helpful PM that got my CatForce working. Here's the PM in question:
dvgrn wrote:Okay, so today I downloaded CatForce and tried to get it running on a Windows 10 system.

I didn't get the behavior you saw -- immediate return to command line with no response -- but it was pretty close:

The code execution cannot proceed because libgcc_s_seh-1.dll was not found / libstdc++-6.dll was not found. Reinstalling the program may fix this problem.

To get CatForce to work, I had to throw away the downloaded executable and compile the program locally.

Luckily that's not as difficult as it might sound -- especially if you already have apgluxe running successfully. CatForce just needs one of the same tools, g++.

Here's everything I had to do:

{open Cygwin64 Terminal}
cd c:
cd Users/Dave/Desktop/Catforce
{your path may vary -- just get to wherever you extracted the CatForce ZIP from GitHub}
g++ -O3 CatForce.c
{compiles the program, producing a.exe}
rm CatForce.exe
{old executable deleted}
mv a.exe CatForce.exe
./CatForce.exe 1.in
{starts doing a long search, displaying stuff in the Cygwin window}

Let me know if you try this and have questions. The key is that if you compile with Cygwin, you'll have to run the program in a Cygwin window -- a regular DOS command prompt will throw ugly errors (see above).


Extreme thanks to Dave for this.

EDIT: Added simeks' suggestion, an -O3 in the compilation.
Last edited by danny on January 14th, 2018, 3:31 pm, edited 2 times in total.
get down with the sickness.
User avatar
danny
 
Posts: 673
Joined: October 27th, 2017, 3:43 pm
Location: i love to eat bees

Re: CatForce new catalyst search utility (LifeAPI based)

Postby simeks » January 14th, 2018, 3:26 pm

danny wrote:...
dvgrn wrote:...
...
g++ CatForce.c
...
...
...

But always compile with optimization, the executable will be at least 3 times faster:

g++ -O3 CatForce.c
simeks
 
Posts: 344
Joined: March 11th, 2015, 12:03 pm
Location: Sweden

Previous

Return to Scripts

Who is online

Users browsing this forum: No registered users and 4 guests