9#define _USE_MATH_DEFINES
25#include "hilapp_mpi.h"
45#include "plumbing/memalloc.h"
46#include "plumbing/timing.h"
51#define RESTRICT __restrict__
99extern std::ostream
out;
102extern std::ostream
out0;
109extern bool about_to_finish;
113extern bool is_initialized;
117extern bool check_input;
118extern int check_with_nodes;
121extern const char *input_file;
123enum sort { unsorted, ascending, descending };
128void error(
const std::string &msg);
129void error(
const char *msg);
143#include "plumbing/logger.h"
162constexpr inline void swap(T &a, T &b) {
172#if defined(CUDA) || defined(HIP)
173#include "plumbing/backend_gpu/defs.h"
175#include "plumbing/backend_vector/defs.h"
177#include "plumbing/backend_cpu/defs.h"
181#include "plumbing/random.h"
184#include "plumbing/type_tools.h"
186#include "plumbing/has_unary_minus.h"
188#if defined(CUDA) || defined(HIP)
189#include "plumbing/backend_gpu/gpu_templated_ops.h"
194#include "plumbing/real_var_ops.h"
197#define MAX_GATHERS 1000
200void initialize_communications(
int &argc,
char ***argv);
201void split_into_partitions(
int rank);
202bool is_comm_initialized(
void);
203void finish_communications();
204void abort_communications(
int status);
207void print_dashed_line(
const std::string &txt = {});
Define the logger class here.
T arg(const Complex< T > &a)
Return argument of Complex number.
fft_direction
define a class for FFT direction
constexpr T sqr(const T &arg)
Define convenience function sqr(), returning square of argument.
Implement hila::swap for gauge fields.
logger_class log
Now declare the logger.
int myrank()
rank of this node
int number_of_nodes()
how many nodes there are
void synchronize()
synchronize mpi
std::ostream out
this is our default output file stream
std::ostream out0
This writes output only from main process (node 0)
std::ofstream output_file
this is just a hook to store output file, if it is in use
void initialize(int argc, char **argv)
Read in command line arguments. Initialise default stream and MPI communication.
void finishrun()
Normal, controlled exit - all nodes must call this. Prints timing information and information about c...
void terminate(int status)
This file contains #defined constants.