Skip to content

Commit fa3bf91

Browse files
committed
remove obsolete mine_parallel script
1 parent 695428f commit fa3bf91

File tree

3 files changed

+6
-87
lines changed

3 files changed

+6
-87
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ cd loda-cpp/src && make && cd ..
1919

2020
To do a simple test, you can run `loda eval A000045` to calculate the first terms of the Fibonacci sequence.
2121

22-
To mine programs for OEIS sequences, you can run `loda mine` (single-core) or use the [mine_parallel.sh](mine_parallel.sh) script (multi-core).
22+
To mine programs for OEIS sequences, you can run `loda mine` (single-core) or `loda mine -p` (multi-core).
2323

2424
## Usage
2525

@@ -78,17 +78,19 @@ Run the interactive configuration wizard.
7878

7979
#### mine
8080

81-
To mine programs for OEIS integer sequences, use `loda mine`. It generates programs in a loop and tries to match them to sequences. If a match was found, an alert is printed and the program is automatically saved to the local programs folder. If you are running in client mode, the programs are also submitted to acentral server and incorporated into the global [loda-programs](https://github.com/loda-lang/loda-programs) repository. The miner configurations are defined in [miners.json](miners.default.json). Depending on the configuration, programs overwritten if they are faster. This refers to the number of execution steps needed to calculate the sequence.
81+
To mine programs for OEIS integer sequences, use the `loda mine` command. It generates programs in a loop and tries to match them to integer sequences. If a match was found, an alert is printed and the program is automatically saved to the local programs folder. If you are running in client mode, the programs are also submitted to a central API server and integrated into the global [loda-programs](https://github.com/loda-lang/loda-programs) repository.
8282

83-
The `loda` tool is single-threaded and therefore uses one CPU during mining. It supports multiple process instances for parallel mining. You can use the [mine_parallel.sh](mine_parallel.sh) script for this. It automatically determines the number of processes to be used for parallel mining.
83+
By default, every miner uses one CPU. If you want to use more CPUs, you can run `loda mine -p` which will spawn multiple miner instances, each running as a separate process. You can configure the number of miner instances by running `loda setup`.
84+
85+
There are multiple miner profiles defined in [miners.json](miners.default.json). You can choose a miner profile using the `-i` option, for example `loda mine -i mutate`.
8486

8587
#### check
8688

8789
Check if a program for an OEIS sequence is correct. For interactive output, use `-b 1` to enable b-file printing. Use `-c -1` to allow an unlimited number of execution cycles.
8890

8991
#### maintain
9092

91-
Run a maintenance for all programs. This checks the correctness of all programs in a random order. The programs must generate the first 100 terms of the sequence. In addition, up to the first 2000 terms are taken into account if the program is correct. Incorrect programs are removed and correct programs are minimized (see the `minimize` command). In addition, the description of the sequence in the comment of the program is updated to the latest version of the OEIS database. The program statistics and program lists are regenerated.
93+
Run a maintenance for all programs. This checks the correctness of all programs in a random order. The programs must generate the first 100 terms of the sequence. In addition, up to the first 2000 terms are taken into account if the program is correct. Incorrect programs are removed and correct programs are minimized (see the `minimize` command). In addition, the description of the sequence in the comment of the program is updated to the latest version of the OEIS database. The program statistics and program lists are regenerated.
9294

9395
## Additional Resources
9496

mine_parallel.sh

Lines changed: 0 additions & 79 deletions
This file was deleted.

src/oeis_manager.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,6 @@ size_t getBadOpsCount(const Program &p) {
659659
// - w/o indirect memory access
660660
// - w/o loops that have non-constant args
661661
// - w/o gcd with powers of a small constant
662-
// - w/o bin (can be very slow)
663662
size_t num_ops = ProgramUtil::numOps(p, Operand::Type::INDIRECT);
664663
for (auto &op : p.ops) {
665664
if (op.type == Operation::Type::LPB &&
@@ -671,9 +670,6 @@ size_t getBadOpsCount(const Program &p) {
671670
Minimizer::getPowerOf(op.source.value) != 0) {
672671
num_ops++;
673672
}
674-
if (op.type == Operation::Type::BIN) {
675-
num_ops++;
676-
}
677673
}
678674
return num_ops;
679675
}

0 commit comments

Comments
 (0)