variables: GIT_STRATEGY: fetch GIT_SUBMODULE_STRATEGY: recursive # PREFIX: /usr/ DOCKER_FILE: utils/Dockerfile DOCKER_TAG: ${CI_COMMIT_REF_NAME} DOCKER_IMAGE_DEV: cricket # MAKE_OPTS: -j 16 before_script: - git config --local core.longpaths true - git submodule sync --recursive - git submodule update --init --recursive stages: - prepare - build - test # Stage: prepare ############################################################################## # Build docker image prepare:centos8:docker-dev: stage: prepare script: - docker build --file ${DOCKER_FILE} --tag ${DOCKER_IMAGE_DEV}:${DOCKER_TAG} --tag ${DOCKER_IMAGE_DEV}:latest . tags: - shell - linux prepare:centos8:cuda10: stage: prepare script: - docker build --file utils/Dockerfile.cuda10 --tag ${DOCKER_IMAGE_DEV}_cuda10:${DOCKER_TAG} --tag ${DOCKER_IMAGE_DEV}_cuda10:latest . tags: - shell - linux # check if styleguide is fulfilled #style_check: # stage: build # image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG} # allow_failure: true # tags: # - docker # script: # - ls # - utils/test_style.sh # Stage: build ############################################################################## build: stage: build script: - make -j 32 libtirpc - make -j 32 cuda-gdb - make -j 1 LOG=INFO artifacts: expire_in: 1 week paths: - bin image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG} cache: paths: - gpu/build - cpu/*.o - tests/*.o - tests/cpu/*.o - submodules/libtirpc/install - submodules/cuda-gdb/build - bin key: build tags: - docker build:ib: stage: build script: - make -j 32 libtirpc - make -j 32 cuda-gdb - make -j 1 LOG=INFO WITH_IB=yes artifacts: expire_in: 1 week paths: - bin image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG} cache: paths: - gpu/build - cpu/*.o - tests/*.o - tests/cpu/*.o - submodules/libtirpc/install - submodules/cuda-gdb/build - bin key: buildib tags: - docker build:cuda10: stage: build script: - make -j 32 libtirpc - make -j 32 cuda-gdb - make -j 1 LOG=INFO artifacts: expire_in: 1 week paths: - bin image: ${DOCKER_IMAGE_DEV}_cuda10:${DOCKER_TAG} cache: paths: - gpu/build - cpu/*.o - tests/*.o - tests/cpu/*.o - submodules/libtirpc/install - submodules/cuda-gdb/build - bin key: build_cuda10 tags: - docker build:debug: stage: build script: - make -j 32 libtirpc - make -j 32 cuda-gdb - make -j 1 LOG=INFO WITH_DEBUG=yes artifacts: expire_in: 1 week paths: - bin image: ${DOCKER_IMAGE_DEV}_cuda10:${DOCKER_TAG} cache: paths: - gpu/build - cpu/*.o - tests/*.o - tests/cpu/*.o - submodules/libtirpc/install - submodules/cuda-gdb/build - bin key: build_debug tags: - docker .remote-gpu: stage: test variables: GPU_TARGET: 'gitlab-runner@ghost' RDIR: '/tmp/gitlab-jobs/$CI_PROJECT_NAME/$CI_JOB_ID' LDIR: '$CI_BUILDS_DIR/$CI_PROJECT_PATH/bin' SAMPLES_PATH: '/usr/local/cuda/samples' script: - mkdir ~/.ssh && echo "-----BEGIN OPENSSH PRIVATE KEY-----" > ~/.ssh/id_rsa && echo $SSH_PRIVATE | sed "s/\S\{64\}/&\n/g" >> ~/.ssh/id_rsa && echo "-----END OPENSSH PRIVATE KEY-----" >> ~/.ssh/id_rsa && echo $SSH_PUBLIC > ~/.ssh/id_rsa.pub && echo $KNOWN_HOSTS > ~/.ssh/known_hosts && chmod 600 ~/.ssh/id_rsa - ssh $GPU_TARGET mkdir -p $RDIR - scp -r $LDIR/* $GPU_TARGET:$RDIR/ - ssh $GPU_TARGET "LD_PRELOAD=$RDIR/libtirpc.so.3:$RDIR/cricket-server.so $RDIR/$TEST_BINARY" & - sleep 2 - REMOTE_GPU_ADDRESS="ghost.acs-lab.eonerc.rwth-aachen.de" PATH=$LDIR:$PATH LD_PRELOAD=$LDIR/libtirpc.so.3:$LDIR/cricket-client.so $LDIR/$TEST_BINARY after_script: - ssh $GPU_TARGET rm -rf $RDIR - ssh $GPU_TARGET pkill -fe -2 $RDIR/test_kernel image: ${DOCKER_IMAGE_DEV}_cuda10:${DOCKER_TAG} dependencies: - build:cuda10 tags: - docker test:test_programs(1/2): stage: test script: - CRICKET_DISABLE_RPC=yes LD_LIBRARY_PATH="./bin:$LD_LIBRARY_PATH" bin/tests/test_list.test image: ${DOCKER_IMAGE_DEV}_cuda10:${DOCKER_TAG} dependencies: - build:debug tags: - docker test:test_programs(2/2): stage: test script: - CRICKET_DISABLE_RPC=yes LD_LIBRARY_PATH="./bin:$LD_LIBRARY_PATH" bin/tests/test_resource_mg.test image: ${DOCKER_IMAGE_DEV}_cuda10:${DOCKER_TAG} dependencies: - build:debug tags: - docker test:test_kernel: extends: .remote-gpu variables: TEST_BINARY: 'test_kernel' before_script: - source /global/modules_init.bash && module load gcc/4.9.4 test:samples:matrixMul: extends: .remote-gpu variables: TEST_BINARY: 'matrixMul' before_script: - source /global/modules_init.bash && module load gcc/4.9.4 - make -C $SAMPLES_PATH/0_Simple/matrixMul NVCCFLAGS="-m64 -cudart shared" GENCODE_FLAGS="-arch=sm_61" HOST_COMPILER=$(which g++) - cp $SAMPLES_PATH/0_Simple/matrixMul/matrixMul $LDIR test:samples:bandwidthTest: extends: .remote-gpu variables: TEST_BINARY: 'bandwidthTest' before_script: - source /global/modules_init.bash && module load gcc/4.9.4 - make -C $SAMPLES_PATH/1_Utilities/bandwidthTest NVCCFLAGS="-m64 -cudart shared" GENCODE_FLAGS="-arch=sm_61" HOST_COMPILER=$(which g++) - cp $SAMPLES_PATH/1_Utilities/bandwidthTest/bandwidthTest $LDIR