Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/cuda/configure.ac
ViewVC logotype

Diff of /branches/cuda/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5597, Mon Jun 21 17:51:35 2021 UTC revision 5619, Thu Jul 29 22:04:52 2021 UTC
# Line 345  Line 345 
345    else    else
346      AC_MSG_RESULT([$NVCC])      AC_MSG_RESULT([$NVCC])
347      CUDA_ENABLED=true      CUDA_ENABLED=true
348        LIBS_CUDA="-lcuda -lcudart -lcublas"
349      fi
350      AC_MSG_CHECKING([checking for CUDA libraries in path])
351      if test x"$CUDA_HOME" == xnone ; then
352          for CUDA in cuda cuda-9.0 cuda-9.2 cuda-10.0 cuda-10.1 cuda-10.2 cuda-11.0 cuda-11.1 cuda-11.2 cuda-11.3 cuda-11.4 ; do
353            if test -d /usr/local/$CUDA/include/ ; then
354              CUDA_HOME=/usr/local/$CUDA
355              break
356            fi
357          done
358      fi
359      if test x"$CUDA_HOME" != xnone ; then
360          CUDA_LIB="$CUDA_HOME/lib"
361          AC_DEFINE([CUDA_LIB])
362          AC_SUBST([CUDA_LIB])
363          CPPFLAGS_CUDA="-I$CUDA_HOME/include"
364          AC_MSG_RESULT($CUDA_LIB)
365          AC_MSG_CHECKING([checking compatible CUDA version])
366          CUDA_VERSION=m4_esyscmd_s([cat $CUDA_HOME/version.txt | cut -c 14- | cut -f1 -d "." ])
367          if ((test "$CUDA_VERSION" == "9") || (test "$CUDA_VERSION" == "10") || (test "$CUDA_VERSION" == "11")) ; then
368            AC_MSG_RESULT([yes])
369          else
370            AC_MSG_WARN([CUDA version $CUDA_VERSION is not officially supported but may work - Use at your own risk - Officially we support versions 9 through 11])
371          fi
372        else
373          AC_MSG_ERROR([CUDA_HOME not set - diderotc will not be able to link correctly])
374    fi    fi
375  else  else
376    NVCC=":"    NVCC=":"
# Line 352  Line 378 
378  fi  fi
379  AC_SUBST(NVCC)  AC_SUBST(NVCC)
380  AC_SUBST(CUDA_ENABLED)  AC_SUBST(CUDA_ENABLED)
381  AC_SUBST(LIBS_CUDA)     # TODO  AC_SUBST(LIBS_CUDA)
382  AC_SUBST(CPPFLAGS_CUDA) # TODO  AC_SUBST(CPPFLAGS_CUDA)
383    
384  #################### end CUDA configuration ####################  #################### end CUDA configuration ####################
385    
# Line 409  Line 435 
435        if test x"$CUDA_HOME" != xnone ; then        if test x"$CUDA_HOME" != xnone ; then
436          HAVE_CL_H="yes"          HAVE_CL_H="yes"
437          CL_HEADER="$CUDA_HOME/include/CL/cl.h"          CL_HEADER="$CUDA_HOME/include/CL/cl.h"
438            CUDA_LIB_CL="-L$CUDA_HOME/lib"
439            AC_DEFINE([CUDA_LIB_CL])
440            AC_SUBST([CUDA_LIB_CL])
441            AC_MSG_RESULT([$CUDA_LIB_CL])
442          AC_DEFINE([HAVE_CL_CL_H])          AC_DEFINE([HAVE_CL_CL_H])
443          CPPFLAGS_CL="-I$CUDA_HOME/include"          CPPFLAGS_CL="-I$CUDA_HOME/include"
444        fi        fi
# Line 832  Line 862 
862    MK_BUILD_DIR(rt-par-log, parallel, [parallel logging])    MK_BUILD_DIR(rt-par-log, parallel, [parallel logging])
863  fi  fi
864    
865    if test x"$CUDA_ENABLED" = xtrue; then
866      MK_BUILD_DIR(rt-cuda, cuda, [])
867      MK_BUILD_DIR(rt-cuda-debug, cuda, [debug])
868    fi
869    
870    
871  #if test x"$CL_ENABLED" = xtrue ; then  #if test x"$CL_ENABLED" = xtrue ; then
872  #  MK_BUILD_DIR(rt-cl-f, opencl, [float])  #  MK_BUILD_DIR(rt-cl-f, opencl, [float])
873  #  MK_BUILD_DIR(rt-cl-d, opencl, [double])  #  MK_BUILD_DIR(rt-cl-d, opencl, [double])

Legend:
Removed from v.5597  
changed lines
  Added in v.5619

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0