IOR
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include <errno.h>
#include <math.h>
#include <mpi.h>
#include <string.h>
#include <sys/stat.h>
#include <time.h>
#include <sys/time.h>
#include <sys/utsname.h>
#include <assert.h>
#include "ior.h"
#include "ior-internal.h"
#include "aiori.h"
#include "utilities.h"
#include "parse_options.h"
Go to the source code of this file.
Macros | |
#define | IOR_NB_TIMERS 6 |
Functions | |
static void | DestroyTests (IOR_test_t *tests_head) |
static char * | PrependDir (IOR_param_t *, char *) |
static char ** | ParseFileName (char *, int *) |
static void | InitTests (IOR_test_t *) |
static void | TestIoSys (IOR_test_t *) |
static void | ValidateTests (IOR_param_t *params, MPI_Comm com) |
static IOR_offset_t | WriteOrRead (IOR_param_t *test, IOR_results_t *results, aiori_fd_t *fd, const int access, IOR_io_buffers *ioBuffers) |
static void | ior_set_xfer_hints (IOR_param_t *p) |
static int | test_initialize (IOR_test_t *test) |
static void | test_finalize (IOR_test_t *test) |
IOR_test_t * | ior_run (int argc, char **argv, MPI_Comm world_com, FILE *world_out) |
int | ior_main (int argc, char **argv) |
void | init_IOR_Param_t (IOR_param_t *p, MPI_Comm com) |
static void | DisplayOutliers (int numTasks, double timerVal, char *timeString, int access, int outlierThreshold) |
static void | CheckForOutliers (IOR_param_t *test, const double *timer, const int access) |
static void | CheckFileSize (IOR_test_t *test, char *testFilename, IOR_offset_t dataMoved, int rep, const int access) |
static size_t | CompareData (void *expectedBuffer, size_t size, IOR_offset_t transferCount, IOR_param_t *test, IOR_offset_t offset, int fillrank, int access) |
static int | CountErrors (IOR_param_t *test, int access, int errors) |
void | AllocResults (IOR_test_t *test) |
void | FreeResults (IOR_test_t *test) |
IOR_test_t * | CreateTest (IOR_param_t *init_params, int test_num) |
static void | DestroyTest (IOR_test_t *test) |
static void | DistributeHints (MPI_Comm com) |
static void | FillIncompressibleBuffer (void *buffer, IOR_param_t *test) |
static void | FillBuffer (void *buffer, IOR_param_t *test, unsigned long long offset, int fillrank) |
char * | GetPlatformName () |
void | GetTestFileName (char *testFileName, IOR_param_t *test) |
static void | ReduceIterResults (IOR_test_t *test, double *timer, const int rep, const int access) |
static void | RemoveFile (char *testFileName, int filePerProc, IOR_param_t *test) |
static void | XferBuffersSetup (IOR_io_buffers *ioBuffers, IOR_param_t *test, int pretendRank) |
static void | XferBuffersFree (IOR_io_buffers *ioBuffers, IOR_param_t *test) |
static void * | malloc_and_touch (size_t size) |
static void | file_hits_histogram (IOR_param_t *params) |
int | test_time_elapsed (IOR_param_t *params, double startTime) |
static void * | HogMemory (IOR_param_t *params) |
static void | WriteTimes (IOR_param_t *test, const double *timer, const int iteration, const int access) |
static void | StoreRankInformation (IOR_test_t *test, double *timer, const int rep, const int access) |
static void | ProcessIterResults (IOR_test_t *test, double *timer, const int rep, const int access) |
IOR_offset_t * | GetOffsetArrayRandom (IOR_param_t *test, int pretendRank, IOR_offset_t *out_count) |
static IOR_offset_t | WriteOrReadSingle (IOR_offset_t offset, int pretendRank, IOR_offset_t transfer, IOR_offset_t *transferCount, int *errors, IOR_param_t *test, aiori_fd_t *fd, IOR_io_buffers *ioBuffers, int access) |
static void | prefillSegment (IOR_param_t *test, void *randomPrefillBuffer, int pretendRank, aiori_fd_t *fd, IOR_io_buffers *ioBuffers, int startSegment, int endSegment) |
Variables | |
char ** | environ |
static int | totalErrorCount |
static const ior_aiori_t * | backend |
int | aiori_warning_as_errors = 0 |
static unsigned int | reseed_incompressible_prng = TRUE |
#define IOR_NB_TIMERS 6 |
Definition at line 48 of file ior.c.
Referenced by ReduceIterResults(), TestIoSys(), and WriteTimes().
void AllocResults | ( | IOR_test_t * | test | ) |
Definition at line 521 of file ior.c.
References NULL, IOR_test_t::params, IOR_param_t::repetitions, IOR_test_t::results, and safeMalloc().
Referenced by ParseCommandLine(), and ReadConfigScript().
|
static |
Definition at line 348 of file ior.c.
References IOR_point_t::aggFileSizeForBW, IOR_point_t::aggFileSizeFromStat, IOR_point_t::aggFileSizeFromXfer, IOR_param_t::api, IOR_param_t::backend_options, IOR_param_t::deadlineForStonewalling, EWARN, EWARNF, IOR_param_t::expectedAggFileSize, aiori_xfer_hint_t::filePerProc, ior_aiori::get_file_size, IOR_param_t::hints, MPI_CHECK, IOR_test_t::params, rank, IOR_test_t::results, testComm, TRUE, verbose, VERBOSE_0, WARN, and WRITE.
Referenced by TestIoSys().
|
static |
Definition at line 326 of file ior.c.
References DisplayOutliers(), IOR_param_t::numTasks, and IOR_param_t::outlierThreshold.
Referenced by ProcessIterResults().
|
static |
Definition at line 409 of file ior.c.
References IOR_param_t::dataPacketType, EWARNF, GetTestFileName(), incompressible, MAX_PATHLEN, offset, out_logfile, rank, READCHECK, IOR_param_t::setTimeStampSignature, IOR_param_t::storeFileOffset, IOR_param_t::timeStampSignatureValue, results::val, verbose, VERBOSE_1, VERBOSE_2, VERBOSE_3, VERBOSE_5, and WRITECHECK.
Referenced by WriteOrReadSingle().
|
static |
Definition at line 492 of file ior.c.
References IOR_param_t::checkRead, IOR_param_t::checkWrite, IOR_param_t::errorFound, EWARNF, MPI_CHECK, out_logfile, rank, testComm, IOR_param_t::timeStampSignatureValue, totalErrorCount, TRUE, WARN, and WRITECHECK.
Referenced by WriteOrRead().
IOR_test_t* CreateTest | ( | IOR_param_t * | init_params, |
int | test_num | ||
) |
Create new test for list of tests.
Definition at line 542 of file ior.c.
References ERR, GetPlatformName(), IOR_param_t::id, IOR_test_t::next, NULL, IOR_test_t::params, IOR_param_t::platform, and IOR_test_t::results.
Referenced by ParseCommandLine(), and ReadConfigScript().
|
static |
Definition at line 558 of file ior.c.
References FreeResults().
Referenced by DestroyTests().
|
static |
Definition at line 564 of file ior.c.
References DestroyTest(), IOR_test_t::next, and NULL.
Referenced by ior_main().
|
static |
Definition at line 285 of file ior.c.
References EWARNF, MAX_STR, results::mean, MPI_CHECK, numTasks, rank, results::sd, results::sum, testComm, results::var, and WRITE.
Referenced by CheckForOutliers().
|
static |
|
static |
Definition at line 1068 of file ior.c.
References MPI_CHECK, NULL, numTasks, IOR_param_t::numTasks, out_logfile, rank, rankOffset, and IOR_param_t::testComm.
Referenced by TestIoSys().
|
static |
Definition at line 644 of file ior.c.
References IOR_param_t::dataPacketType, FillIncompressibleBuffer(), incompressible, IOR_param_t::timeStampSignatureValue, and IOR_param_t::transferSize.
Referenced by TestIoSys(), and WriteOrReadSingle().
|
static |
Definition at line 623 of file ior.c.
References FALSE, IOR_param_t::incompressibleSeed, rank, reseed_incompressible_prng, IOR_param_t::setTimeStampSignature, IOR_param_t::transferSize, and TRUE.
Referenced by FillBuffer().
void FreeResults | ( | IOR_test_t * | test | ) |
Definition at line 531 of file ior.c.
References NULL, and IOR_test_t::results.
Referenced by DestroyTest().
IOR_offset_t* GetOffsetArrayRandom | ( | IOR_param_t * | test, |
int | pretendRank, | ||
IOR_offset_t * | out_count | ||
) |
Returns a precomputed array of IOR_offset_t for the inner benchmark loop. They get created sequentially and mixed up in the end. It should be noted that as the seeds get synchronised across all processes if not FilePerProcess is set every process computes the same random order. For a shared file all transfers get randomly assigned to ranks. The processes can also have differen't numbers of transfers. This might lead to a bigger diversion in accesse as it dose with filePerProc. This is expected but should be mined.
test | IOR_param_t for getting transferSize, blocksize and SegmentCount |
pretendRank | int pretended Rank for shifting the offsets correctly |
Definition at line 1679 of file ior.c.
References IOR_param_t::blockSize, IOR_param_t::filePerProc, MPI_CHECK, NULL, IOR_param_t::numTasks, IOR_param_t::randomSeed, rank, safeMalloc(), IOR_param_t::testComm, and IOR_param_t::transferSize.
Referenced by WriteOrRead().
char* GetPlatformName | ( | void | ) |
Definition at line 671 of file ior.c.
References EWARN, and MAX_STR.
Referenced by CreateTest(), and ParseCommandLine().
void GetTestFileName | ( | char * | testFileName, |
IOR_param_t * | test | ||
) |
Definition at line 756 of file ior.c.
References IOR_param_t::dualMount, ERR, IOR_param_t::filePerProc, GetProcessorAndCore(), MAX_PATHLEN, MAX_STR, IOR_param_t::numTasks, ParseFileName(), PrependDir(), rank, rankOffset, IOR_param_t::repCounter, IOR_param_t::testFileName, TRUE, and IOR_param_t::uniqueDir.
Referenced by CompareData(), RemoveFile(), ShowTestStart(), and TestIoSys().
|
static |
Definition at line 1128 of file ior.c.
References ERR, malloc_and_touch(), IOR_param_t::memoryPerNode, IOR_param_t::memoryPerTask, NULL, IOR_param_t::numTasksOnNode0, out_logfile, verbose, and VERBOSE_3.
Referenced by TestIoSys().
void init_IOR_Param_t | ( | IOR_param_t * | p, |
MPI_Comm | com | ||
) |
Definition at line 248 of file ior.c.
References aiori_default(), IOR_param_t::api, IOR_param_t::blockSize, IOR_param_t::checkRead, IOR_param_t::checkWrite, FALSE, IOR_param_t::incompressibleSeed, IOR_param_t::mpi_comm_world, NULL, IOR_param_t::numNodes, IOR_param_t::numTasks, IOR_param_t::numTasksOnNode0, IOR_param_t::open, IOR_param_t::platform, IOR_param_t::randomSeed, IOR_param_t::readFile, IOR_param_t::repCounter, IOR_param_t::repetitions, IOR_param_t::segmentCount, IOR_param_t::taskPerNodeOffset, IOR_param_t::testComm, IOR_param_t::testFileName, IOR_param_t::transferSize, IOR_param_t::URI, WRITE, and IOR_param_t::writeFile.
Referenced by ParseCommandLine(), and ValidateTests().
|
static |
Definition at line 961 of file ior.c.
References aiori_warning_as_errors, IOR_param_t::blockSize, DistributeHints(), EWARNF, IOR_param_t::expectedAggFileSize, GetNumNodes(), GetNumTasks(), GetNumTasksOnNode0(), init_clock(), IOR_param_t::mpi_comm_world, IOR_test_t::next, NULL, IOR_param_t::numNodes, IOR_param_t::numTasks, IOR_param_t::numTasksOnNode0, IOR_test_t::params, QueryNodeMapping(), rank, IOR_param_t::segmentCount, IOR_param_t::tasksBlockMapping, IOR_param_t::testComm, ValidateTests(), verbose, IOR_param_t::verbose, and IOR_param_t::warningAsErrors.
Referenced by ior_main(), and ior_run().
int ior_main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 183 of file ior.c.
References DestroyTests(), InitTests(), MPI_CHECK, IOR_test_t::next, NULL, out_logfile, out_resultfile, ParseCommandLine(), PrintHeader(), PrintLongSummaryAllTests(), PrintTestEnds(), rank, ShowTestEnd(), test_finalize(), test_initialize(), TestIoSys(), totalErrorCount, verbose, VERBOSE_0, VERBOSE_1, and VERBOSE_4.
Referenced by main().
IOR_test_t* ior_run | ( | int | argc, |
char ** | argv, | ||
MPI_Comm | world_com, | ||
FILE * | world_out | ||
) |
Definition at line 149 of file ior.c.
References IOR_results_t::errors, InitTests(), MPI_CHECK, IOR_test_t::next, NULL, out_logfile, out_resultfile, ParseCommandLine(), PrintHeader(), PrintLongSummaryAllTests(), PrintTestEnds(), rank, IOR_test_t::results, ShowTestEnd(), test_finalize(), test_initialize(), TestIoSys(), and totalErrorCount.
|
static |
Definition at line 65 of file ior.c.
References aiori_xfer_hint_t::blockSize, IOR_param_t::blockSize, aiori_xfer_hint_t::collective, IOR_param_t::collective, aiori_xfer_hint_t::dryRun, IOR_param_t::dryRun, aiori_xfer_hint_t::expectedAggFileSize, IOR_param_t::expectedAggFileSize, aiori_xfer_hint_t::filePerProc, IOR_param_t::filePerProc, aiori_xfer_hint_t::fsyncPerWrite, IOR_param_t::fsyncPerWrite, hints, IOR_param_t::hints, aiori_xfer_hint_t::numNodes, IOR_param_t::numNodes, aiori_xfer_hint_t::numTasks, IOR_param_t::numTasks, aiori_xfer_hint_t::randomOffset, IOR_param_t::randomOffset, aiori_xfer_hint_t::segmentCount, IOR_param_t::segmentCount, aiori_xfer_hint_t::singleXferAttempt, IOR_param_t::singleXferAttempt, aiori_xfer_hint_t::transferSize, IOR_param_t::transferSize, and ior_aiori::xfer_hints.
Referenced by test_initialize(), and ValidateTests().
|
static |
Definition at line 1046 of file ior.c.
References NULL.
Referenced by HogMemory().
|
static |
Definition at line 715 of file ior.c.
References ERR, FILENAME_DELIMITER, and NULL.
Referenced by GetTestFileName().
|
static |
Definition at line 1800 of file ior.c.
References IOR_param_t::blockSize, IO_BUFFERS::buffer, IOR_param_t::filePerProc, IOR_param_t::numTasks, offset, IOR_param_t::randomPrefillBlocksize, WRITE, and WriteOrReadSingle().
Referenced by WriteOrRead().
|
static |
Definition at line 811 of file ior.c.
References ior_aiori::access, IOR_param_t::backend_options, ERR, ERRF, MAX_STR, ior_aiori::mkdir, NULL, IOR_param_t::numTasks, rank, and rankOffset.
Referenced by GetTestFileName().
|
static |
Definition at line 1253 of file ior.c.
References CheckForOutliers(), IOR_param_t::outlierThreshold, IOR_test_t::params, ReduceIterResults(), IOR_param_t::saveRankDetailsCSV, StoreRankInformation(), verbose, VERBOSE_3, and WriteTimes().
Referenced by TestIoSys().
|
static |
Definition at line 864 of file ior.c.
References IOR_point_t::aggFileSizeForBW, IOR_param_t::blockSize, IOR_NB_TIMERS, MPI_CHECK, IOR_test_t::params, PrintReducedResult(), rank, READ, IOR_results_t::read, IOR_test_t::results, testComm, IOR_point_t::time, IOR_param_t::transferSize, verbose, VERBOSE_0, WRITE, and IOR_results_t::write.
Referenced by ProcessIterResults().
|
static |
Definition at line 925 of file ior.c.
References ior_aiori::access, IOR_param_t::backend_options, ior_aiori::delete, GetTestFileName(), out_logfile, rank, rankOffset, IOR_param_t::reorderTasksRandom, TRUE, verbose, and VERBOSE_3.
Referenced by TestIoSys().
|
static |
Definition at line 1220 of file ior.c.
References IOR_point_t::aggFileSizeForBW, FAIL, NULL, IOR_test_t::params, rank, IOR_results_t::read, IOR_test_t::results, IOR_param_t::saveRankDetailsCSV, testComm, IOR_param_t::testComm, WARN, WRITE, and IOR_results_t::write.
Referenced by ProcessIterResults().
|
static |
Definition at line 139 of file ior.c.
References IOR_param_t::backend, IOR_param_t::backend_options, ior_aiori::finalize, MPI_CHECK, IOR_param_t::mpi_comm_world, IOR_test_t::params, and testComm.
Referenced by ior_main(), and ior_run().
|
static |
Definition at line 90 of file ior.c.
References aiori_warning_as_errors, IOR_param_t::backend, IOR_param_t::backend_options, EWARNF, IOR_param_t::gpuID, ior_aiori::initialize, ior_set_xfer_hints(), MPI_CHECK, IOR_param_t::mpi_comm_world, IOR_param_t::numTasks, IOR_test_t::params, rank, ShowTestStart(), testComm, IOR_param_t::testComm, verbose, IOR_param_t::verbose, VERBOSE_0, and IOR_param_t::warningAsErrors.
Referenced by ior_main(), and ior_run().
int test_time_elapsed | ( | IOR_param_t * | params, |
double | startTime | ||
) |
Definition at line 1113 of file ior.c.
References GetTimeStamp(), and IOR_param_t::maxTimeDuration.
Referenced by TestIoSys().
|
static |
Definition at line 1271 of file ior.c.
References IOR_param_t::backend_options, IO_BUFFERS::buffer, CheckFileSize(), IOR_param_t::checkRead, IOR_param_t::checkWrite, ior_aiori::close, ior_aiori::create, CurrentTimeString(), IOR_param_t::deadlineForStonewalling, DelaySecs(), ERR, IOR_param_t::errorFound, EWARNF, FAIL, FALSE, file_hits_histogram(), aiori_xfer_hint_t::filePerProc, IOR_param_t::filePerProc, FillBuffer(), GetTestFileName(), GetTimeStamp(), IOR_param_t::hints, HogMemory(), IOR_param_t::interTestDelay, IOR_param_t::intraTestBarriers, IOR_CREAT, IOR_NB_TIMERS, IOR_RDONLY, IOR_TRUNC, IOR_WRONLY, IOR_param_t::keepFile, IOR_param_t::keepFileWithError, MAX_STR, MPI_CHECK, IOR_param_t::multiFile, NULL, IOR_param_t::numNodes, IOR_param_t::numTasks, IOR_param_t::numTasksOnNode0, ior_aiori::open, IOR_param_t::open, out_logfile, IOR_point_t::pairs_accessed, IOR_test_t::params, PrintLongSummaryHeader(), PrintLongSummaryOneTest(), PrintRemoveTiming(), PrintRepeatEnd(), PrintShortSummary(), PrintTableHeader(), ProcessIterResults(), rank, rankOffset, READ, READCHECK, IOR_param_t::readFile, ReadStoneWallingIterations(), RemoveFile(), IOR_param_t::reorderTasks, IOR_param_t::reorderTasksRandom, IOR_param_t::reorderTasksRandomSeed, IOR_param_t::repCounter, IOR_param_t::repetitions, reseed_incompressible_prng, IOR_test_t::results, IOR_param_t::setTimeStampSignature, ShowSetup(), ior_aiori::stat, IOR_param_t::stoneWallingStatusFile, IOR_param_t::stoneWallingWearOutIterations, IOR_param_t::summary_every_test, IOR_param_t::taskPerNodeOffset, IOR_param_t::tasksBlockMapping, test_time_elapsed(), testComm, IOR_param_t::testComm, IOR_param_t::timeStampSignatureValue, TRUE, IOR_param_t::useExistingTestFile, verbose, IOR_param_t::verbose, VERBOSE_0, VERBOSE_1, VERBOSE_2, VERBOSE_3, VERBOSE_4, WARN, WRITE, IOR_results_t::write, WRITECHECK, IOR_param_t::writeFile, WriteOrRead(), XferBuffersFree(), and XferBuffersSetup().
Referenced by ior_main(), and ior_run().
|
static |
Definition at line 1570 of file ior.c.
References IOR_param_t::api, IOR_param_t::backend, IOR_param_t::backend_options, IOR_param_t::blockSize, ior_aiori::check_params, IOR_param_t::checkRead, IOR_param_t::checkWrite, ERR, FALSE, IOR_param_t::filePerProc, IOR_param_t::fsync, init_IOR_Param_t(), IOR_param_t::interTestDelay, ior_set_xfer_hints(), IOR_param_t::numTasks, IOR_param_t::randomOffset, IOR_param_t::randomPrefillBlocksize, IOR_param_t::randomSeed, IOR_param_t::readFile, IOR_param_t::reorderTasks, IOR_param_t::reorderTasksRandom, IOR_param_t::repetitions, IOR_param_t::segmentCount, IOR_param_t::setTimeStampSignature, IOR_param_t::storeFileOffset, IOR_param_t::transferSize, TRUE, WARN_RESET, and IOR_param_t::writeFile.
Referenced by InitTests().
|
static |
Definition at line 1825 of file ior.c.
References aligned_buffer_alloc(), aligned_buffer_free(), IOR_param_t::backend_options, IOR_param_t::blockSize, IOR_param_t::collective, CountErrors(), IOR_param_t::deadlineForStonewalling, IOR_param_t::filePerProc, ior_aiori::fsync, IOR_param_t::fsync, GetOffsetArrayRandom(), GetTimeStamp(), IOR_param_t::gpuMemoryFlags, MPI_CHECK, NULL, IOR_param_t::numTasks, offset, out_logfile, IOR_point_t::pairs_accessed, prefillSegment(), IOR_param_t::randomOffset, IOR_param_t::randomPrefillBlocksize, rank, rankOffset, IOR_results_t::read, IOR_param_t::segmentCount, IOR_point_t::stonewall_avg_data_accessed, IOR_point_t::stonewall_min_data_accessed, IOR_point_t::stonewall_time, IOR_point_t::stonewall_total_data_accessed, IOR_param_t::stoneWallingWearOut, IOR_param_t::stoneWallingWearOutIterations, testComm, IOR_param_t::testComm, totalErrorCount, IOR_param_t::transferSize, TRUE, verbose, VERBOSE_1, WRITE, IOR_results_t::write, WRITECHECK, and WriteOrReadSingle().
Referenced by TestIoSys().
|
static |
Definition at line 1755 of file ior.c.
References IOR_param_t::backend_options, IO_BUFFERS::buffer, CompareData(), ERR, FillBuffer(), ior_aiori::fsync, IOR_param_t::fsyncPerWrite, IOR_param_t::interIODelay, NULL, READ, READCHECK, IOR_param_t::storeFileOffset, TRUE, WRITE, WRITECHECK, and ior_aiori::xfer.
Referenced by prefillSegment(), and WriteOrRead().
|
static |
Definition at line 1157 of file ior.c.
References IOR_param_t::id, IOR_NB_TIMERS, MAX_STR, out_logfile, rank, and WRITE.
Referenced by ProcessIterResults().
|
static |
Definition at line 1035 of file ior.c.
References aligned_buffer_free(), IO_BUFFERS::buffer, and IOR_param_t::gpuMemoryFlags.
Referenced by TestIoSys().
|
static |
Definition at line 1026 of file ior.c.
References aligned_buffer_alloc(), IO_BUFFERS::buffer, IOR_param_t::gpuMemoryFlags, and IOR_param_t::transferSize.
Referenced by TestIoSys().
int aiori_warning_as_errors = 0 |
Definition at line 85 of file ior.c.
Referenced by InitTests(), mdtest_run(), and test_initialize().
|
static |
Definition at line 53 of file ior.c.
Referenced by updateParsedOptions().
char** environ |
Referenced by DistributeHints().
|
static |
Definition at line 620 of file ior.c.
Referenced by FillIncompressibleBuffer(), and TestIoSys().
|
static |
Definition at line 52 of file ior.c.
Referenced by CountErrors(), ior_main(), ior_run(), and WriteOrRead().