Skip to content

Commit 66827cf

Browse files
committed
Refactor cuinit into GPU_ASSERT function call, change access to seeds.txt to append instead of write
1 parent 28bcdec commit 66827cf

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

main.cu

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4835,11 +4835,7 @@ int main(int argc, char **argv) {
48354835
}
48364836
#endif
48374837

4838-
CUresult code = cuInit(0);
4839-
if (code != CUDA_SUCCESS) {
4840-
fprintf(stderr, "Cuda Init: %s (code %d)\n", code);
4841-
exit(EXIT_FAILURE);
4842-
}
4838+
GPU_ASSERT(cuInit(0));
48434839
GPU_ASSERT(cudaSetDevice(device));
48444840
// int numBlocks;
48454841
cudaDeviceProp prop;
@@ -4869,7 +4865,7 @@ int main(int argc, char **argv) {
48694865

48704866
printf("starting...\n");
48714867
uint64_t checkpointTemp = 0;
4872-
FILE* seedsout = fopen("seeds.txt", "w+");
4868+
FILE* seedsout = fopen("seeds.txt", "a+");
48734869
if(old_gpu){
48744870
block_min *= 2;
48754871
block_max *= 2;

0 commit comments

Comments
 (0)