1 #ifndef LINGEN_PLATFORM_HPP_ 2 #define LINGEN_PLATFORM_HPP_ 3 4 #include <cstddef> // for size_t 5 #include "select_mpi.h" 6 struct cxx_param_list; 7 8 struct lingen_platform { 9 /* input characteristics -- the ones we have to live with */ 10 11 /* We give timings for a run on r*r nodes, with T threads per node */ 12 /* Note that all of this can also be auto-detected, a priori */ 13 MPI_Comm comm; 14 unsigned int r; 15 unsigned int T; /* **PHYSICAL** cores, or we say rubbish */ 16 int openmp_threads; 17 18 size_t available_ram; 19 20 /* Assume we output something like one gigabyte per second. This is 21 * rather conservative for HPC networks */ 22 /* 23 * Note that is the reason for one of the inaccuracies in the timing 24 * estimations for lingen. 25 */ 26 double mpi_xput = 1e9; 27 28 static void lookup_parameters(cxx_param_list & pl); 29 static void declare_usage(cxx_param_list & pl); 30 lingen_platform(MPI_Comm comm, cxx_param_list & pl); 31 singlelingen_platform32 lingen_platform single() const { 33 lingen_platform res = *this; 34 res.r = 1; 35 return res; 36 } 37 }; 38 39 40 #endif /* LINGEN_PLATFORM_HPP_ */ 41