(git:f2099e5)
Loading...
Searching...
No Matches
grid_replay.c File Reference
#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"
#include "grid_task_list_internal.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 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.

Function Documentation

◆ read_next_line()

void read_next_line ( char line[],
int length,
FILE * fp )
static

Reads next line from given filehandle and handles errors.

Author
Ole Schuett

Definition at line 32 of file grid_replay.c.

Here is the caller graph for this function:

◆ parse_int()

int parse_int ( const char key[],
FILE * fp )
static

Shorthand for parsing a single integer value.

Author
Ole Schuett

Definition at line 43 of file grid_replay.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_int3()

void parse_int3 ( const char key[],
FILE * fp,
int vec[3] )
static

Shorthand for parsing a vector of three integer values.

Author
Ole Schuett

Definition at line 58 of file grid_replay.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_double()

double parse_double ( const char key[],
FILE * fp )
static

Shorthand for parsing a single double value.

Author
Ole Schuett

Definition at line 71 of file grid_replay.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_double3()

void parse_double3 ( const char key[],
FILE * fp,
double vec[3] )
static

Shorthand for parsing a vector of three double values.

Author
Ole Schuett

Definition at line 86 of file grid_replay.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_double3x3()

void parse_double3x3 ( const char key[],
FILE * fp,
double mat[3][3] )
static

Shorthand for parsing a 3x3 matrix of doubles.

Author
Ole Schuett

Definition at line 99 of file grid_replay.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_dummy_basis_set()

void create_dummy_basis_set ( const int size,
const int lmin,
const int lmax,
const double zet,
grid_basis_set ** basis_set )
static

Creates mock basis set using the identity as decontraction matrix.

Author
Ole Schuett

Definition at line 114 of file grid_replay.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_dummy_task_list()

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 )
static

Creates mock task list with one task per cycle.

Author
Ole Schuett

Definition at line 154 of file grid_replay.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ grid_replay()

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.

Author
Ole Schuett

Definition at line 221 of file grid_replay.c.

Here is the call graph for this function:
Here is the caller graph for this function: