Skip to content

Commit 3ee7880

Browse files
Third Partyax3l
authored andcommitted
Squashed 'thirdParty/cuda_memtest/' changes from 0e27280..6806362
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
1 parent 1588e88 commit 3ee7880

File tree

5 files changed

+38
-13
lines changed

5 files changed

+38
-13
lines changed

thirdParty/cuda_memtest/.travis.yml

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,55 @@
11
language: cpp
22

3+
sudo: required
4+
dist: trusty
5+
36
compiler:
47
- gcc
58
- clang
69

10+
matrix:
11+
allow_failures:
12+
- compiler: clang
13+
14+
addons:
15+
apt:
16+
#sources:
17+
# - multiverse
18+
packages:
19+
- build-essential
20+
- cmake-data
21+
- cmake
22+
- g++-4.8
23+
- gcc-4.8
24+
- nvidia-common
25+
# - nvidia-cuda-toolkit
26+
# - nvidia-cuda-dev
27+
728
env:
829
global:
930
- INSTALL_DIR=~/mylibs
1031
- NVML_FILE=cuda_346.46_gdk_linux.run
1132
- NVML_LINK=http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/
1233
matrix:
13-
- USE_NVML=1
14-
- USE_NVML=0
34+
- USE_NVML=1 USE_SM=sm_10
35+
- USE_NVML=0 USE_SM=sm_20
1536

1637
script:
1738
- mkdir build_tmp && cd build_tmp
18-
# CUDA 4.0 on travis... work-around missing atomicAdd
19-
- cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCUDA_ARCH=sm_10 -DSAME_NVCC_FLAGS_IN_SUBPROJECTS=ON $TRAVIS_BUILD_DIR
39+
- cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCUDA_ARCH=$USE_SM -DSAME_NVCC_FLAGS_IN_SUBPROJECTS=ON $TRAVIS_BUILD_DIR
2040
- make
2141
- make install
2242

23-
before_script:
43+
before_install:
44+
- sudo apt-add-repository multiverse
2445
- sudo apt-get update -qq
25-
- sudo apt-get install -qq build-essential
26-
- sudo apt-get install -qq gcc-4.4 g++-4.4
27-
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.4
46+
# nvcc 5.5: <= gcc 4.8
47+
# - sudo apt-get install -qq gcc-4.8 g++-4.8
48+
# - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
2849
- gcc --version && g++ --version
29-
- sudo apt-get install -qq nvidia-common
30-
- sudo apt-get install -qq nvidia-current
31-
- sudo apt-get install -qq nvidia-cuda-toolkit nvidia-cuda-dev
50+
- sudo apt-get install -qq nvidia-cuda-toolkit
51+
- sudo apt-get install -qq nvidia-cuda-dev
52+
- nvcc --version
3253
- if [ $USE_NVML -eq 1 ]; then wget $NVML_LINK$NVML_FILE && chmod u+x $NVML_FILE && sudo ./$NVML_FILE --silent --installdir=/ ; fi
3354
- if [ $USE_NVML -eq 1 ]; then export CMAKE_PREFIX_PATH=/usr/src/gdk/nvml/lib/ ; fi
3455
- sudo find /usr/ -name libcuda*.so

thirdParty/cuda_memtest/cuda_memtest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* University of Illinois/NCSA
55
* Open Source License
66
*
7-
* Copyright © 2009, University of Illinois. All rights reserved.
7+
* Copyright 2009, University of Illinois. All rights reserved.
88
*
99
* Developed by:
1010
*

thirdParty/cuda_memtest/misc.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ get_driver_info(char* info, unsigned int len)
4949
if ( fgets(info, len, file) == NULL){
5050
PRINTF("Warning: reading file failed\n");
5151
info[0] = 0;
52+
fclose(file);
5253
return;
5354
}
55+
fclose(file);
5456

5557
PRINTF("%s", info);
5658

thirdParty/cuda_memtest/ocl_memtest.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,11 @@ read_kernel_source(void)
149149
size_t rc = fread(kernel_source, 1, MAX_KERNEL_FILE_SIZE, fd);
150150
if (rc < 0 || rc >= MAX_KERNEL_FILE_SIZE){
151151
printf("ERROR: return value out of range for reading kernel file(rc=%lx)\n", rc);
152+
fclose(fd);
152153
exit(1);
153154
}
154155

156+
fclose(fd);
155157
return;
156158
}
157159

thirdParty/cuda_memtest/tests.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* University of Illinois/NCSA
55
* Open Source License
66
*
7-
* Copyright © 2009, University of Illinois. All rights reserved.
7+
* Copyright 2009, University of Illinois. All rights reserved.
88
*
99
* Developed by:
1010
*

0 commit comments

Comments
 (0)