diff -urpN JohnTheRipper-unstable-jumbo/src/cuda/pwsafe.cu JohnTheRipper-unstable-jumbo_multigpu/src/cuda/pwsafe.cu --- JohnTheRipper-unstable-jumbo/src/cuda/pwsafe.cu 2013-01-15 16:24:32.000000000 +0000 +++ JohnTheRipper-unstable-jumbo_multigpu/src/cuda/pwsafe.cu 2013-01-16 19:01:46.807046489 +0000 @@ -10,8 +10,8 @@ #include "../cuda_pwsafe.h" #include "cuda_common.cuh" -#define PWSAFE_IN_SIZE (KEYS_PER_CRYPT * sizeof(pwsafe_pass)) -#define PWSAFE_OUT_SIZE (KEYS_PER_CRYPT * sizeof(pwsafe_hash)) +#define PWSAFE_IN_SIZE (KEYS_PER_GPU * sizeof(pwsafe_pass)) +#define PWSAFE_OUT_SIZE (KEYS_PER_GPU * sizeof(pwsafe_hash)) #define PWSAFE_SALT_SIZE (sizeof(pwsafe_salt)) __global__ void kernel_pwsafe(pwsafe_pass * in, pwsafe_salt * salt, @@ -149,7 +149,11 @@ __global__ void kernel_pwsafe(pwsafe_pas extern "C" void gpu_pwpass(pwsafe_pass * host_in, pwsafe_salt * host_salt, pwsafe_hash * host_out) { - pwsafe_pass *cuda_pass = NULL; ///passwords + unsigned int gpu=0; + +//#define _DEFAULT_ +#ifdef _DEFAULT_ + pwsafe_pass *cuda_pass = NULL; ///passwords pwsafe_salt *cuda_salt = NULL; ///salt pwsafe_hash *cuda_hash = NULL; ///hashes @@ -175,5 +179,58 @@ extern "C" void gpu_pwpass(pwsafe_pass * cudaFree(cuda_pass); cudaFree(cuda_salt); cudaFree(cuda_hash); +#else + + //int runtimeVersion=0; + //cudaRuntimeGetVersion(&runtimeVersion); + //printf("Cuda runtime: %d.%d\n",runtimeVersion/1000,(runtimeVersion%100)/10); + + + //unsigned int TB=THREADS*BLOCKS; + pwsafe_pass *cuda_pass[GPUS]; ///passwords + pwsafe_salt *cuda_salt[GPUS]; ///salt + pwsafe_hash *cuda_hash[GPUS]; ///hashes + + puts("stage 0"); + ///Aloc memory and copy data to gpus + for(gpu=0;gpu>> (current_pass, current_salt, + current_hash); + + //cudaThreadSynchronize(); + HANDLE_ERROR(cudaGetLastError()); + } + puts("stage 2"); + for(gpu=0;gpu(b))?(a):(b)) diff -urpN JohnTheRipper-unstable-jumbo/src/Makefile JohnTheRipper-unstable-jumbo_multigpu/src/Makefile --- JohnTheRipper-unstable-jumbo/src/Makefile 2013-01-15 16:24:32.000000000 +0000 +++ JohnTheRipper-unstable-jumbo_multigpu/src/Makefile 2013-01-16 03:38:43.079127119 +0000 @@ -29,7 +29,7 @@ SORT = sort OMPFLAGS = # gcc with OpenMP #OMPFLAGS = -fopenmp -#OMPFLAGS = -fopenmp -msse2 +OMPFLAGS = -fopenmp -msse2 # Sun Studio with OpenMP (set the OMP_NUM_THREADS env var at runtime) #OMPFLAGS = -xopenmp # icc with OpenMP (for make target linux-x86-64-icc) @@ -46,7 +46,7 @@ OMPFLAGS = # Change sm_10 to sm_20 if you have Fermi support (400 series or later) or # sm_30 if you have Kepler (600 series or later) and your nvcc supports it. -NVCC_FLAGS = -c -Xptxas -v -arch sm_10 +NVCC_FLAGS = -c -Xptxas -v -arch sm_30 CUDAPATH = /usr/local/cuda/lib CUDA64PATH = /usr/local/cuda/lib64