9#define _USE_MATH_DEFINES
25#include "hilapp_mpi.h"
46#include "plumbing/memalloc.h"
47#include "plumbing/timing.h"
52#define RESTRICT __restrict__
100extern std::ostream
out;
103extern std::ostream
out0;
110extern bool about_to_finish;
114extern bool is_initialized;
118extern bool check_input;
119extern int check_with_nodes;
121enum sort { unsorted, ascending, descending };
126void error(
const std::string &msg);
127void error(
const char *msg);
138void synchronize_partitions();
140void initialize_communications(
int &argc,
char ***argv);
142bool is_comm_initialized(
void);
143void finish_communications();
144void abort_communications(
int status);
147void print_dashed_line(
const std::string &txt = {});
152#include "plumbing/logger.h"
171constexpr inline void swap(T &a, T &b) {
181#if defined(CUDA) || defined(HIP)
182#include "plumbing/backend_gpu/defs.h"
184#include "plumbing/backend_vector/defs.h"
186#include "plumbing/backend_cpu/defs.h"
190#include "plumbing/random.h"
193#include "plumbing/type_tools.h"
195#include "plumbing/has_unary_minus.h"
197#if defined(CUDA) || defined(HIP)
198#include "plumbing/backend_gpu/gpu_templated_ops.h"
203#include "plumbing/real_var_ops.h"
206#define MAX_GATHERS 1000
210#if __has_include(<filesystem>)
212namespace filesys_ns = std::filesystem;
214#elif __has_include(<experimental/filesystem>)
215#include <experimental/filesystem>
216namespace filesys_ns = std::experimental::filesystem;
219static_assert(0,
"Neither <filesystem> nor <experimental/filesystem> found!");
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 + gpu
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)
Initial setup routines.
void split_into_partitions(int rank)
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.