Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ cudaminer_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@ @CUDA_LIBS
cudaminer_CPPFLAGS = -msse2 @LIBCURL_CPPFLAGS@ @OPENMP_CFLAGS@ $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_INCLUDES) -DSCRYPT_KECCAK512 -DSCRYPT_CHACHA -DSCRYPT_CHOOSE_COMPILETIME

.cu.o:
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_10 --maxrregcount=64 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_20 --maxrregcount=64 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<

sha256.o: sha256.cu
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_10 --maxrregcount=64 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_20 --maxrregcount=64 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<

keccak.o: keccak.cu
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_10 --maxrregcount=64 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_20 --maxrregcount=64 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<

blake.o: blake.cu
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_10 --maxrregcount=64 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_20 --maxrregcount=64 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<

# NOTE: now compiling for compute 1.0 again, as it's using less power and runs way faster on Linux
fermi_kernel.o: fermi_kernel.cu
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_10 --maxrregcount=64 $(JANSSON_INCLUDES) -o $@ -c $<
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_20 --maxrregcount=64 $(JANSSON_INCLUDES) -o $@ -c $<

kepler_kernel.o: kepler_kernel.cu
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=sm_30 --maxrregcount=32 $(JANSSON_INCLUDES) -o $@ -c $<
Expand All @@ -63,7 +63,7 @@ titan_kernel.o: titan_kernel.cu

# NOTE: now compiling for compute 1.0 again, as it's using less power and runs way faster on Linux
test_kernel.o: test_kernel.cu
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_10 --maxrregcount=32 $(JANSSON_INCLUDES) -o $@ -c $<
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_20 --maxrregcount=32 $(JANSSON_INCLUDES) -o $@ -c $<

nv_kernel.o: nv_kernel.cu
$(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=sm_30 --maxrregcount=63 $(JANSSON_INCLUDES) -o $@ -c $<
Expand Down
19 changes: 16 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,14 @@ AC_CONFIG_FILES([

dnl find out what version we are running
ARCH=`uname -m`
if [[ $ARCH == "x86_64" ]];
OS=`uname -s`
SUFFIX=""
if [[ $ARCH == "x86_64" && $OS != "Darwin" ]];
then
SUFFIX="64"
else
SUFFIX=""
elif [[ $OS == "Darwin" ]];
then
CXXFLAGS="$CXXFLAGS -lc++"
fi

dnl Setup CUDA paths
Expand All @@ -154,6 +157,16 @@ else
CUDA_LDFLAGS="-L/usr/local/cuda/lib$SUFFIX"
NVCC="nvcc"
fi

dnl Setup OpenSSL path
AC_ARG_WITH([openssl],
[ --with-openssl=PATH prefix where openssl is isntalled])

if test -n "$with_openssl"
then
CFLAGS="$CFLAGS -I$with_openssl/include"
fi

AC_SUBST(CUDA_CFLAGS)
AC_SUBST(CUDA_LIBS)
AC_SUBST(CUDA_LDFLAGS)
Expand Down
4 changes: 4 additions & 0 deletions scrypt-jane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
#define scrypt_maxp 25 /* (1 << 25) = ~33 million */

#include <stdio.h>
#ifdef __APPLE__
#include <malloc/malloc.h>
#else
#include <malloc.h>
#endif

// ---------------------------- BEGIN keccak functions ------------------------------------

Expand Down
4 changes: 4 additions & 0 deletions scrypt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ using namespace Concurrency;
#include <string.h>

#include <emmintrin.h>
#ifdef __APPLE__
#include <malloc/malloc.h>
#else
#include <malloc.h>
#endif
#include <new>

// A thin wrapper around the builtin __m128i type
Expand Down
4 changes: 4 additions & 0 deletions sha3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

#include <string.h>
#include <stdio.h>
#ifdef __APPLE__
#include <malloc/malloc.h>
#else
#include <malloc.h>
#endif

#include "sha3.h"

Expand Down
2 changes: 2 additions & 0 deletions wrapnvml.cu
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ wrap_nvml_handle * wrap_nvml_create() {
#elif defined(__linux)
/* 64-bit linux assumed */
#define libnvidia_ml "/usr/lib/libnvidia-ml.so"
#elif defined(__APPLE__)
#define libnvidia_ml ""
#else
#error "Unrecognized platform: need NVML DLL path for this platform..."
#endif
Expand Down