Skip to content

Commit

Permalink
Merge pull request #287 from alexandrelimassantana/develop
Browse files Browse the repository at this point in the history
ITF-Jenkins integration rework for individual steps per fixture
  • Loading branch information
leobago authored Apr 9, 2020
2 parents da0af17 + 978db42 commit d0bc01b
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 39 deletions.
42 changes: 29 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -1071,22 +1071,38 @@ def cmakesteps(list) {
}
}


def run_itf_tests(name) {
tests = labelledShell (
label: "List ${name} tests",
script: "find build/testing/${name} -name '*.fixture' | sed s/.fixture//",
returnStdout: true
).trim()

for( String test : tests.split('\n'))
labelledShell (
label: "ITF Test driver with fixture: ${test}",
script: "build/testing/ci/itf_driver.sh ${test}"
)
}


pipeline {
agent none
agent none

stages {
stages {

stage('ITF Local Tests') {
agent { docker { image 'kellekai/archlinuxopenmpi1.10:stable' } }
steps {
labelledShell (
label: 'FTI build for tests with all IOs',
script: "./install.sh --enable-hdf5 --enable-sionlib --sionlib-path=/opt/sionlib"
)
run_itf_tests('local')
}
}

stage('ITF Local Tests') {
agent { docker { image 'kellekai/archlinuxopenmpi1.10:stable' } }

steps {
sh 'testing/ci/build.sh' // Command to build for tests
catchError {
sh 'build/testing/ci/localtests.sh' // Commands only installed after build
}
}
}

stage('Intel Compiler Tests (1/2)') {
agent {
docker {
Expand Down
2 changes: 1 addition & 1 deletion testing/ci/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -------------------------- Installing Tests for CI --------------------------
configure_file(localtests.sh ${CMAKE_CURRENT_BINARY_DIR}/localtests.sh @ONLY)
configure_file(itf_driver.sh ${CMAKE_CURRENT_BINARY_DIR}/itf_driver.sh @ONLY)
3 changes: 0 additions & 3 deletions testing/ci/build.sh

This file was deleted.

3 changes: 1 addition & 2 deletions testing/ci/localtests.sh → testing/ci/itf_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

export MPIRUN_ARGS=--oversubscribe

fixtures=$(find '@testing_dir@/local' -name '*.fixture' | sed s/.fixture//)
@itf_run_cmd@ ${fixtures[@]}
@itf_run_cmd@ $@
retval=$?

unset MPIRUN_ARGS
Expand Down
1 change: 0 additions & 1 deletion testing/local/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ if (ENABLE_GPU)
add_executable(checkAll.exe checkAll.c cudaTest.cu)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGPUSUPPORT")
endif()
set(CMAKE_VERBOSE_MAKEFILE on)

if (ENABLE_GPU)
target_link_libraries(check-gpu.exe fti.static ${MPI_C_LIBRARIES} m)
Expand Down
2 changes: 1 addition & 1 deletion testing/local/diffckpt/dCP-standard.fixture
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ runtest() {
/Ckpt. ID 7/ {VAL=0}
' $itf_tstdout
check_is_zero $? 'dCP encoded size differ'

assert_equals $(grep $TEST_MODE $itf_tstdout | wc -l) $mode_msg_count \
'There should be dCP messages for every rank'
}
Expand Down
4 changes: 4 additions & 0 deletions testing/local/diffckpt/dCP-standard.suite
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
--iolib 1 --head 0 --mode ICP
--iolib 1 --head 1 --mode NOICP
--iolib 1 --head 1 --mode ICP
--iolib 3 --head 0 --mode NOICP
--iolib 3 --head 0 --mode ICP
--iolib 3 --head 1 --mode NOICP
--iolib 3 --head 1 --mode ICP
16 changes: 8 additions & 8 deletions testing/local/diffckpt/diff_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@
printf( "[WARNING-%d] " MSG "\n", grank, ##__VA_ARGS__); \
} while (0)

#define DBG_MSG(MSG,RANK,...) do { \
#define INFO_MSG(MSG,...) do { \
int rank; \
MPI_Comm_rank(FTI_COMM_WORLD,&rank); \
if ( rank == RANK ) \
printf( "%s:%d[DEBUG-%d] " MSG "\n", __FILE__,__LINE__,rank, ##__VA_ARGS__); \
if ( RANK == -1 ) \
printf( "%s:%d[DEBUG-%d] " MSG "\n", __FILE__,__LINE__,rank, ##__VA_ARGS__); \
if ( rank == 0 ) \
printf( "%s:%d[INFO] " MSG "\n", __FILE__,__LINE__, ##__VA_ARGS__); \
} while (0)

#define INFO_MSG(MSG,...) do { \
#define DBG_MSG_APP(MSG,RANK,...) do { \
int rank; \
MPI_Comm_rank(FTI_COMM_WORLD,&rank); \
if ( rank == 0 ) \
printf( "%s:%d[INFO] " MSG "\n", __FILE__,__LINE__,rank, ##__VA_ARGS__); \
if ( rank == RANK ) \
printf( "%s:%d[DEBUG-%d] " MSG "\n", __FILE__,__LINE__,rank, ##__VA_ARGS__); \
if ( RANK == -1 ) \
printf( "%s:%d[DEBUG-%d] " MSG "\n", __FILE__,__LINE__,rank, ##__VA_ARGS__); \
} while (0)

#define KB (1024L)
Expand Down
18 changes: 9 additions & 9 deletions testing/local/diffckpt/diff_test_func.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void init( char *fti_cfgfile, dcp_info_t * info, unsigned long alloc_size ) {
INFO_MSG("TEST MODE -> NOICP");
}

//DBG_MSG("alloc_size: %lu",0,alloc_size);
//DBG_MSG_APP("alloc_size: %lu",0,alloc_size);
init_share();

// init pattern
Expand Down Expand Up @@ -205,7 +205,7 @@ void xor_data( int id, dcp_info_t *info ) {
info->xor_info[id].nunits[idx] = ((unsigned long)(info->xor_info[id].share * eff_size))/UI_UNIT;
assert(info->xor_info[id].nunits[idx]*UI_UNIT < info->size[idx]);
unsigned long idxul;
//DBG_MSG("size[%d]: %lu, offset: %d, udsize: %lu",0,idx,info->size[idx],info->xor_info[id].offset[idx], info->xor_info[id].nunits[idx]*UI_UNIT);
//DBG_MSG_APP("size[%d]: %lu, offset: %d, udsize: %lu",0,idx,info->size[idx],info->xor_info[id].offset[idx], info->xor_info[id].nunits[idx]*UI_UNIT);
char *ptr = (char*)(void*)((uintptr_t)info->buffer[idx]+(uintptr_t)info->xor_info[id].offset[idx]);
unsigned long cnt = 0;
for ( idxul=0; idxul<info->xor_info[id].nunits[idx]; ++idxul ) {
Expand Down Expand Up @@ -240,7 +240,7 @@ void xor_data( int id, dcp_info_t *info ) {
long dcpStats[2];
long sendBuf[] = { ckptsize, update };
MPI_Reduce( sendBuf, dcpStats, 2, MPI_LONG, MPI_SUM, 0, FTI_COMM_WORLD );
DBG_MSG("changed: %lu, of: %lu, expected dCP update (min): %.2lf", 0, dcpStats[1], dcpStats[0], 100*((double)dcpStats[1])/dcpStats[0]);
DBG_MSG_APP("changed: %lu, of: %lu, expected dCP update (min): %.2lf", 0, dcpStats[1], dcpStats[0], 100*((double)dcpStats[1])/dcpStats[0]);
}

void invert_data( dcp_info_t *info ) {
Expand Down Expand Up @@ -278,10 +278,10 @@ void allocate_buffers( dcp_info_t * info, unsigned long alloc_size) {
EXIT_STD_ERR("idx: %d, cannot allocate %lu bytes", idx, info->size[idx]);
}
allocated += info->size[idx];
//DBG_MSG("idx: %d, allocated (variable): %lu, share: %.2lf%%",0,idx, info->size[idx], share*100);
//DBG_MSG_APP("idx: %d, allocated (variable): %lu, share: %.2lf%%",0,idx, info->size[idx], share*100);
}
if ( allocated != alloc_size ) {
//DBG_MSG("allocated: %lu but to allocate is: %lu",0,allocated,alloc_size);
//DBG_MSG_APP("allocated: %lu but to allocate is: %lu",0,allocated,alloc_size);
unsigned long rest = alloc_size-allocated;
allocated += rest;
info->size[idx-1] += rest;
Expand All @@ -291,7 +291,7 @@ void allocate_buffers( dcp_info_t * info, unsigned long alloc_size) {
}
}
unsigned long ckptsize = allocated + sizeof(int) + NUM_DCKPT*sizeof(xor_info_t) + sizeof(unsigned int);
//DBG_MSG("allocated (total): %lu, [ckptsize: %lu]", -1, allocated, ckptsize);
//DBG_MSG_APP("allocated (total): %lu, [ckptsize: %lu]", -1, allocated, ckptsize);
assert ( ( alloc_size == allocated ) );
}
unsigned long reallocate_buffers( dcp_info_t * info, unsigned long _alloc_size, enum ALLOC_FLAGS ALLOC_FLAG ) {
Expand All @@ -310,16 +310,16 @@ unsigned long reallocate_buffers( dcp_info_t * info, unsigned long _alloc_size,
info->oldsize[idx] = info->size[idx];
info->size[idx] = (unsigned long)(share*alloc_size);
allocated += info->size[idx];
//DBG_MSG("idx: %d, re-allocated (variable) : %lu, share: %.2lf%%",0,idx, info->size[idx], share*100);
//DBG_MSG_APP("idx: %d, re-allocated (variable) : %lu, share: %.2lf%%",0,idx, info->size[idx], share*100);
}
if ( allocated != alloc_size ) {
//DBG_MSG("reallocated: %lu but to reallocate is: %lu",0,allocated,alloc_size);
//DBG_MSG_APP("reallocated: %lu but to reallocate is: %lu",0,allocated,alloc_size);
unsigned long rest = alloc_size-allocated;
allocated += rest;
info->size[idx-1] += rest;
}
unsigned long ckptsize = allocated + sizeof(int) + NUM_DCKPT*sizeof(xor_info_t) + sizeof(unsigned int);
//DBG_MSG("re-allocated (total): %lu, [ckptsize: %lu]", -1, allocated, ckptsize);
//DBG_MSG_APP("re-allocated (total): %lu, [ckptsize: %lu]", -1, allocated, ckptsize);
assert ( ( alloc_size == allocated ) );
return alloc_size;
}
Expand Down
1 change: 1 addition & 0 deletions testing/local/keepL4Ckpt/keepl4.fixture
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ runtest() {
for i in "${must_be_in_l4[@]}"; do
check_file_exists $globaldir/$exec_id/l4_archive/Ckpt*-Rank$i.fti
done
pass
else
# This should fail because there is no such directory
ls $globaldir/$exec_id 2>> /dev/null
Expand Down
2 changes: 1 addition & 1 deletion testing/local/staging/massive.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define FILES_PER_ITER 10L
#define CLEAN_FREQ 10
#define F_BUFF 512
#define F_FORM "file-rank%04d-iter%05d-numb%02d.fti"
#define F_FORM "file-rank%04d-iter%05lu-numb%02lu.fti"
#define REMOTE_DIR "./rdir"

void createFile( char *fn );
Expand Down

0 comments on commit d0bc01b

Please sign in to comment.