|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Unit tests for ModuleIO::save_mat. More...
#include <gtest/gtest.h>#include "source_io/module_hs/hs_dense_io.h"#include "source_base/parallel_blkcyc.h"#include "source_base/parallel_comm.h"#include "source_basis/module_ao/parallel_orbitals.h"#include <algorithm>#include <complex>#include <cstdio>#include <cstdlib>#include <fstream>#include <sstream>#include <string>#include <vector>#include <mpi.h>#include "source_base/module_parallel/para_mpi_func.h"Functions | |
| TEST (HsDenseIoSaveMat, TextHeaderContainsStepAndDimension) | |
| TEST (HsDenseIoSaveMat, TextHeaderStepTwo) | |
| TEST (HsDenseIoSaveMat, TextHeaderGammaOnlyDouble) | |
| TEST (HsDenseIoSaveMat, TextHeaderGammaOnlyComplex) | |
| TEST (HsDenseIoSaveMat, BinaryDimHeaderDouble) | |
| TEST (HsDenseIoSaveMat, BinaryDimHeaderComplex) | |
| TEST (HsDenseIoSaveMat, BinaryGammaUpperTriangle) | |
| TEST (HsDenseIoSaveMat, BinaryComplexUpperTriangleMpiReduction) | |
| TEST (HsDenseIoSaveMat, BinaryAppendCompleteRecordsAndOverwrite) | |
| TEST (HsDenseIoSaveMat, TextAppendTwoStepsAndFirstStepTruncates) | |
| TEST (HsDenseIoSaveMat, TextPrecisionFollowsArgument) | |
| int | main (int argc, char **argv) |
Unit tests for ModuleIO::save_mat.
save_mat writes a square matrix in text or binary upper-triangle/full format. When built with __MPI (the project default), save_mat uses MPI collectives and MPI_Barrier. This test provides a main() that calls MPI_Init first so the MPI path is safe on a single rank. Header-only tests use a default-constructed/serial Parallel_Blkcyclic and do not check values; the binary upper-triangle tests distribute a known matrix over a real Parallel_Orbitals and verify the gathered payload.
| int main | ( | int | argc, |
| char ** | argv ) |
| TEST | ( | HsDenseIoSaveMat | , |
| BinaryAppendCompleteRecordsAndOverwrite | ) |
| TEST | ( | HsDenseIoSaveMat | , |
| BinaryComplexUpperTriangleMpiReduction | ) |
| TEST | ( | HsDenseIoSaveMat | , |
| BinaryDimHeaderComplex | ) |
| TEST | ( | HsDenseIoSaveMat | , |
| BinaryDimHeaderDouble | ) |
| TEST | ( | HsDenseIoSaveMat | , |
| BinaryGammaUpperTriangle | ) |
| TEST | ( | HsDenseIoSaveMat | , |
| TextAppendTwoStepsAndFirstStepTruncates | ) |
| TEST | ( | HsDenseIoSaveMat | , |
| TextHeaderContainsStepAndDimension | ) |
| TEST | ( | HsDenseIoSaveMat | , |
| TextHeaderGammaOnlyComplex | ) |
| TEST | ( | HsDenseIoSaveMat | , |
| TextHeaderGammaOnlyDouble | ) |
| TEST | ( | HsDenseIoSaveMat | , |
| TextHeaderStepTwo | ) |
| TEST | ( | HsDenseIoSaveMat | , |
| TextPrecisionFollowsArgument | ) |