Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added cuda, opencl and opencl-cpp dependencies #744

Merged
merged 1 commit into from Jul 7, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmssw-tool-conf.spec
Expand Up @@ -118,6 +118,9 @@ Requires: sloccount-toolfile
Requires: cvs2git-toolfile
Requires: pacparser-toolfile
Requires: git-toolfile
Requires: cuda-toolfile
Requires: opencl-toolfile
Requires: opencl-cpp-toolfile
Requires: qd-toolfile
Requires: blackhat-toolfile
Requires: sherpa-toolfile
Expand Down
40 changes: 40 additions & 0 deletions cuda-toolfile.spec
@@ -0,0 +1,40 @@
### RPM external cuda-toolfile 1.0
Requires: cuda
%prep

%build

%install

mkdir -p %{i}/etc/scram.d
cat << \EOF_TOOLFILE >%{i}/etc/scram.d/cuda.xml
<tool name="cuda" version="@TOOL_VERSION@">
<info url="https://developer.nvidia.com/cuda-toolkit"/>
<lib name="cublas"/>
<lib name="cublas_device"/>
<lib name="cudadevrt"/>
<lib name="cudart"/>
<lib name="cudart_static"/>
<lib name="cufft"/>
<lib name="cufftw"/>
<lib name="cuinj64"/>
<lib name="curand"/>
<lib name="cusparse"/>
<lib name="nppc"/>
<lib name="nppi"/>
<lib name="npps"/>
<lib name="nvToolsExt"/>
<client>
<environment name="CUDA_BASE" default="@TOOL_ROOT@/installation"/>
<environment name="NVCC" default="$CUDA_BASE/bin/nvcc"/>
<environment name="BINDIR" default="$CUDA_BASE/bin"/>
<environment name="LIBDIR" default="$CUDA_BASE/lib64"/>
<environment name="INCLUDE" default="$CUDA_BASE/include"/>
</client>
<flags CUDA_CFLAGS="-fPIC"/>
<flags CUDA_FLAGS="-gencode arch=compute_35,code=sm_35"/>
<runtime name="PATH" value="$CUDA_BASE/bin" type="path"/>
</tool>
EOF_TOOLFILE

## IMPORT scram-tools-post
7 changes: 7 additions & 0 deletions cuda.spec
@@ -0,0 +1,7 @@
### RPM external cuda 1.0
## NOCOMPILER
%prep
%build
%install
%post
ln -s /usr/local/cuda $RPM_INSTALL_PREFIX/%{pkgrel}/installation
25 changes: 25 additions & 0 deletions opencl-cpp-toolfile.spec
@@ -0,0 +1,25 @@
### RPM external opencl-cpp-toolfile 1.0

Requires: opencl-cpp

%prep
# NOP

%build
# NOP

%install

mkdir -p %{i}/etc/scram.d
cat << \EOF_TOOLFILE >%{i}/etc/scram.d/opencl-cpp.xml
<tool name="opencl-cpp" version="@TOOL_VERSION@">
<info url="http://www.khronos.org/registry/cl/"/>
<client>
<environment name="OPENCL_CPP_BASE" default="@TOOL_ROOT@"/>
<environment name="INCLUDE" default="$OPENCL_CPP_BASE/include"/>
</client>
<use name="opencl"/>
</tool>
EOF_TOOLFILE

## IMPORT scram-tools-post
16 changes: 16 additions & 0 deletions opencl-cpp.spec
@@ -0,0 +1,16 @@
### RPM external opencl-cpp 1.1
## NOCOMPILER

Source0: http://www.khronos.org/registry/cl/api/%{realversion}/cl.hpp

Requires: opencl

%prep
# NOP

%build
# NOP

%install
mkdir -p %{i}/include/CL
cp %{SOURCE0} %{i}/include/CL
26 changes: 26 additions & 0 deletions opencl-toolfile.spec
@@ -0,0 +1,26 @@
### RPM external opencl-toolfile 1.0

Requires: opencl

%prep
# NOP

%build
# NOP

%install

mkdir -p %{i}/etc/scram.d
cat << \EOF_TOOLFILE >%{i}/etc/scram.d/opencl.xml
<tool name="opencl" version="@TOOL_VERSION@">
<info url="https://www.khronos.org/opencl/"/>
<lib name="OpenCL"/>
<client>
<environment name="OPENCL_BASE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$OPENCL_BASE/lib64"/>
<environment name="INCLUDE" default="$OPENCL_BASE/include"/>
</client>
</tool>
EOF_TOOLFILE

## IMPORT scram-tools-post
15 changes: 15 additions & 0 deletions opencl.spec
@@ -0,0 +1,15 @@
### RPM external opencl 1.1
## NOCOMPILER

%prep
# NOP

%build
# NOP

%install
# NOP

%post
ln -s /usr/lib64/nvidia ${RPM_INSTALL_PREFIX}/%{pkgrel}/lib64
ln -s /usr/local/cuda/include ${RPM_INSTALL_PREFIX}/%{pkgrel}/include
14 changes: 11 additions & 3 deletions scram-project-build.file
@@ -1,7 +1,7 @@
### FILE scram-project-build
# FIXME: support building all platforms together like scram does?
# FIXME: automatic sub-packages for "doc" etc?

## NOCOMPILER
Requires: SCRAMV1

%define initenv %initenv_direct
Expand Down Expand Up @@ -35,7 +35,7 @@ Requires: SCRAMV1
%endif

%if "%{?configtag:set}" != "set"
%define configtag V05-01-27
%define configtag V05-01-28
%endif

%if "%{?useCmsTC:set}" != "set"
Expand All @@ -62,7 +62,9 @@ Requires: SCRAMV1
%define ucprojtype %(echo %n | sed -e "s|-patch||" | tr 'a-z' 'A-Z')
%endif
%define lcprojtype %(echo %ucprojtype | tr 'A-Z' 'a-z')
%if "%{?toolconf:set}" != "set"
%define toolconf %(echo %n | sed "s|-|_|g" | tr 'a-z' 'A-Z')_TOOL_CONF_ROOT
%endif

#define source0 %{configrepo}&obj=master/%{configtag}&module=%{cvsconfig}&export=config&output=/%configtar
%define source0 https://github.com/cms-sw/cmssw-config/archive/%{configtag}.tar.gz
Expand Down Expand Up @@ -99,6 +101,7 @@ Source4: findDependencies.pl
%prep
rm -rf config
rm -rf %{srctree}
rm -rf poison

%setup -T -b 0 -n cmssw-config-%(echo %{configtag} | sed 's/^.//')
# The following is a temporary hack until we move to 4.8.1
Expand All @@ -117,7 +120,12 @@ cd ..; mv cmssw-config-%(echo %{configtag} | sed 's/^.//') config

cd %_builddir
echo %{configtag} > %_builddir/config/config_tag
%_builddir/config/updateConfig.pl -p %{ucprojtype} -v %v -s $SCRAMV1_VERSION -t ${%{toolconf}} -a %cmsplatf
%_builddir/config/updateConfig.pl -p %{ucprojtype} -v %v -s $SCRAMV1_VERSION -t ${%{toolconf}} -a %cmsplatf \
%if "%{?gitcommit:set}" == "set"
--keys PROJECT_GIT_HASH=%{gitcommit}
%else
--keys PROJECT_GIT_HASH=%{realversion}
%endif

%{?PartialBootstrapPatch:%PartialBootstrapPatch}
%{?patchsrc:%patchsrc}
Expand Down