![]() |
(git:b77b4be)
|
#include <assert.h>
#include <fenv.h>
#include <limits.h>
#include <math.h>
#include <omp.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../offload/offload_buffer.h"
#include "common/grid_common.h"
#include "grid_replay.h"
#include "cpu/grid_cpu_collocate.h"
#include "cpu/grid_cpu_integrate.h"
#include "grid_task_list.h"
Go to the source code of this file.
Functions | |
static void | read_next_line (char line[], int length, FILE *fp) |
Reads next line from given filehandle and handles errors. | |
static void | parse_next_line (const char key[], FILE *fp, const char format[], const int nargs,...) |
Parses next line from file, expecting it to match "${key} ${format}". | |
static int | parse_int (const char key[], FILE *fp) |
Shorthand for parsing a single integer value. | |
static void | parse_int3 (const char key[], FILE *fp, int vec[3]) |
Shorthand for parsing a vector of three integer values. | |
static double | parse_double (const char key[], FILE *fp) |
Shorthand for parsing a single double value. | |
static void | parse_double3 (const char key[], FILE *fp, double vec[3]) |
Shorthand for parsing a vector of three double values. | |
static void | parse_double3x3 (const char key[], FILE *fp, double mat[3][3]) |
Shorthand for parsing a 3x3 matrix of doubles. | |
static void | create_dummy_basis_set (const int size, const int lmin, const int lmax, const double zet, grid_basis_set **basis_set) |
Creates mock basis set using the identity as decontraction matrix. | |
static void | create_dummy_task_list (const bool orthorhombic, const int border_mask, const double ra[3], const double rab[3], const double radius, const grid_basis_set *basis_set_a, const grid_basis_set *basis_set_b, const int o1, const int o2, const int la_max, const int lb_max, const int cycles, const int cycles_per_block, const int npts_global[][3], const int npts_local[][3], const int shift_local[][3], const int border_width[][3], const double dh[][3][3], const double dh_inv[][3][3], grid_task_list **task_list) |
Creates mock task list with one task per cycle. | |
bool | grid_replay (const char *filename, const int cycles, const bool collocate, const bool batch, const int cycles_per_block, const double tolerance) |
Reads a .task file, collocates/integrates it, and compares results. See grid_replay.h for details. | |
|
static |
Reads next line from given filehandle and handles errors.
Definition at line 31 of file grid_replay.c.
|
static |
Parses next line from file, expecting it to match "${key} ${format}".
Definition at line 42 of file grid_replay.c.
|
static |
Shorthand for parsing a single integer value.
Definition at line 67 of file grid_replay.c.
|
static |
Shorthand for parsing a vector of three integer values.
Definition at line 77 of file grid_replay.c.
|
static |
Shorthand for parsing a single double value.
Definition at line 85 of file grid_replay.c.
|
static |
Shorthand for parsing a vector of three double values.
Definition at line 95 of file grid_replay.c.
|
static |
Shorthand for parsing a 3x3 matrix of doubles.
Definition at line 103 of file grid_replay.c.
|
static |
Creates mock basis set using the identity as decontraction matrix.
Definition at line 115 of file grid_replay.c.
|
static |
Creates mock task list with one task per cycle.
Definition at line 155 of file grid_replay.c.
bool grid_replay | ( | const char * | filename, |
const int | cycles, | ||
const bool | collocate, | ||
const bool | batch, | ||
const int | cycles_per_block, | ||
const double | tolerance | ||
) |
Reads a .task file, collocates/integrates it, and compares results. See grid_replay.h for details.
Reads a .task file, collocates/integrates it, and compares results.
Definition at line 222 of file grid_replay.c.