Skip to content

Commit

Permalink
Squashed 'thirdParty/cuda_memtest/' changes from 0e27280..6806362
Browse files Browse the repository at this point in the history
6806362 Remove non-ascii chars
9bddbdf Merge pull request #9 from ComputationalRadiationPhysics/fix-travisCuda55Trusty
cb23b31 Merge pull request #7 from ComputationalRadiationPhysics/fix-closeFiles
2ad4d88 Travis: Migrate to Trusty Image
13e215e Close File Handles (cppcheck)

git-subtree-dir: thirdParty/cuda_memtest
git-subtree-split: 680636204b751c3e16e196ee95dc254ffae737db
  • Loading branch information
Third Party authored and ax3l committed Dec 8, 2016
1 parent bdb099a commit 3b03b9c
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 13 deletions.
43 changes: 32 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,55 @@
language: cpp

sudo: required
dist: trusty

compiler:
- gcc
- clang

matrix:
allow_failures:
- compiler: clang

addons:
apt:
#sources:
# - multiverse
packages:
- build-essential
- cmake-data
- cmake
- g++-4.8
- gcc-4.8
- nvidia-common
# - nvidia-cuda-toolkit
# - nvidia-cuda-dev

env:
global:
- INSTALL_DIR=~/mylibs
- NVML_FILE=cuda_346.46_gdk_linux.run
- NVML_LINK=http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/
matrix:
- USE_NVML=1
- USE_NVML=0
- USE_NVML=1 USE_SM=sm_10
- USE_NVML=0 USE_SM=sm_20

script:
- mkdir build_tmp && cd build_tmp
# CUDA 4.0 on travis... work-around missing atomicAdd
- cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCUDA_ARCH=sm_10 -DSAME_NVCC_FLAGS_IN_SUBPROJECTS=ON $TRAVIS_BUILD_DIR
- cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCUDA_ARCH=$USE_SM -DSAME_NVCC_FLAGS_IN_SUBPROJECTS=ON $TRAVIS_BUILD_DIR
- make
- make install

before_script:
before_install:
- sudo apt-add-repository multiverse
- sudo apt-get update -qq
- sudo apt-get install -qq build-essential
- sudo apt-get install -qq gcc-4.4 g++-4.4
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.4
# nvcc 5.5: <= gcc 4.8
# - sudo apt-get install -qq gcc-4.8 g++-4.8
# - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
- gcc --version && g++ --version
- sudo apt-get install -qq nvidia-common
- sudo apt-get install -qq nvidia-current
- sudo apt-get install -qq nvidia-cuda-toolkit nvidia-cuda-dev
- sudo apt-get install -qq nvidia-cuda-toolkit
- sudo apt-get install -qq nvidia-cuda-dev
- nvcc --version
- if [ $USE_NVML -eq 1 ]; then wget $NVML_LINK$NVML_FILE && chmod u+x $NVML_FILE && sudo ./$NVML_FILE --silent --installdir=/ ; fi
- if [ $USE_NVML -eq 1 ]; then export CMAKE_PREFIX_PATH=/usr/src/gdk/nvml/lib/ ; fi
- sudo find /usr/ -name libcuda*.so
Expand Down
2 changes: 1 addition & 1 deletion cuda_memtest.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* University of Illinois/NCSA
* Open Source License
*
* Copyright © 2009, University of Illinois. All rights reserved.
* Copyright 2009, University of Illinois. All rights reserved.
*
* Developed by:
*
Expand Down
2 changes: 2 additions & 0 deletions misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ get_driver_info(char* info, unsigned int len)
if ( fgets(info, len, file) == NULL){
PRINTF("Warning: reading file failed\n");
info[0] = 0;
fclose(file);
return;
}
fclose(file);

PRINTF("%s", info);

Expand Down
2 changes: 2 additions & 0 deletions ocl_memtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,11 @@ read_kernel_source(void)
size_t rc = fread(kernel_source, 1, MAX_KERNEL_FILE_SIZE, fd);
if (rc < 0 || rc >= MAX_KERNEL_FILE_SIZE){
printf("ERROR: return value out of range for reading kernel file(rc=%lx)\n", rc);
fclose(fd);
exit(1);
}

fclose(fd);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion tests.cu
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* University of Illinois/NCSA
* Open Source License
*
* Copyright © 2009, University of Illinois. All rights reserved.
* Copyright 2009, University of Illinois. All rights reserved.
*
* Developed by:
*
Expand Down

0 comments on commit 3b03b9c

Please sign in to comment.