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 *, MPI_Comm) |
static void | TestIoSys (IOR_test_t *) |
static void | ValidateTests (IOR_param_t *) |
static IOR_offset_t | WriteOrRead (IOR_param_t *test, IOR_results_t *results, void *fd, const int access, IOR_io_buffers *ioBuffers) |
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) |
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, IOR_offset_t dataMoved, int rep, const int access) |
static size_t | CompareBuffers (void *expectedBuffer, void *unknownBuffer, size_t size, IOR_offset_t transferCount, IOR_param_t *test, int access) |
static int | CountErrors (IOR_param_t *test, int access, int errors) |
static void * | aligned_buffer_alloc (size_t size) |
static void | aligned_buffer_free (void *buf) |
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) |
void | DistributeHints (void) |
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) |
IOR_offset_t * | GetOffsetArraySequential (IOR_param_t *test, int pretendRank) |
IOR_offset_t * | GetOffsetArrayRandom (IOR_param_t *test, int pretendRank, int access) |
static IOR_offset_t | WriteOrReadSingle (IOR_offset_t pairCnt, IOR_offset_t *offsetArray, int pretendRank, IOR_offset_t *transferCount, int *errors, IOR_param_t *test, int *fd, IOR_io_buffers *ioBuffers, int access) |
Variables | |
char ** | environ |
static int | totalErrorCount |
static const ior_aiori_t * | backend |
unsigned int | reseed_incompressible_prng = TRUE |
#define IOR_NB_TIMERS 6 |
Definition at line 44 of file ior.c.
Referenced by ReduceIterResults(), TestIoSys(), and WriteTimes().
|
static |
Definition at line 474 of file ior.c.
Referenced by XferBuffersSetup().
|
static |
Definition at line 504 of file ior.c.
Referenced by XferBuffersFree().
void AllocResults | ( | IOR_test_t * | test | ) |
Definition at line 509 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 298 of file ior.c.
References IOR_point_t::aggFileSizeForBW, IOR_point_t::aggFileSizeFromStat, IOR_point_t::aggFileSizeFromXfer, IOR_param_t::api, IOR_param_t::deadlineForStonewalling, IOR_param_t::expectedAggFileSize, MPI_CHECK, out_logfile, IOR_test_t::params, rank, IOR_test_t::results, testComm, verbose, VERBOSE_0, and WRITE.
Referenced by TestIoSys().
|
static |
Definition at line 276 of file ior.c.
References DisplayOutliers(), IOR_param_t::numTasks, and IOR_param_t::outlierThreshold.
Referenced by TestIoSys().
|
static |
Definition at line 342 of file ior.c.
References ERR, GetTestFileName(), MAX_PATHLEN, MAX_STR, IOR_param_t::offset, out_logfile, IOR_param_t::quitOnError, rank, READCHECK, TRUE, verbose, VERBOSE_2, VERBOSE_3, VERBOSE_5, and WRITECHECK.
Referenced by WriteOrReadSingle().
|
static |
Definition at line 442 of file ior.c.
References IOR_param_t::checkRead, IOR_param_t::checkWrite, IOR_param_t::errorFound, 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 530 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 546 of file ior.c.
References FreeResults().
Referenced by DestroyTests().
|
static |
Definition at line 552 of file ior.c.
References DestroyTest(), IOR_test_t::next, and NULL.
Referenced by ior_main().
|
static |
Definition at line 233 of file ior.c.
References hostname, MAX_STR, results::mean, MPI_CHECK, numTasks, out_logfile, rank, results::sd, results::sum, testComm, results::var, wall_clock_delta, and WRITE.
Referenced by CheckForOutliers().
void DistributeHints | ( | void | ) |
|
static |
Definition at line 1071 of file ior.c.
References MPI_CHECK, mpi_comm_world, NULL, numTasks, IOR_param_t::numTasks, out_logfile, rank, and rankOffset.
Referenced by TestIoSys().
|
static |
Definition at line 629 of file ior.c.
References IOR_param_t::dataPacketType, FALSE, FillIncompressibleBuffer(), incompressible, IOR_param_t::incompressibleSeed, rank, reseed_incompressible_prng, IOR_param_t::setTimeStampSignature, IOR_param_t::timeStampSignatureValue, IOR_param_t::transferSize, and TRUE.
Referenced by TestIoSys(), and WriteOrReadSingle().
|
static |
Definition at line 612 of file ior.c.
References IOR_param_t::incompressibleSeed, and IOR_param_t::transferSize.
Referenced by FillBuffer().
void FreeResults | ( | IOR_test_t * | test | ) |
Definition at line 519 of file ior.c.
References NULL, and IOR_test_t::results.
Referenced by DestroyTest().
IOR_offset_t* GetOffsetArrayRandom | ( | IOR_param_t * | test, |
int | pretendRank, | ||
int | access | ||
) |
Returns a precomputed array of IOR_offset_t for the inner benchmark loop. They get created sequentially and mixed up in the end. The last array element is set to -1 as end marker. It should be noted that as the seeds get synchronised across all processes every process computes the same random order if used with filePerProc. 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 offsest corectly |
Definition at line 1787 of file ior.c.
References IOR_param_t::blockSize, ERR, FALSE, IOR_param_t::filePerProc, NULL, IOR_param_t::numTasks, IOR_param_t::randomSeed, READ, SeedRandGen(), IOR_param_t::segmentCount, IOR_param_t::testComm, IOR_param_t::transferSize, and WRITE.
Referenced by WriteOrRead().
IOR_offset_t* GetOffsetArraySequential | ( | IOR_param_t * | test, |
int | pretendRank | ||
) |
Returns a precomputed array of IOR_offset_t for the inner benchmark loop. They are sequential and the last element is set to -1 as end marker.
test | IOR_param_t for getting transferSize, blocksize and SegmentCount |
pretendRank | int pretended Rank for shifting the offsest corectly |
Definition at line 1738 of file ior.c.
References IOR_param_t::blockSize, ERR, IOR_param_t::filePerProc, NULL, IOR_param_t::numTasks, IOR_param_t::segmentCount, and IOR_param_t::transferSize.
Referenced by WriteOrRead().
char* GetPlatformName | ( | void | ) |
Definition at line 664 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 749 of file ior.c.
References ERR, IOR_param_t::filePerProc, 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 CompareBuffers(), DisplayFreespace(), RemoveFile(), and TestIoSys().
|
static |
Definition at line 1131 of file ior.c.
References ERR, malloc_and_touch(), IOR_param_t::memoryPerNode, IOR_param_t::memoryPerTask, NULL, IOR_param_t::numTasksOnNode0, out_logfile, size, verbose, and VERBOSE_3.
Referenced by TestIoSys().
void init_IOR_Param_t | ( | IOR_param_t * | p | ) |
Definition at line 175 of file ior.c.
References aiori_default(), IOR_param_t::api, IOR_param_t::beegfs_chunkSize, IOR_param_t::beegfs_numTargets, IOR_param_t::blockSize, IOR_param_t::checkRead, IOR_param_t::checkWrite, FALSE, IOR_param_t::hdfs_block_size, IOR_param_t::hdfs_fs, IOR_param_t::hdfs_name_node, IOR_param_t::hdfs_name_node_port, IOR_param_t::hdfs_replicas, IOR_param_t::hdfs_user, IOR_param_t::incompressibleSeed, IOR_CREAT, IOR_IRGRP, IOR_IRUSR, IOR_IWGRP, IOR_IWUSR, IOR_RDWR, IOR_param_t::lustre_start_ost, IOR_param_t::mode, mpi_comm_world, NULL, IOR_param_t::numNodes, IOR_param_t::numTasks, IOR_param_t::numTasksOnNode0, IOR_param_t::open, IOR_param_t::openFlags, IOR_param_t::part_number, 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::setAlignment, 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 948 of file ior.c.
References IOR_param_t::blockSize, DistributeHints(), IOR_param_t::expectedAggFileSize, GetNumNodes(), GetNumTasks(), GetNumTasksOnNode0(), init_clock(), mpi_comm_world, IOR_test_t::next, NULL, IOR_param_t::numNodes, IOR_param_t::numTasks, IOR_param_t::numTasksOnNode0, out_logfile, IOR_test_t::params, QueryNodeMapping(), rank, SeedRandGen(), IOR_param_t::segmentCount, IOR_param_t::tasksBlockMapping, IOR_param_t::testComm, and ValidateTests().
Referenced by ior_main(), and ior_run().
int ior_main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 101 of file ior.c.
References aiori_finalize(), aiori_initialize(), IOR_param_t::backend, DestroyTests(), InitTests(), MPI_CHECK, mpi_comm_world, IOR_test_t::next, NULL, out_logfile, out_resultfile, IOR_test_t::params, ParseCommandLine(), PrintHeader(), PrintLongSummaryAllTests(), PrintTestEnds(), rank, ShowTestEnd(), ShowTestStart(), TestIoSys(), totalErrorCount, verbose, IOR_param_t::verbose, VERBOSE_0, 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 61 of file ior.c.
References aiori_finalize(), aiori_initialize(), IOR_param_t::backend, IOR_results_t::errors, InitTests(), MPI_CHECK, mpi_comm_world, IOR_test_t::next, NULL, out_logfile, out_resultfile, IOR_test_t::params, ParseCommandLine(), PrintHeader(), PrintLongSummaryAllTests(), PrintTestEnds(), rank, IOR_test_t::results, ShowTestEnd(), ShowTestStart(), TestIoSys(), totalErrorCount, verbose, IOR_param_t::verbose, and VERBOSE_0.
|
static |
Definition at line 1049 of file ior.c.
Referenced by HogMemory().
|
static |
Definition at line 708 of file ior.c.
References ERR, FILENAME_DELIMITER, and NULL.
Referenced by GetTestFileName().
|
static |
Definition at line 798 of file ior.c.
References ior_aiori::access, ERR, ERRF, MAX_STR, ior_aiori::mkdir, NULL, IOR_param_t::numTasks, rank, and rankOffset.
Referenced by GetTestFileName().
|
static |
Definition at line 851 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 TestIoSys().
|
static |
Definition at line 912 of file ior.c.
References ior_aiori::access, ior_aiori::delete, GetTestFileName(), out_logfile, rank, rankOffset, IOR_param_t::reorderTasksRandom, TRUE, verbose, and VERBOSE_3.
Referenced by TestIoSys().
int test_time_elapsed | ( | IOR_param_t * | params, |
double | startTime | ||
) |
Definition at line 1116 of file ior.c.
References GetTimeStamp(), and IOR_param_t::maxTimeDuration.
Referenced by TestIoSys().
|
static |
Definition at line 1225 of file ior.c.
References IOR_point_t::aggFileSizeFromStat, IO_BUFFERS::buffer, CheckFileSize(), CheckForOutliers(), 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, FALSE, file_hits_histogram(), IOR_param_t::filePerProc, FillBuffer(), ior_aiori::get_file_size, GetTestFileName(), GetTimeStamp(), HogMemory(), IOR_param_t::interTestDelay, IOR_param_t::intraTestBarriers, IOR_NB_TIMERS, IOR_param_t::keepFile, IOR_param_t::keepFileWithError, MAX_STR, MPI_CHECK, mpi_comm_world, 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_param_t::outlierThreshold, IOR_point_t::pairs_accessed, IOR_test_t::params, PrintLongSummaryHeader(), PrintLongSummaryOneTest(), PrintRemoveTiming(), PrintRepeatEnd(), PrintRepeatStart(), PrintShortSummary(), PrintTableHeader(), rank, rankOffset, READ, IOR_results_t::read, READCHECK, IO_BUFFERS::readCheckBuffer, IOR_param_t::readFile, ReadStoneWallingIterations(), ReduceIterResults(), 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_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, WRITE, IOR_results_t::write, WRITECHECK, IOR_param_t::writeFile, WriteOrRead(), WriteTimes(), XferBuffersFree(), and XferBuffersSetup().
Referenced by ior_main(), and ior_run().
|
static |
Definition at line 1564 of file ior.c.
References IOR_param_t::api, IOR_param_t::apiVersion, IOR_param_t::backend, IOR_param_t::blockSize, ior_aiori::check_params, IOR_param_t::checkRead, IOR_param_t::checkWrite, IOR_param_t::collective, ERR, ERRF, FALSE, IOR_param_t::filePerProc, IOR_param_t::fsync, IOR_param_t::fsyncPerWrite, GIBIBYTE, IOR_param_t::individualDataSets, init_IOR_Param_t(), IOR_param_t::interTestDelay, IOR_param_t::lustre_set_striping, IOR_param_t::noFill, IOR_param_t::numTasks, IOR_param_t::preallocate, IOR_param_t::randomOffset, IOR_param_t::readFile, IOR_param_t::reorderTasks, IOR_param_t::reorderTasksRandom, IOR_param_t::repetitions, IOR_param_t::segmentCount, IOR_param_t::setAlignment, IOR_param_t::setTimeStampSignature, IOR_param_t::showHints, IOR_param_t::singleXferAttempt, IOR_param_t::storeFileOffset, IOR_param_t::transferSize, TRUE, IOR_param_t::useExistingTestFile, IOR_param_t::useFileView, IOR_param_t::useSharedFilePointer, IOR_param_t::useStridedDatatype, WARN, WARN_RESET, and IOR_param_t::writeFile.
Referenced by InitTests().
|
static |
Definition at line 1924 of file ior.c.
References IOR_param_t::collective, CountErrors(), IOR_param_t::deadlineForStonewalling, ior_aiori::fsync, IOR_param_t::fsync, GetOffsetArrayRandom(), GetOffsetArraySequential(), GetTimeStamp(), MPI_CHECK, IOR_param_t::numTasks, out_logfile, IOR_point_t::pairs_accessed, IOR_param_t::randomOffset, rank, rankOffset, IOR_results_t::read, IOR_point_t::stonewall_avg_data_accessed, IOR_point_t::stonewall_min_data_accessed, IOR_point_t::stonewall_time, IOR_param_t::stoneWallingWearOut, IOR_param_t::stoneWallingWearOutIterations, testComm, totalErrorCount, TRUE, verbose, VERBOSE_1, WRITE, IOR_results_t::write, WRITECHECK, and WriteOrReadSingle().
Referenced by TestIoSys().
|
static |
Definition at line 1856 of file ior.c.
References IO_BUFFERS::buffer, IO_BUFFERS::checkBuffer, CompareBuffers(), ERR, FillBuffer(), IOR_param_t::interIODelay, NULL, IOR_param_t::offset, READ, READCHECK, IO_BUFFERS::readCheckBuffer, IOR_param_t::storeFileOffset, IOR_param_t::transferSize, TRUE, WRITE, WRITECHECK, and ior_aiori::xfer.
Referenced by WriteOrRead().
|
static |
Definition at line 1160 of file ior.c.
References IOR_param_t::id, IOR_NB_TIMERS, MAX_STR, out_logfile, rank, and WRITE.
Referenced by TestIoSys().
|
static |
Definition at line 1029 of file ior.c.
References aligned_buffer_free(), IO_BUFFERS::buffer, IO_BUFFERS::checkBuffer, IOR_param_t::checkRead, IOR_param_t::checkWrite, and IO_BUFFERS::readCheckBuffer.
Referenced by TestIoSys().
|
static |
Definition at line 1011 of file ior.c.
References aligned_buffer_alloc(), IO_BUFFERS::buffer, IO_BUFFERS::checkBuffer, IOR_param_t::checkRead, IOR_param_t::checkWrite, IO_BUFFERS::readCheckBuffer, and IOR_param_t::transferSize.
Referenced by TestIoSys().
|
static |
Definition at line 49 of file ior.c.
Referenced by updateParsedOptions().
char** environ |
Referenced by DistributeHints().
unsigned int reseed_incompressible_prng = TRUE |
Definition at line 626 of file ior.c.
Referenced by FillBuffer(), and TestIoSys().
|
static |
Definition at line 48 of file ior.c.
Referenced by CountErrors(), ior_main(), ior_run(), and WriteOrRead().