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.
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, int access, IOR_io_buffers *ioBuffers) |
static void | WriteTimes (IOR_param_t *, double **, int, int) |
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, double **timer, int rep, int access) |
static void | CheckFileSize (IOR_test_t *test, IOR_offset_t dataMoved, int rep) |
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) |
static void * | safeMalloc (uint64_t size) |
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, int rep, 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 IOR_offset_t * | GetOffsetArraySequential (IOR_param_t *test, int pretendRank) |
static 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 |
|
static |
Definition at line 462 of file ior.c.
Referenced by XferBuffersSetup().
|
static |
Definition at line 488 of file ior.c.
Referenced by XferBuffersFree().
void AllocResults | ( | IOR_test_t * | test | ) |
Definition at line 502 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 291 of file ior.c.
References IOR_results_t::aggFileSizeForBW, IOR_results_t::aggFileSizeFromStat, IOR_results_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, and VERBOSE_0.
Referenced by TestIoSys().
|
static |
Definition at line 259 of file ior.c.
References DisplayOutliers(), IOR_param_t::numTasks, IOR_param_t::outlierThreshold, and WRITE.
Referenced by TestIoSys().
|
static |
Definition at line 330 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 430 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 523 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 539 of file ior.c.
References FreeResults().
Referenced by DestroyTests().
|
static |
Definition at line 545 of file ior.c.
References DestroyTest(), IOR_test_t::next, and NULL.
Referenced by ior_main().
|
static |
Definition at line 222 of file ior.c.
References 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 1034 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 622 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 605 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 512 of file ior.c.
References NULL, and IOR_test_t::results.
Referenced by DestroyTest().
|
static |
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 1709 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().
|
static |
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 1659 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 | ( | ) |
Definition at line 657 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 742 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 1094 of file ior.c.
References ERR, malloc_and_touch(), IOR_param_t::memoryPerNode, IOR_param_t::memoryPerTask, NULL, out_logfile, size, IOR_param_t::tasksPerNode, verbose, and VERBOSE_3.
Referenced by TestIoSys().
void init_IOR_Param_t | ( | IOR_param_t * | p | ) |
Definition at line 168 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::mmap_ptr, IOR_param_t::mode, mpi_comm_world, IOR_param_t::nodes, NULL, 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::tasksPerNode, 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 933 of file ior.c.
References IOR_param_t::blockSize, CountTasksPerNode(), DistributeHints(), IOR_param_t::expectedAggFileSize, init_clock(), MPI_CHECK, mpi_comm_world, IOR_test_t::next, IOR_param_t::nodes, NULL, IOR_param_t::numTasks, IOR_test_t::params, SeedRandGen(), IOR_param_t::segmentCount, size, tasksPerNode, IOR_param_t::tasksPerNode, IOR_param_t::testComm, and ValidateTests().
Referenced by ior_main(), and ior_run().
int ior_main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 93 of file ior.c.
References aiori_finalize(), aiori_initialize(), DestroyTests(), InitTests(), MPI_CHECK, mpi_comm_world, IOR_test_t::next, NULL, numTasksWorld, out_logfile, out_resultfile, IOR_test_t::params, ParseCommandLine(), PrintEarlyHeader(), 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 54 of file ior.c.
References IOR_results_t::errors, InitTests(), MPI_CHECK, mpi_comm_world, IOR_test_t::next, NULL, numTasksWorld, out_logfile, out_resultfile, IOR_test_t::params, ParseCommandLine(), PrintEarlyHeader(), PrintHeader(), PrintLongSummaryAllTests(), PrintTestEnds(), rank, IOR_test_t::results, ShowTestEnd(), ShowTestStart(), TestIoSys(), totalErrorCount, verbose, IOR_param_t::verbose, and VERBOSE_0.
|
static |
Definition at line 1012 of file ior.c.
Referenced by HogMemory().
|
static |
Definition at line 701 of file ior.c.
References ERR, FILENAME_DELIMITER, and NULL.
Referenced by GetTestFileName().
|
static |
Definition at line 791 of file ior.c.
References ERR, MAX_STR, NULL, IOR_param_t::numTasks, rank, and rankOffset.
Referenced by GetTestFileName().
|
static |
Definition at line 852 of file ior.c.
References IOR_results_t::aggFileSizeForBW, MPI_CHECK, PrintReducedResult(), rank, READ, IOR_results_t::readTime, IOR_test_t::results, testComm, verbose, VERBOSE_0, WRITE, and IOR_results_t::writeTime.
Referenced by TestIoSys().
|
static |
Definition at line 905 of file ior.c.
References ior_aiori::access, ior_aiori::delete, GetTestFileName(), rank, rankOffset, IOR_param_t::reorderTasksRandom, and TRUE.
Referenced by TestIoSys().
|
static |
Definition at line 493 of file ior.c.
Referenced by AllocResults().
int test_time_elapsed | ( | IOR_param_t * | params, |
double | startTime | ||
) |
Definition at line 1079 of file ior.c.
References GetTimeStamp(), and IOR_param_t::maxTimeDuration.
Referenced by TestIoSys().
|
static |
Definition at line 1123 of file ior.c.
References IOR_results_t::aggFileSizeFromStat, aiori_select(), IOR_param_t::api, IO_BUFFERS::buffer, CheckFileSize(), CheckForOutliers(), IOR_param_t::checkRead, IOR_param_t::checkWrite, ior_aiori::close, CountTasksPerNode(), ior_aiori::create, CurrentTimeString(), IOR_param_t::deadlineForStonewalling, DelaySecs(), ERR, ERR_SIMPLE, 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_param_t::keepFile, IOR_param_t::keepFileWithError, MAX_STR, MPI_CHECK, mpi_comm_world, IOR_param_t::multiFile, IOR_param_t::nodes, NULL, IOR_param_t::numTasks, numTasksWorld, ior_aiori::open, IOR_param_t::open, out_logfile, IOR_param_t::outlierThreshold, IOR_results_t::pairs_accessed, IOR_test_t::params, PrintLongSummaryHeader(), PrintLongSummaryOneTest(), PrintRemoveTiming(), PrintRepeatEnd(), PrintRepeatStart(), PrintShortSummary(), PrintTableHeader(), rank, rankOffset, 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::tasksPerNode, 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, WRITECHECK, IOR_param_t::writeFile, WriteOrRead(), WriteTimes(), XferBuffersFree(), and XferBuffersSetup().
Referenced by ior_main(), and ior_run().
|
static |
Definition at line 1483 of file ior.c.
References IOR_param_t::api, IOR_param_t::apiVersion, IOR_param_t::blockSize, IOR_param_t::checkRead, IOR_param_t::checkWrite, IOR_param_t::collective, ERR, 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, MAX_STR, 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 1837 of file ior.c.
References CountErrors(), IOR_param_t::deadlineForStonewalling, ior_aiori::fsync, IOR_param_t::fsync, GetOffsetArrayRandom(), GetOffsetArraySequential(), GetTimeStamp(), MPI_CHECK, IOR_param_t::numTasks, out_logfile, IOR_results_t::pairs_accessed, IOR_param_t::randomOffset, rank, rankOffset, IOR_results_t::stonewall_avg_data_accessed, IOR_results_t::stonewall_min_data_accessed, IOR_results_t::stonewall_time, IOR_param_t::stoneWallingWearOut, IOR_param_t::stoneWallingWearOutIterations, testComm, totalErrorCount, TRUE, verbose, VERBOSE_1, WRITE, and WriteOrReadSingle().
Referenced by TestIoSys().
|
static |
Definition at line 1779 of file ior.c.
References IO_BUFFERS::buffer, IO_BUFFERS::checkBuffer, CompareBuffers(), ERR, FillBuffer(), 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 1921 of file ior.c.
References ERR, IOR_param_t::id, MAX_STR, out_logfile, rank, READ, and WRITE.
Referenced by TestIoSys().
|
static |
Definition at line 992 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 974 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 43 of file ior.c.
Referenced by ParseCommandLine().
char** environ |
Referenced by DistributeHints().
unsigned int reseed_incompressible_prng = TRUE |
Definition at line 619 of file ior.c.
Referenced by FillBuffer(), and TestIoSys().
|
static |
Definition at line 42 of file ior.c.
Referenced by CountErrors(), ior_main(), ior_run(), and WriteOrRead().