-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarified some issues in the test framework and added example test. #219
- Loading branch information
1 parent
48eb188
commit a536649
Showing
6 changed files
with
46 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
LDFLAGS = $(extraLDFLAGS) | ||
LDADD = ../libaiori.a $(extraLDADD) | ||
|
||
# Add test here | ||
TESTS = testlib testexample | ||
check_PROGRAMS = $(TESTS) | ||
testexample_SOURCES = example.c | ||
testlib_SOURCES = lib.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include <assert.h> | ||
|
||
#include <ior.h> | ||
#include <ior-internal.h> | ||
|
||
// build a single test via, e.g., mpicc example.c -I ../src/ ../src/libaiori.a -lm | ||
|
||
int main(){ | ||
IOR_param_t test; | ||
init_IOR_Param_t(& test); | ||
test.blockSize = 10; | ||
test.transferSize = 10; | ||
test.segmentCount = 5; | ||
test.numTasks = 2; | ||
|
||
// having an individual file | ||
test.filePerProc = 1; | ||
|
||
IOR_offset_t * offsets; | ||
offsets = GetOffsetArraySequential(& test, 0); | ||
assert(offsets[0] == 0); | ||
assert(offsets[1] == 10); | ||
assert(offsets[2] == 20); | ||
assert(offsets[3] == 30); | ||
assert(offsets[4] == 40); | ||
// for(int i = 0; i < test.segmentCount; i++){ | ||
// printf("%lld\n", (long long int) offsets[i]); | ||
// } | ||
printf("OK\n"); | ||
return 0; | ||
} |