Parallel numerical verification of the σ_odd problem
October 6, 2018
|
Classes | |
struct | first_last_bad_bad_struct |
Structure for first_n, last_n, bad_first_n and bad_last_n values. More... | |
struct | n_bad_bad_struct |
Structure for n, first_n and last_n values. More... | |
Typedefs | |
using | nat_type = sigmaodd::nat_type |
using | prime_type = sigmaodd::prime_type |
typedef unsigned int | rank_type |
Type of MPI rank. More... | |
typedef struct mpi::first_last_bad_bad_struct | first_last_bad_bad_type |
Structure for first_n, last_n, bad_first_n and bad_last_n values. More... | |
typedef struct mpi::n_bad_bad_struct | n_bad_bad_type |
Structure for n, first_n and last_n values. More... | |
Functions | |
std::set< nat_type > | mpi_check_gentle_varsigma_odd__dynamic (nat_type first_n, nat_type last_n, const std::set< nat_type > &previous_bad_table=std::set< nat_type >(), bool print_bad=true, unsigned int range_size=20000, unsigned int master_range_size=200) |
Check in the order all odd gentle numbers between first_n and last_n, and if print_bad then print all bad numbers between first_n and last_n (included). The consequence of the result is that: if (all numbers < first_n respect the conjecture) and (all perfect squares < last_n respect the conjecture) and (all bad numbers < last_n respect the conjecture) then all numbers < last_n respect the conjecture. More... | |
std::set< nat_type > | mpi_check_gentle_varsigma_odd__one_by_one (nat_type first_n, nat_type last_n, const std::set< nat_type > &previous_bad_table, bool print_bad) |
bool | mpi_slave_wait_compute_n () |
Computation of one n by a slave, for the mpi_check_gentle_varsigma_odd__one_by_one() master function. More... | |
bool | mpi_slave_wait_compute_range () |
Computation of one range by a slave, for the mpi_check_gentle_varsigma_odd__dynamic() master function. More... | |
void | print_mpi_versions () |
Print the Open MPI version and the library version. More... | |
void | send_bad_table_to (const std::set< nat_type > &bad_table, rank_type to_rank) |
Send bad values to a process. More... | |
std::set< nat_type > | wait_bad_table_from (rank_type from_rank) |
Wait and receive bad values from a process. More... | |
bool | is_finished_from (rank_type from_rank) |
Return true iff the process send an empty finished message. More... | |
constexpr bool | is_master (rank_type rank) |
Return true iff rank correspond to the master instance. More... | |
unsigned int | mpi_nb_process () |
Return the number of process. More... | |
std::string | mpi_processor_name () |
Return the processor name. More... | |
unsigned int | mpi_rank () |
Return the rank of this process. More... | |
void | send_bool_to_master (bool b) |
Send a boolean value to the master. More... | |
void | send_finished_to_master () |
Send a finished empty message to the master. More... | |
void | send_first_last_bad_bad_to (nat_type first_n, nat_type last_n, nat_type bad_first_n, nat_type bad_last_n, rank_type to_rank) |
Send first_n, last_n, bad_first and bad_last_n to a process. More... | |
void | send_n_bad_bad_to (nat_type n, nat_type first_n, nat_type last_n, rank_type to_rank) |
Send n, first_n and last_n to a process. More... | |
void | send_n_to (nat_type n, rank_type to_rank) |
Send a value to a process. More... | |
void | send_range_to (nat_type first_n, nat_type last_n, rank_type to_rank) |
Send a range (first_n, last_n) to a process. More... | |
void | send_size_to (unsigned int size, rank_type to_rank) |
Send a size to a process. More... | |
bool | wait_bool_from (rank_type from_rank) |
Wait and receive a boolean value from a process. More... | |
void | wait_finished_from (rank_type from_rank) |
Wait and received a finished empty message from a process. More... | |
first_last_bad_bad_type | wait_first_last_bad_bad_from_master () |
Wait and receive values first_n, last_n and bad_last_n from the master. More... | |
n_bad_bad_type | wait_n_bad_bad_from_master () |
Wait and receive values n, first_n and last_n from the master. More... | |
nat_type | wait_n_from_master () |
Wait and receive a value from the master. More... | |
std::pair< nat_type, nat_type > | wait_range_from_master () |
Wait and receive a range (first_n, last_n) from the master. More... | |
unsigned int | wait_size_from (rank_type from_rank) |
Wait and receive a size from a process. More... | |
typedef struct mpi::first_last_bad_bad_struct mpi::first_last_bad_bad_type |
Structure for first_n, last_n, bad_first_n and bad_last_n values.
typedef struct mpi::n_bad_bad_struct mpi::n_bad_bad_type |
Structure for n, first_n and last_n values.
using mpi::nat_type = typedef sigmaodd::nat_type |
using mpi::prime_type = typedef sigmaodd::prime_type |
typedef unsigned int mpi::rank_type |
|
inline |
Return true iff the process send an empty finished message.
Definition at line 38 of file mpi__inline.hpp.
constexpr bool mpi::is_master | ( | rank_type | rank | ) |
Return true iff rank correspond to the master instance.
Definition at line 27 of file mpi__inline.hpp.
std::set< nat_type > mpi::mpi_check_gentle_varsigma_odd__dynamic | ( | nat_type | first_n, |
nat_type | last_n, | ||
const std::set< nat_type > & | previous_bad_table = std::set< nat_type >() , |
||
bool | print_bad = true , |
||
unsigned int | range_size = 20000 , |
||
unsigned int | master_range_size = 200 |
||
) |
Check in the order all odd gentle numbers between first_n and last_n, and if print_bad then print all bad numbers between first_n and last_n (included). The consequence of the result is that: if (all numbers < first_n respect the conjecture) and (all perfect squares < last_n respect the conjecture) and (all bad numbers < last_n respect the conjecture) then all numbers < last_n respect the conjecture.
One master process dispatch one range of numbers for each of the (nb_process - 1) slaves process and compute itself one range. There is no barrier, the master process dispatch new range for free slave process and compute itself one new range. And so forth with next numbers.
Printing is do in increasing order.
sigmaodd::primes.cpp must be compiled without the macro PRIME16.
first_n | 3 <= odd <= last_n |
last_n | <= MAX_POSSIBLE_N |
previous_bad_table | if not empty then must be contains all bad numbers < first_n |
print_bad | |
range_size | even |
master_range_size | even |
std::set< nat_type > mpi::mpi_check_gentle_varsigma_odd__one_by_one | ( | nat_type | first_n, |
nat_type | last_n, | ||
const std::set< nat_type > & | previous_bad_table = std::set< nat_type >() , |
||
bool | print_bad = true |
||
) |
Check in the order all odd gentle numbers between first_n and last_n, and if print_bad then print all bad numbers between first_n and last_n (included). The consequence of the result is that: if (all numbers < first_n respect the conjecture) and (all perfect squares < last_n respect the conjecture) and (all bad numbers < last_n respect the conjecture) then all numbers < last_n respect the conjecture.
One master process dispatch one number for each of the (nb_process - 1) slaves process and compute itself one number. Then wait that they all finish, and so forth with next numbers.
Printing is do in not deterministic order.
sigmaodd::primes.cpp must be compiled without the macro PRIME16.
first_n | 3 <= odd <= last_n |
last_n | <= MAX_POSSIBLE_N |
previous_bad_table | if not empty then must be contains all bad numbers < first_n |
print_bad |
|
inline |
Return the number of process.
Definition at line 52 of file mpi__inline.hpp.
|
inline |
Return the processor name.
Definition at line 66 of file mpi__inline.hpp.
|
inline |
Return the rank of this process.
Definition at line 78 of file mpi__inline.hpp.
bool mpi::mpi_slave_wait_compute_n | ( | ) |
Computation of one n by a slave, for the mpi_check_gentle_varsigma_odd__one_by_one() master function.
bool mpi::mpi_slave_wait_compute_range | ( | ) |
Computation of one range by a slave, for the mpi_check_gentle_varsigma_odd__dynamic() master function.
void mpi::print_mpi_versions | ( | ) |
|
inline |
Send a boolean value to the master.
Definition at line 92 of file mpi__inline.hpp.
|
inline |
Send a finished empty message to the master.
Definition at line 104 of file mpi__inline.hpp.
|
inline |
Send first_n, last_n, bad_first and bad_last_n to a process.
Definition at line 114 of file mpi__inline.hpp.
|
inline |
Send n, first_n and last_n to a process.
Definition at line 130 of file mpi__inline.hpp.
Send a value to a process.
Definition at line 145 of file mpi__inline.hpp.
Send a range (first_n, last_n) to a process.
Definition at line 157 of file mpi__inline.hpp.
|
inline |
Send a size to a process.
Definition at line 171 of file mpi__inline.hpp.
|
inline |
Wait and receive a boolean value from a process.
Definition at line 183 of file mpi__inline.hpp.
|
inline |
Wait and received a finished empty message from a process.
Definition at line 197 of file mpi__inline.hpp.
|
inline |
Wait and receive values first_n, last_n and bad_last_n from the master.
Definition at line 207 of file mpi__inline.hpp.
|
inline |
Wait and receive values n, first_n and last_n from the master.
Definition at line 223 of file mpi__inline.hpp.
|
inline |
Wait and receive a value from the master.
Definition at line 239 of file mpi__inline.hpp.
Wait and receive a range (first_n, last_n) from the master.
Definition at line 255 of file mpi__inline.hpp.
|
inline |
Wait and receive a size from a process.
Definition at line 271 of file mpi__inline.hpp.