timesubuntu14.04

ubuntu14.04  时间:2021-04-01  阅读:()
NVIDIACUDAINSTALLATIONGUIDEFORLINUXDU-05347-001_v10.
1|August2019InstallationandVerificationonLinuxSystemswww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|iiTABLEOFCONTENTSChapter1.
Introduction.
11.
1.
SystemRequirements.
11.
2.
AboutThisDocument.
3Chapter2.
Pre-installationActions.
42.
1.
VerifyYouHaveaCUDA-CapableGPU.
42.
2.
VerifyYouHaveaSupportedVersionofLinux.
52.
3.
VerifytheSystemHasgccInstalled.
52.
4.
VerifytheSystemhastheCorrectKernelHeadersandDevelopmentPackagesInstalled.
.
.
.
52.
5.
ChooseanInstallationMethod.
72.
6.
DownloadtheNVIDIACUDAToolkit.
72.
7.
HandleConflictingInstallationMethods.
7Chapter3.
PackageManagerInstallation.
93.
1.
Overview.
93.
2.
Redhat/CentOS.
103.
3.
Fedora.
113.
4.
SLES.
123.
5.
OpenSUSE.
123.
6.
Ubuntu.
133.
7.
AdditionalPackageManagerCapabilities.
133.
7.
1.
AvailablePackages.
133.
7.
2.
PackageUpgrades.
143.
7.
3.
MetaPackages.
14Chapter4.
RunfileInstallation.
164.
1.
Overview.
164.
2.
Installation.
164.
3.
InstallerUI.
184.
4.
DisablingNouveau.
184.
4.
1.
Fedora.
194.
4.
2.
RHEL/CentOS.
194.
4.
3.
OpenSUSE.
194.
4.
4.
SLES.
194.
4.
5.
Ubuntu.
194.
5.
DeviceNodeVerification.
204.
6.
AdvancedOptions.
204.
7.
Uninstallation.
22Chapter5.
ClusterManagementPackages.
235.
1.
Overview.
23Chapter6.
CUDACross-PlatformEnvironment.
246.
1.
CUDACross-PlatformInstallation.
246.
2.
CUDACross-PlatformSamples.
25www.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|iiiTARGET_ARCH.
25TARGET_OS.
25TARGET_FS.
25CrossCompilingtoARMarchitectures.
25CopyingLibraries.
266.
3.
NsightEclipseEdition.
26Chapter7.
Post-installationActions.
277.
1.
MandatoryActions.
277.
1.
1.
EnvironmentSetup.
277.
1.
2.
POWER9Setup.
287.
2.
RecommendedActions.
297.
2.
1.
InstallPersistenceDaemon.
297.
2.
2.
InstallWritableSamples.
297.
2.
3.
VerifytheInstallation.
297.
2.
3.
1.
VerifytheDriverVersion.
297.
2.
3.
2.
CompilingtheExamples.
307.
2.
3.
3.
RunningtheBinaries.
307.
2.
4.
InstallNsightEclipsePlugins.
317.
3.
OptionalActions.
327.
3.
1.
InstallThird-partyLibraries.
327.
3.
2.
Installthesourcecodeforcuda-gdb.
32Chapter8.
AdvancedSetup.
33Chapter9.
FrequentlyAskedQuestions.
37HowdoIinstalltheToolkitinadifferentlocation37WhydoIsee"nvcc:Nosuchfileordirectory"whenItrytobuildaCUDAapplication37WhydoIsee"errorwhileloadingsharedlibraries::cannotopensharedobjectfile:Nosuchfileordirectory"whenItrytorunaCUDAapplicationthatusesaCUDAlibrary.
.
.
37WhydoIseemultiple"404NotFound"errorswhenupdatingmyrepositorymeta-dataonUbuntu38HowcanItellXtoignoreaGPUforcompute-onlyuse38Whydoesn'tthecuda-repopackageinstalltheCUDAToolkitandDrivers38HowdoIgetCUDAtoworkonalaptopwithaniGPUandadGPUrunningUbuntu14.
0438WhatdoIdoifthedisplaydoesnotload,orCUDAdoesnotwork,afterperformingasystemupdate39HowdoIinstallaCUDAdriverwithaversionlessthan367usinganetworkrepo39HowdoIinstallanolderCUDAversionusinganetworkrepo39Chapter10.
AdditionalConsiderations.
41Chapter11.
RemovingCUDAToolkitandDriver.
42www.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|ivwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|1Chapter1.
INTRODUCTIONCUDAisaparallelcomputingplatformandprogrammingmodelinventedbyNVIDIA.
Itenablesdramaticincreasesincomputingperformancebyharnessingthepowerofthegraphicsprocessingunit(GPU).
CUDAwasdevelopedwithseveraldesigngoalsinmind:Provideasmallsetofextensionstostandardprogramminglanguages,likeC,thatenableastraightforwardimplementationofparallelalgorithms.
WithCUDAC/C++,programmerscanfocusonthetaskofparallelizationofthealgorithmsratherthanspendingtimeontheirimplementation.
SupportheterogeneouscomputationwhereapplicationsuseboththeCPUandGPU.
SerialportionsofapplicationsarerunontheCPU,andparallelportionsareoffloadedtotheGPU.
Assuch,CUDAcanbeincrementallyappliedtoexistingapplications.
TheCPUandGPUaretreatedasseparatedevicesthathavetheirownmemoryspaces.
ThisconfigurationalsoallowssimultaneouscomputationontheCPUandGPUwithoutcontentionformemoryresources.
CUDA-capableGPUshavehundredsofcoresthatcancollectivelyrunthousandsofcomputingthreads.
Thesecoreshavesharedresourcesincludingaregisterfileandasharedmemory.
Theon-chipsharedmemoryallowsparalleltasksrunningonthesecorestosharedatawithoutsendingitoverthesystemmemorybus.
ThisguidewillshowyouhowtoinstallandcheckthecorrectoperationoftheCUDAdevelopmenttools.
1.
1.
SystemRequirementsTouseCUDAonyoursystem,youwillneedthefollowinginstalled:CUDA-capableGPUAsupportedversionofLinuxwithagcccompilerandtoolchainNVIDIACUDAToolkit(availableathttp://developer.
nvidia.
com/cuda-downloads)TheCUDAdevelopmentenvironmentreliesontightintegrationwiththehostdevelopmentenvironment,includingthehostcompilerandCruntimelibraries,andIntroductionwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|2isthereforeonlysupportedondistributionversionsthathavebeenqualifiedforthisCUDAToolkitrelease.
Table1NativeLinuxDistributionSupportinCUDA10.
1Update2DistributionKernel*GCCGLIBCICCPGIXLCCLANGx86_64RHEL8.
04.
188.
2.
12.
28RHEL7.
63.
104.
8.
52.
17RHEL6.
102.
6.
324.
4.
72.
12CentOS7.
63.
104.
8.
52.
17CentOS6.
102.
6.
324.
4.
72.
12Fedora294.
168.
0.
12.
27OpenSUSELeap15.
04.
15.
07.
3.
12.
26SLES15.
04.
12.
147.
2.
12.
26SLES12.
44.
12.
144.
8.
52.
22Ubuntu18.
104.
18.
08.
2.
02.
28Ubuntu18.
04.
3(**)5.
0.
07.
4.
02.
27Ubuntu16.
04.
6(**)4.
45.
4.
02.
2319.
018.
x,19.
xNO8.
0.
0Ubuntu14.
04.
6(**)3.
134.
8.
42.
19————POWER8(***)RHEL7.
63.
104.
8.
52.
17NO18.
x,19.
x13.
1.
x,16.
1.
x8.
0.
0Ubuntu18.
04.
14.
15.
07.
3.
02.
27NO18.
x,19.
x13.
1.
x,16.
1.
x8.
0.
0POWER9(****)Ubuntu18.
04.
14.
15.
07.
3.
02.
27NO18.
x,19.
x13.
1.
x,16.
1.
x8.
0.
0RHEL7.
6IBMPowerLE4.
14.
04.
8.
52.
17NO18.
x,19.
x13.
1.
x,16.
1.
x8.
0.
0(*)ForspecifickernelversionssupportedonRedHatEnterpriseLinux,visithttps://access.
redhat.
com/articles/3078.
ForalistofkernelversionsincludingthereleasedatesforSUSELinuxEnterpriseServerisavailableathttps://wiki.
microfocus.
com/index.
php/SUSE/SLES/Kernel_versions.
(**)ForUbuntuLTSonx86-64,boththeHWEkernel(e.
g.
4.
13.
xfor16.
04.
4)andtheserverLTSkernel(e.
g.
4.
4.
xfor16.
04)aresupportedinCUDA10.
1.
Visithttps://wiki.
ubuntu.
com/Kernel/Supportformoreinformation.
(***)OnlytheTeslaGP100GPUissupportedforCUDA10.
1onPOWER8.
(****)OnlytheTeslaGV100GPUissupportedforCUDA10.
1onPOWER9.
Introductionwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|31.
2.
AboutThisDocumentThisdocumentisintendedforreadersfamiliarwiththeLinuxenvironmentandthecompilationofCprogramsfromthecommandline.
YoudonotneedpreviousexperiencewithCUDAorexperiencewithparallelcomputation.
Note:ThisguidecoversinstallationonlyonsystemswithXWindowsinstalled.
Manycommandsinthisdocumentmightrequiresuperuserprivileges.
OnmostdistributionsofLinux,thiswillrequireyoutologinasroot.
Forsystemsthathaveenabledthesudopackage,usethesudoprefixforallnecessarycommands.
www.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|4Chapter2.
PRE-INSTALLATIONACTIONSSomeactionsmustbetakenbeforetheCUDAToolkitandDrivercanbeinstalledonLinux:VerifythesystemhasaCUDA-capableGPU.
VerifythesystemisrunningasupportedversionofLinux.
Verifythesystemhasgccinstalled.
Verifythesystemhasthecorrectkernelheadersanddevelopmentpackagesinstalled.
DownloadtheNVIDIACUDAToolkit.
Handleconflictinginstallationmethods.
Youcanoverridetheinstall-timeprerequisitechecksbyrunningtheinstallerwiththe-overrideflag.
RememberthattheprerequisiteswillstillberequiredtousetheNVIDIACUDAToolkit.
2.
1.
VerifyYouHaveaCUDA-CapableGPUToverifythatyourGPUisCUDA-capable,gotoyourdistribution'sequivalentofSystemProperties,or,fromthecommandline,enter:$lspci|grep-invidiaIfyoudonotseeanysettings,updatethePCIhardwaredatabasethatLinuxmaintainsbyenteringupdate-pciids(generallyfoundin/sbin)atthecommandlineandrerunthepreviouslspcicommand.
IfyourgraphicscardisfromNVIDIAanditislistedinhttp://developer.
nvidia.
com/cuda-gpus,yourGPUisCUDA-capable.
TheReleaseNotesfortheCUDAToolkitalsocontainalistofsupportedproducts.
Pre-installationActionswww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|52.
2.
VerifyYouHaveaSupportedVersionofLinuxTheCUDADevelopmentToolsareonlysupportedonsomespecificdistributionsofLinux.
ThesearelistedintheCUDAToolkitreleasenotes.
Todeterminewhichdistributionandreleasenumberyou'rerunning,typethefollowingatthecommandline:$uname-m&&cat/etc/*releaseYoushouldseeoutputsimilartothefollowing,modifiedforyourparticularsystem:x86_64RedHatEnterpriseLinuxWorkstationrelease6.
0(Santiago)Thex86_64lineindicatesyouarerunningona64-bitsystem.
Theremaindergivesinformationaboutyourdistribution.
2.
3.
VerifytheSystemHasgccInstalledThegcccompilerisrequiredfordevelopmentusingtheCUDAToolkit.
ItisnotrequiredforrunningCUDAapplications.
ItisgenerallyinstalledaspartoftheLinuxinstallation,andinmostcasestheversionofgccinstalledwithasupportedversionofLinuxwillworkcorrectly.
Toverifytheversionofgccinstalledonyoursystem,typethefollowingonthecommandline:$gcc--versionIfanerrormessagedisplays,youneedtoinstallthedevelopmenttoolsfromyourLinuxdistributionorobtainaversionofgccanditsaccompanyingtoolchainfromtheWeb.
2.
4.
VerifytheSystemhastheCorrectKernelHeadersandDevelopmentPackagesInstalledTheCUDADriverrequiresthatthekernelheadersanddevelopmentpackagesfortherunningversionofthekernelbeinstalledatthetimeofthedriverinstallation,aswellwheneverthedriverisrebuilt.
Forexample,ifyoursystemisrunningkernelversion3.
17.
4-301,the3.
17.
4-301kernelheadersanddevelopmentpackagesmustalsobeinstalled.
WhiletheRunfileinstallationperformsnopackagevalidation,theRPMandDebinstallationsofthedriverwillmakeanattempttoinstallthekernelheaderanddevelopmentpackagesifnoversionofthesepackagesiscurrentlyinstalled.
However,itwillinstallthelatestversionofthesepackages,whichmayormaynotmatchtheversionofthekernelyoursystemisusing.
Therefore,itisbesttomanuallyensurethePre-installationActionswww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|6correctversionofthekernelheadersanddevelopmentpackagesareinstalledpriortoinstallingtheCUDADrivers,aswellaswheneveryouchangethekernelversion.
Theversionofthekernelyoursystemisrunningcanbefoundbyrunningthefollowingcommand:$uname-rThisistheversionofthekernelheadersanddevelopmentpackagesthatmustbeinstalledpriortoinstallingtheCUDADrivers.
Thiscommandwillbeusedmultipletimesbelowtospecifytheversionofthepackagestoinstall.
Notethatbelowarethecommon-casescenariosforkernelusage.
Moreadvancedcases,suchascustomkernelbranches,shouldensurethattheirkernelheadersandsourcesmatchthekernelbuildtheyarerunning.
Ifyouperformasystemupdatewhichchangestheversionofthelinuxkernelbeingused,makesuretorerunthecommandsbelowtoensureyouhavethecorrectkernelheadersandkerneldevelopmentpackagesinstalled.
Otherwise,theCUDADriverwillfailtoworkwiththenewkernel.
RHEL/CentOSThekernelheadersanddevelopmentpackagesforthecurrentlyrunningkernelcanbeinstalledwith:$sudoyuminstallkernel-devel-$(uname-r)kernel-headers-$(uname-r)FedoraThekernelheadersanddevelopmentpackagesforthecurrentlyrunningkernelcanbeinstalledwith:$sudodnfinstallkernel-devel-$(uname-r)kernel-headers-$(uname-r)OpenSUSE/SLESUsetheoutputoftheunamecommandtodeterminetherunningkernel'sversionandvariant:$uname-r3.
16.
6-2-defaultInthisexample,theversionis3.
16.
6-2andthevariantisdefault.
Thekernelheadersanddevelopmentpackagescanthenbeinstalledwiththefollowingcommand,replacingandwiththevariantandversiondiscoveredfromthepreviousunamecommand:$sudozypperinstallkernel--devel=Pre-installationActionswww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|7UbuntuThekernelheadersanddevelopmentpackagesforthecurrentlyrunningkernelcanbeinstalledwith:$sudoapt-getinstalllinux-headers-$(uname-r)2.
5.
ChooseanInstallationMethodTheCUDAToolkitcanbeinstalledusingeitheroftwodifferentinstallationmechanisms:distribution-specificpackages(RPMandDebpackages),oradistribution-independentpackage(runfilepackages).
Thedistribution-independentpackagehastheadvantageofworkingacrossawidersetofLinuxdistributions,butdoesnotupdatethedistribution'snativepackagemanagementsystem.
Thedistribution-specificpackagesinterfacewiththedistribution'snativepackagemanagementsystem.
Itisrecommendedtousethedistribution-specificpackages,wherepossible.
Standaloneinstallersarenotprovidedforarchitecturesotherthanthex86_64release.
Forbothnativeaswellascrossdevelopment,thetoolkitmustbeinstalledusingthedistribution-specificinstaller.
SeetheCUDACross-PlatformInstallationsectionformoredetails.
2.
6.
DownloadtheNVIDIACUDAToolkitTheNVIDIACUDAToolkitisavailableathttp://developer.
nvidia.
com/cuda-downloads.
ChoosetheplatformyouareusinganddownloadtheNVIDIACUDAToolkitTheCUDAToolkitcontainstheCUDAdriverandtoolsneededtocreate,buildandrunaCUDAapplicationaswellaslibraries,headerfiles,CUDAsamplessourcecode,andotherresources.
DownloadVerificationThedownloadcanbeverifiedbycomparingtheMD5checksumpostedathttp://developer.
nvidia.
com/cuda-downloads/checksumswiththatofthedownloadedfile.
Ifeitherofthechecksumsdiffer,thedownloadedfileiscorruptandneedstobedownloadedagain.
TocalculatetheMD5checksumofthedownloadedfile,runthefollowing:$md5sum2.
7.
HandleConflictingInstallationMethodsBeforeinstallingCUDA,anypreviouslyinstallationsthatcouldconflictshouldbeuninstalled.
ThiswillnotaffectsystemswhichhavenothadCUDAinstalledpreviously,Pre-installationActionswww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|8orsystemswheretheinstallationmethodhasbeenpreserved(RPM/Debvs.
Runfile).
Seethefollowingchartsforspecifics.
Table2CUDAToolkitInstallationCompatibilityMatrixInstalledToolkitVersion==X.
YInstalledToolkitVersion!
=X.
YRPM/DebrunRPM/DebrunRPM/DebNoActionUninstallRunNoActionNoActionInstallingToolkitVersionX.
YrunUninstallRPM/DebUninstallRunNoActionNoActionTable3NVIDIADriverInstallationCompatibilityMatrixInstalledDriverVersion==X.
YInstalledDriverVersion!
=X.
YRPM/DebrunRPM/DebrunRPM/DebNoActionUninstallRunNoActionUninstallRunInstallingDriverVersionX.
YrunUninstallRPM/DebNoActionUninstallRPM/DebNoActionUsethefollowingcommandtouninstallaToolkitrunfileinstallation:$sudo/usr/local/cuda-X.
Y/bin/uninstall_cuda_X.
Y.
plUsethefollowingcommandtouninstallaDriverrunfileinstallation:$sudo/usr/bin/nvidia-uninstallUsethefollowingcommandstouninstallaRPM/Debinstallation:$sudoyumremove#Redhat/CentOS$sudodnfremove#Fedora$sudozypperremove#OpenSUSE/SLES$sudoapt-get--purgeremove#Ubuntuwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|9Chapter3.
PACKAGEMANAGERINSTALLATIONBasicinstructionscanbefoundintheQuickStartGuide.
Readonformoredetailedinstructions.
3.
1.
OverviewThePackageManagerinstallationinterfaceswithyoursystem'spackagemanagementsystem.
WhenusingRPMorDeb,thedownloadedpackageisarepositorypackage.
Suchapackageonlyinformsthepackagemanagerwheretofindtheactualinstallationpackages,butwillnotinstallthem.
Ifthosepackagesareavailableinanonlinerepository,theywillbeautomaticallydownloadedinalaterstep.
Otherwise,therepositorypackagealsoinstallsalocalrepositorycontainingtheinstallationpackagesonthesystem.
Whethertherepositoryisavailableonlineorinstalledlocally,theinstallationprocedureisidenticalandmadeofseveralsteps.
Distribution-specificinstructionsdetailhowtoinstallCUDA:Redhat/CentOSFedoraSLESOpenSUSEUbuntuFinally,somehelpfulpackagemanagercapabilitiesaredetailed.
Theseinstructionsarefornativedevelopmentonly.
Forcross-platformdevelopment,seetheCUDACross-PlatformEnvironmentsection.
Thepackage"cuda-core"hasbeendeprecatedinCUDA9.
1.
Pleaseuse"cuda-compiler"instead.
PackageManagerInstallationwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|103.
2.
Redhat/CentOS1.
Performthepre-installationactions.
2.
Satisfythird-partypackagedependency:SatisfyDKMSdependency:TheNVIDIAdriverRPMpackagesdependonotherexternalpackages,suchasDKMSandlibvdpau.
Thosepackagesareonlyavailableonthird-partyrepositories,suchasEPEL.
Anysuchthird-partyrepositoriesmustbeaddedtothepackagemanagerrepositorydatabasebeforeinstallingtheNVIDIAdriverRPMpackages,ormissingdependencieswillpreventtheinstallationfromproceeding.
Enableoptionalrepos:OnRHEL7Linuxonly,executethefollowingstepstoenableoptionalrepositories.
Onx86_64workstation:$subscription-managerrepos--enable=rhel-7-workstation-optional-rpmsOnPOWER9system:$subscription-managerrepos--enable=rhel-7-for-power-9-optional-rpmsOnx86_64server:$subscription-managerrepos--enable=rhel-7-server-optional-rpms3.
Addresscustomxorg.
conf,ifapplicableThedriverreliesonanautomaticallygeneratedxorg.
conffileat/etc/X11/xorg.
conf.
Ifacustom-builtxorg.
conffileispresent,thisfunctionalitywillbedisabledandthedrivermaynotwork.
Youcantryremovingtheexistingxorg.
conffile,oraddingthecontentsof/etc/X11/xorg.
conf.
d/00-nvidia.
conftothexorg.
conffile.
Thexorg.
conffilewillmostlikelyneedmanualtweakingforsystemswithanon-trivialGPUconfiguration.
4.
Installrepositorymeta-data$sudorpm--installcuda-repo--.
.
rpm5.
CleanYumrepositorycache$sudoyumcleanexpire-cache6.
InstallCUDA$sudoyuminstallnvidia-driver-latest-dkms$sudoyuminstallcuda7.
Addlibcuda.
sosymboliclink,ifnecessaryThelibcuda.
solibraryisinstalledinthe/usr/lib{,64}/nvidiadirectory.
Forpre-existingprojectswhichuselibcuda.
so,itmaybeusefultoaddasymboliclinkfromlibcuda.
sointhe/usr/lib{,64}directory.
8.
Performthepost-installationactions.
PackageManagerInstallationwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|113.
3.
Fedora1.
Performthepre-installationactions.
2.
Addresscustomxorg.
conf,ifapplicableThedriverreliesonanautomaticallygeneratedxorg.
conffileat/etc/X11/xorg.
conf.
Ifacustom-builtxorg.
conffileispresent,thisfunctionalitywillbedisabledandthedrivermaynotwork.
Youcantryremovingtheexistingxorg.
conffile,oraddingthecontentsof/etc/X11/xorg.
conf.
d/00-nvidia.
conftothexorg.
conffile.
Thexorg.
conffilewillmostlikelyneedmanualtweakingforsystemswithanon-trivialGPUconfiguration.
3.
SatisfyAkmodsdependencyTheNVIDIAdriverRPMpackagesdependontheAkmodsframeworkwhichisprovidedbytheRPMFusionfreerepository.
TheRPMFusionfreerepositorymustbeaddedtothepackagemanagerrepositorydatabasebeforeinstallingtheNVIDIAdriverRPMpackages,ormissingdependencieswillpreventtheinstallationfromproceeding.
4.
Installrepositorymeta-data$sudorpm--installcuda-repo--.
.
rpm5.
CleanDNFrepositorycache$sudodnfcleanexpire-cache6.
InstallCUDA$sudodnfinstallcudaTheCUDAdriverinstallationmayfailiftheRPMFusionnon-freerepositoryisenabled.
Inthiscase,CUDAinstallationsshouldtemporarilydisabletheRPMFusionnon-freerepository:$sudodnf--disablerepo="rpmfusion-nonfree*"installcudaIfasystemhasinstalledbothpackageswiththesameinstanceofdnf,somedrivercomponentsmaybemissing.
Suchaninstallationcanbecorrectedbyrunning:$sudodnfinstallcuda-driversIfthei686libvdpaupackagedependencyfailstoinstall,tryusingthefollowingstepstofixtheissue:$dnfdownloadlibvdpau.
i686$sudorpm-U--oldpackagelibvdpau*.
rpmItmaybenecessarytorebuildthegrubconfigurationfiles,particularlyifyouuseanon-defaultpartitionscheme.
Ifso,thenrunthisbelowcommand,andrebootthesystem:$sudogrub2-mkconfig-o/boot/grub2/grub.
cfgRemembertorebootthesystem.
PackageManagerInstallationwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|127.
Addlibcuda.
sosymboliclink,ifnecessaryThelibcuda.
solibraryisinstalledinthe/usr/lib{,64}/nvidiadirectory.
Forpre-existingprojectswhichuselibcuda.
so,itmaybeusefultoaddasymboliclinkfromlibcuda.
sointhe/usr/lib{,64}directory.
8.
Performthepost-installationactions.
3.
4.
SLES1.
Performthepre-installationactions.
2.
OnSLES12SP4,installtheMesa-libgl-develLinuxpackagesbeforeproceeding.
SeeMesa-libGL-devel.
3.
Installrepositorymeta-data$sudorpm--installcuda-repo--.
.
rpm4.
RefreshZypperrepositorycache$sudozypperrefresh5.
InstallCUDA$sudozypperinstallcuda6.
Addtheusertothevideogroup$sudousermod-a-Gvideo7.
InstallCUDASamplesGLdependenciesTheCUDASamplespackageonSLESdoesnotincludedependenciesonGLandX11librariesastheseareprovidedintheSLESSDK.
Thesepackagesmustbeinstalledseparately,dependingonwhichsamplesyouwanttouse.
8.
Performthepost-installationactions.
3.
5.
OpenSUSE1.
Performthepre-installationactions.
2.
Installrepositorymeta-data$sudorpm--installcuda-repo--.
.
rpm3.
RefreshZypperrepositorycache$sudozypperrefresh4.
InstallCUDA$sudozypperinstallcuda5.
Addtheusertothevideogroup$sudousermod-a-Gvideo6.
Performthepost-installationactions.
PackageManagerInstallationwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|133.
6.
Ubuntu1.
Performthepre-installationactions.
2.
Installrepositorymeta-data$sudodpkg-icuda-repo-__.
deb3.
InstallingtheCUDApublicGPGkeyWheninstallingusingthelocalrepo:$sudoapt-keyadd/var/cuda-repo-/7fa2af80.
pubWheninstallingusingnetworkrepoonUbuntu18.
04/18.
10:$sudoapt-keyadv--fetch-keyshttps://developer.
download.
nvidia.
com/compute/cuda/repos///7fa2af80.
pubWheninstallingusingnetworkrepoonUbuntu16.
04:$sudoapt-keyadv--fetch-keyshttp://developer.
download.
nvidia.
com/compute/cuda/repos///7fa2af80.
pub4.
UpdatetheAptrepositorycache$sudoapt-getupdate5.
InstallCUDA$sudoapt-getinstallcuda6.
Performthepost-installationactions.
3.
7.
AdditionalPackageManagerCapabilitiesBelowaresomeadditionalcapabilitiesofthepackagemanagerthatuserscantakeadvantageof.
3.
7.
1.
AvailablePackagesTherecommendedinstallationpackageisthecudapackage.
ThispackagewillinstallthefullsetofotherCUDApackagesrequiredfornativedevelopmentandwillcovermostscenarios.
Thecudapackageinstallsalltheavailablepackagesfornativedevelopment,including,tonameafew,thefollowing:Thecompiler,thedebugger,theprofiler,andthemathlibraries.
TheNVIDIAdriverpackage.
Forx86_64patforms:NSightEclipseEditionandtheVisualProfiler.
Forcross-platformdevelopmentonsupportedplatforms,thefollowingapplies:Thecuda-cross-aarch64packagewillinstallallthepackagesrequiredforcross-platformdevelopmenttoARMv8.
PackageManagerInstallationwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|14Similarly,thecuda-cross-qnxpackagewillinstallallthepackagesrequiredforcross-platformdevelopmenttotheQNXarchitecture.
Thelibrariesandheaderfilesofthetargetarchitecture'sdisplaydriverpackagearealsoinstalledtoenablethecrosscompilationofdriverapplications.
Thecuda-cross-packagesdonotinstallthenativedisplaydriver.
Thepackagesinstalledbythecross-platformdevelopmentpackagesabovecanalsobeinstalledindividuallybyspecifyingtheirnamesexplicitly.
Thelistofavailablepackagesbecanobtainedwith:$yum--disablerepo="*"--enablerepo="cuda*"listavailable#RedHat$dnf--disablerepo="*"--enablerepo="cuda*"listavailable#Fedora$zypperpackages-rcuda#OpenSUSE&SLES$cat/var/lib/apt/lists/*cuda*Packages|grep"Package:"#Ubuntu3.
7.
2.
PackageUpgradesThecudapackagepointstothelateststablereleaseoftheCUDAToolkit.
Whenanewversionisavailable,usethefollowingcommandstoupgradethetoolkitanddriver:$sudoyuminstallcuda#RedHat$sudodnfinstallcuda#Fedora$sudozypperinstallcuda#OpenSUSE&SLES$sudoapt-getinstallcuda#UbuntuThecuda-cross-packagescanalsobeupgradedinthesamemanner.
Thecuda-driverspackagepointstothelatestdriverreleaseavailableintheCUDArepository.
Whenanewversionisavailable,usethefollowingcommandstoupgradethedriver:$sudoyuminstallnvidia-driver-latest-dkms#RedHat$sudodnfinstallcuda-drivers#Fedora$sudozypperinstallcuda-drivers\nvidia-gfxG04-kmp-default#OpenSUSE&SLES$sudoapt-getinstallcuda-drivers#UbuntuSomedesktopenvironments,suchasGNOMEorKDE,willdisplayannotificationalertwhennewpackagesareavailable.
Toavoidanyautomaticupgrade,andlockdownthetoolkitinstallationtotheX.
Yrelease,installthecuda-X-Yorcuda-cross--X-Ypackage.
Side-by-sideinstallationsaresupported.
Forinstance,toinstallboththeX.
YCUDAToolkitandtheX.
Y+1CUDAToolkit,installthecuda-X.
Yandcuda-X.
Y+1packages.
3.
7.
3.
MetaPackagesMetapackagesareRPM/Debpackageswhichcontainno(orfew)filesbuthavemultipledependencies.
TheyareusedtoinstallmanyCUDApackageswhenyoumaynotknowthedetailsofthepackagesyouwant.
Belowisthelistofmetapackages.
PackageManagerInstallationwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|15Table4MetaPackagesAvailableforCUDA10.
1MetaPackagePurposecudaInstallsallCUDAToolkitandDriverpackages.
Handlesupgradingtothenextversionofthecudapackagewhenit'sreleased.
cuda-10-1InstallsallCUDAToolkitandDriverpackages.
Remainsatversion10.
1untilanadditionalversionofCUDAisinstalled.
cuda-toolkit-10-1InstallsallCUDAToolkitpackagesrequiredtodevelopCUDAapplications.
Doesnotincludethedriver.
cuda-tools-10-1InstallsallCUDAcommandlineandvisualtools.
cuda-runtime-10-1InstallsallCUDAToolkitpackagesrequiredtorunCUDAapplications,aswellastheDriverpackages.
cuda-compiler-10-1InstallsallCUDAcompilerpackages.
cuda-libraries-10-1InstallsallruntimeCUDALibrarypackages.
cuda-libraries-dev-10-1InstallsalldevelopmentCUDALibrarypackages.
cuda-driversInstallsallDriverpackages.
HandlesupgradingtothenextversionoftheDriverpackageswhenthey'rereleased.
www.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|16Chapter4.
RUNFILEINSTALLATIONBasicinstructionscanbefoundintheQuickStartGuide.
Readonformoredetailedinstructions.
ThissectiondescribestheinstallationandconfigurationofCUDAwhenusingthestandaloneinstaller.
Thestandaloneinstallerisa".
run"fileandiscompletelyself-contained.
4.
1.
OverviewTheRunfileinstallationinstallstheNVIDIADriver,theCUDAToolkit,andCUDASamples,viaaninteractivencurses-basedinterface.
Theinstallationstepsarelistedbelow.
Distribution-specificinstructionsfordisablingtheNouveaudrivers,andthestepsforverifyingdevicenodecreation,arealsoprovided.
Finally,theadvancedoptionsfortheinstallerandtheuninstallationstepsaredetailedbelow.
TheRunfileinstallationdoesnotincludesupportforcross-platformdevelopment.
Forcross-platformdevelopment,seetheCUDACross-PlatformEnvironmentsection.
4.
2.
Installation1.
Performthepre-installationactions.
2.
DisabletheNouveaudrivers.
3.
Rebootintotextmode(runlevel3).
Thiscanusuallybeaccomplishedbyaddingthenumber"3"totheendofthesystem'skernelbootparameters.
SincetheNVIDIAdriversarenotyetinstalled,thetextterminalsmaynotdisplaycorrectly.
Temporarilyadding"nomodeset"tothesystem'skernelbootparametersmayfixthisissue.
RunfileInstallationwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|17Consultyoursystem'sbootloaderdocumentationforinformationonhowtomaketheabovebootparameterchanges.
TherebootisrequiredtocompletelyunloadtheNouveaudriversandpreventthegraphicalinterfacefromloading.
TheCUDAdrivercannotbeinstalledwhiletheNouveaudriversareloadedorwhilethegraphicalinterfaceisactive.
4.
VerifythattheNouveaudriversarenotloaded.
IftheNouveaudriversarestillloaded,consultyourdistribution'sdocumentationtoseeiffurtherstepsareneededtodisableNouveau.
5.
Runtheinstallerandfollowtheon-screenprompts:$sudoshcuda__linux.
runSeeInstallerUIfornavigatingthencurses-basedinstallerUI.
AsofCUDA10.
1somelibrarieswillbeinstalledinthesystemstandardlocationsratherthanintheToolkitinstallationdirectory.
Dependingonyourdistributiontheseinstalledlocationscanbeeither:/usr/lib/x84_64-linux-gnu,or/usr/lib64,or/usr/lib.
SeetheAdvancedOptionsforhowtochangethislocation.
Thedefaultinstallationlocationsforthetoolkitandsamplesare:ComponentDefaultInstallationDirectoryCUDAToolkit/usr/local/cuda-10.
1CUDASamples$(HOME)/NVIDIA_CUDA-10.
1_SamplesThe/usr/local/cudasymboliclinkpointstothelocationwheretheCUDAToolkitwasinstalled.
ThislinkallowsprojectstousethelatestCUDAToolkitwithoutanyconfigurationfileupdate.
Theinstallermustbeexecutedwithsufficientprivilegestoperformsomeactions.
Whenthecurrentprivilegesareinsufficienttoperformanaction,theinstallerwillaskfortheuser'spasswordtoattempttoinstallwithrootprivileges.
Actionsthatcausetheinstallertoattempttoinstallwithrootprivilegesare:installingtheCUDADriverinstallingtheCUDAToolkittoalocationtheuserdoesnothavepermissiontowritetoinstallingtheCUDASamplestoalocationtheuserdoesnothavepermissiontowritetocreatingthe/usr/local/cudasymboliclinkRunningtheinstallerwithsudo,asshownabove,willgivepermissiontoinstalltodirectoriesthatrequirerootpermissions.
Directoriesandfilescreatedwhilerunningtheinstallerwithsudowillhaverootownership.
Ifinstallingthedriver,theinstallerwillalsoaskiftheopenGLlibrariesshouldbeinstalled.
IftheGPUusedfordisplayisnotanNVIDIAGPU,theNVIDIAopenGLlibrariesshouldnotbeinstalled.
Otherwise,theopenGLlibrariesusedbythegraphicsdriverofthenon-NVIDIAGPUwillbeoverwrittenandtheGUIwillnotwork.
Ifperformingasilentinstallation,the--no-opengl-libsoptionshouldRunfileInstallationwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|18beusedtopreventtheopenGLlibrariesfrombeinginstalled.
SeetheAdvancedOptionssectionformoredetails.
IftheGPUusedfordisplayisanNVIDIAGPU,theXserverconfigurationfile,/etc/X11/xorg.
conf,mayneedtobemodified.
Insomecases,nvidia-xconfigcanbeusedtoautomaticallygenerateaxorg.
conffilethatworksforthesystem.
Fornon-standardsystems,suchasthosewithmorethanoneGPU,itisrecommendedtomanuallyeditthexorg.
conffile.
Consultthexorg.
confdocumentationformoreinformation.
InstallingMesamayoverwritethe/usr/lib/libGL.
sothatwaspreviouslyinstalledbytheNVIDIAdriver,soareinstallationoftheNVIDIAdrivermightberequiredafterinstallingtheselibraries.
6.
Rebootthesystemtoreloadthegraphicalinterface.
7.
Verifythedevicenodesarecreatedproperly.
8.
Performthepost-installationactions.
4.
3.
InstallerUITheinstallerUIhasthreemainstates:1.
EULAAcceptance.
a.
ScrollthroughtheEULAusingthearrowkeys,thepageup/downkeys,orascrollwheel.
2.
ComponentSelection.
a.
Navigatethemenuusingthearrowkeys.
Theleft/rightkeyswillexpand/collapsesub-elements.
b.
Selectordeselectitemstoinstallbypressingthespacebarorenterkeywiththecursoronthatitem.
c.
Withthecursoroveranitemwithadvancedoptionsavailable,press'A'toseethatoptionsmenu.
ThisiscurrentlyavailableforCUDAToolkitandCUDASamplesitemsonly.
3.
AdvancedOptions.
a.
Optionssuchassettingtheinstallpathforaspecificcomponentareavailablehere.
4.
4.
DisablingNouveauToinstalltheDisplayDriver,theNouveaudriversmustfirstbedisabled.
EachdistributionofLinuxhasadifferentmethodfordisablingNouveau.
TheNouveaudriversareloadedifthefollowingcommandprintsanything:$lsmod|grepnouveauRunfileInstallationwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|194.
4.
1.
Fedora1.
Createafileat/usr/lib/modprobe.
d/blacklist-nouveau.
confwiththefollowingcontents:blacklistnouveauoptionsnouveaumodeset=02.
Regeneratethekernelinitramfs:$sudodracut--force3.
Runthebelowcommand:$sudogrub2-mkconfig-o/boot/grub2/grub.
cfg4.
Rebootthesystem.
4.
4.
2.
RHEL/CentOS1.
Createafileat/etc/modprobe.
d/blacklist-nouveau.
confwiththefollowingcontents:blacklistnouveauoptionsnouveaumodeset=02.
Regeneratethekernelinitramfs:$sudodracut--force4.
4.
3.
OpenSUSE1.
Createafileat/etc/modprobe.
d/blacklist-nouveau.
confwiththefollowingcontents:blacklistnouveauoptionsnouveaumodeset=02.
Regeneratethekernelinitrd:$sudo/sbin/mkinitrd4.
4.
4.
SLESNoactionstodisableNouveauarerequiredasNouveauisnotinstalledonSLES.
4.
4.
5.
Ubuntu1.
Createafileat/etc/modprobe.
d/blacklist-nouveau.
confwiththefollowingcontents:blacklistnouveauoptionsnouveaumodeset=02.
Regeneratethekernelinitramfs:$sudoupdate-initramfs-uRunfileInstallationwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|204.
5.
DeviceNodeVerificationCheckthatthedevicefiles/dev/nvidia*existandhavethecorrect(0666)filepermissions.
ThesefilesareusedbytheCUDADrivertocommunicatewiththekernel-modeportionoftheNVIDIADriver.
ApplicationsthatusetheNVIDIAdriver,suchasaCUDAapplicationortheXserver(ifany),willnormallyautomaticallycreatethesefilesiftheyaremissingusingthesetuidnvidia-modprobetoolthatisbundledwiththeNVIDIADriver.
However,somesystemsdisallowsetuidbinaries,soifthesefilesdonotexist,youcancreatethemmanuallybyusingastartupscriptsuchastheonebelow:#!
/bin/bash/sbin/modprobenvidiaif["$"-eq0];then#CountthenumberofNVIDIAcontrollersfound.
NVDEVS=`lspci|grep-iNVIDIA`N3D=`echo"$NVDEVS"|grep"3Dcontroller"|wc-l`NVGA=`echo"$NVDEVS"|grep"VGAcompatiblecontroller"|wc-l`N=`expr$N3D+$NVGA-1`foriin`seq0$N`;domknod-m666/dev/nvidia$ic195$idonemknod-m666/dev/nvidiactlc195255elseexit1fi/sbin/modprobenvidia-uvmif["$"-eq0];then#Findoutthemajordevicenumberusedbythenvidia-uvmdriverD=`grepnvidia-uvm/proc/devices|awk'{print$1}'`mknod-m666/dev/nvidia-uvmc$D0elseexit1fi4.
6.
AdvancedOptionsActionOptionsUsedExplanationSilentInstallation--silentRequiredforanysilentinstallation.
Performsaninstallationwithnofurtheruser-inputandminimalcommand-lineoutputbasedontheoptionsprovidedbelow.
SilentinstallationsareusefulforscriptingtheinstallationofCUDA.
UsingthisoptionimpliesacceptanceoftheEULA.
Thefollowingflagscanbeusedtocustomizetheactionstakenduringinstallation.
Atleastoneof--driver,--uninstall,--toolkit,and--samplesmustbepassedifrunningwithnon-rootpermissions.
RunfileInstallationwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|21ActionOptionsUsedExplanation--driverInstalltheCUDADriver.
--toolkitInstalltheCUDAToolkit.
--toolkitpath=InstalltheCUDAToolkittothedirectory.
Ifnotprovided,thedefaultpathof/usr/local/cuda-10.
1isused.
--samplesInstalltheCUDASamples.
--samplespath=InstalltheCUDASamplestothedirectory.
Ifnotprovided,thedefaultpathof$(HOME)/NVIDIA_CUDA-10.
1_Samplesisused.
--defaultroot=Installlibrariestothedirectory.
Iftheisnotprovided,thenthedefaultpathofyourdistributionisused.
ThisonlyappliestothelibrariesinstalledoutsideoftheCUDAToolkitpath.
Extraction--extract=Extractstothethefollowing:thedriverrunfile,therawfilesofthetoolkitandsamplesto.
Thisisespeciallyusefulwhenonewantstoinstallthedriverusingoneormoreofthecommand-lineoptionsprovidedbythedriverinstallerwhicharenotexposedinthisinstaller.
OverridingInstallationChecks--overrideIgnorescompiler,third-partylibrary,andtoolkitdetectioncheckswhichwouldpreventtheCUDAToolkitandCUDASamplesfrominstalling.
NoOpenGLLibraries--no-opengl-libsPreventsthedriverinstallationfrominstallingNVIDIA'sGLlibraries.
Usefulforsystemswherethedisplayisdrivenbyanon-NVIDIAGPU.
Insuchsystems,NVIDIA'sGLlibrariescouldpreventXfromloadingproperly.
Nomanpages--no-man-pageDonotinstallthemanpagesunder/usr/share/man.
OverridingKernelSource--kernel-source-path=TellsthedriverinstallationtouseasthekernelsourcedirectorywhenbuildingtheNVIDIAkernelmodule.
Requiredforsystemswherethekernelsourceisinstalledtoanon-standardlocation.
Runningnvidia-xconfig--run-nvidia-xconfigTellsthedriverinstallationtorunnvidia-xconfigtoupdatethesystemXconfigurationfilesothattheNVIDIAXdriverisused.
Thepre-existingXconfigurationfilewillbebackedup.
Nonvidia-drmkernelmodule--no-drmDonotinstallthenvidia-drmkernelmodule.
Thisoptionshouldonlybeusedtoworkaroundfailurestobuildorinstallthenvidia-drmkernelmoduleonsystemsthatdonotneedtheprovidedfeatures.
CustomTemporaryDirectorySelection--tmpdir=Performsanytemporaryactionswithininsteadof/tmp.
Usefulincaseswhere/tmpcannotbeused(doesn'texist,isfull,ismountedwith'noexec',etc.
).
ShowInstallerOptions--helpPrintsthelistofcommand-lineoptionstostdout.
RunfileInstallationwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|224.
7.
UninstallationTouninstalltheCUDAToolkit,runtheuninstallationscriptprovidedinthebindirectoryofthetoolkit.
Bydefault,itislocatedin/usr/local/cuda-10.
1/bin:$sudo/usr/local/cuda-10.
1/bin/cuda-uninstallerTouninstalltheNVIDIADriver,runnvidia-uninstall:$sudo/usr/bin/nvidia-uninstallToenabletheNouveaudrivers,removetheblacklistfilecreatedintheDisablingNouveausection,andregeneratethekernelinitramfs/initrdagainasdescribedinthatsection.
www.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|23Chapter5.
CLUSTERMANAGEMENTPACKAGES5.
1.
OverviewClustermanagementpackagesareprovidedasanalternativesetofRPMandDebpackagesintendedtobeusedbydeploymentmanagementtoolsasstandalonepackages.
ThesepackagesareavailableforRHEL6,RHEL7,Ubuntu14.
04,andUbuntu16.
04onthex86_64architecture.
Therearethreepartstotheclustermanagementpackages:theCUDAtoolkitpackages,theNVIDIAdriverpackages,andtheREADME.
Theclustermanagementtoolkitpackagesaresplitintoaruntimepackage,cuda-cluster-runtime-10-1,andadevelopmentpackage,cuda-cluster-devel-10-1.
Thedevelopmentpackagedependsontheruntimepackage.
ThedriverpackagesarethesameaswhatisprovidedinthegeneralRPMandDebsolutionusedinthePackageManagementsection.
TheREADMEdescribesthepackageandkernelsourcedependenciesoftheclustermanagementpackages.
TheREADMEalsodescribestheorderofinstallationofthestandaloneclustermanagementpackages.
www.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|24Chapter6.
CUDACROSS-PLATFORMENVIRONMENTCross-platformdevelopmentisonlysupportedonUbuntusystems,andisonlyprovidedviathePackageManagerinstallationprocess.
6.
1.
CUDACross-PlatformInstallationSomeofthefollowingstepsmayhavealreadybeenperformedaspartofthenativeUbuntuinstallation.
Suchstepscansafelybeskipped.
Thesestepsshouldbeperformedonthex86_64hostsystem,ratherthanthetargetsystem.
ToinstallthenativeCUDAToolkitonthetargetsystem,refertothenativeUbuntuinstallationsection.
1.
Performthepre-installationactions.
2.
Installrepositorymeta-datapackagewith:$sudodpkg-icuda-repo-cross-_all.
debwhereindicatestheoperatingsystem,architecture,and/ortheversionofthepackage.
3.
UpdatetheAptrepositorycache:$sudoapt-getupdate4.
Installtheappropriatecross-platformCUDAToolkit:a.
Foraarch64:$sudoapt-getinstallcuda-cross-aarch64b.
ForQNX:$sudoapt-getinstallcuda-cross-qnx5.
Performthepost-installationactions.
CUDACross-PlatformEnvironmentwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|256.
2.
CUDACross-PlatformSamplesThissectiondescribestheoptionsusedtobuildcross-platformsamples.
TARGET_ARCH=andTARGET_OS=shouldbechosenbasedonthesupportedtargetsshownbelow.
TARGET_FS=canbeusedtopointnvcctolibrariesandheadersusedbythesample.
Table5SupportedTargetArch/OSCombinationsTARGETOSlinuxdarwinandroidqnxx86_64YESYESNONOTARGETARCHaarch64YESNOYESYESTARGET_ARCHThetargetarchitecturemustbespecifiedwhencross-compilingapplications.
Ifnotspecified,itdefaultstothehostarchitecture.
Allowedarchitecturesare:x86_64-64-bitx86CPUarchitectureaarch64-64-bitARMCPUarchitecture,likethatfoundonJetsonTX1onwardsTARGET_OSThetargetOSmustbespecifiedwhencross-compilingapplications.
Ifnotspecified,itdefaultstothehostOS.
AllowedOSesare:linux-foranyLinuxdistributionsdarwin-forMacOSXandroid-foranysupporteddevicerunningAndroidqnx-foranysupporteddevicerunningQNXTARGET_FSThemostreliablemethodtocross-compiletheCUDASamplesistousetheTARGET_FSvariable.
Todoso,mountthetarget'sfilesystemonthehost,sayat/mnt/target.
Thisistypicallydoneusingexportfs.
Incaseswhereexportfsisunavailable,itissufficienttocopythetarget'sfilesystemto/mnt/target.
Tocross-compileasample,execute:$makeTARGET_ARCH=TARGET_OS=TARGET_FS=/mnt/targetCrossCompilingtoARMarchitecturesWhilecrosscompilingthesamplesfromx86_64installationtoARMarchitectures,thatis,aarch64,ifyouintendtoruntheexecutableonTegraGPU,thenthefollowingapplies:CUDACross-PlatformEnvironmentwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|26TheSMSvariablemustoverrideSMarchitecturestotheTegraGPUthroughSMS=,whereistheSMarchitectureofTegraGPUonwhichyouwantthegeneratedbinarytorunon.
ForexampleitcanbeSMS="325362".
YoucanalsoaddSMarchofdiscreteGPUtothislistifyouintendtorunonembeddedboardhavingdiscreteGPUaswell.
Tocrosscompileasample,execute:$makeTARGET_ARCH=TARGET_OS=SMS=TARGET_FS=/mnt/targetCopyingLibrariesIftheTARGET_FSoptionisnotavailable,thelibrariesusedshouldbecopiedfromthetargetsystemtothehostsystem,sayat/opt/target/libs.
IfthesampleusesGL,theGLheadersmustalsobecopied,sayat/opt/target/include.
Thelinkermustthenbetoldwherethelibrariesarewiththe-rpath-linkand/or-Loptions.
Toignoreunresolvedsymbolsfromsomelibraries,usethe--unresolved-symbolsoptionasshownbelow.
SAMPLE_ENABLEDshouldbeusedtoforcethesampletobuild.
Forexample,tocross-compileasamplewhichusessuchlibraries,execute:$makeTARGET_ARCH=TARGET_OS=\EXTRA_LDFLAGS="-rpath-link=/opt/target/libs-L/opt/target/libs--unresolved-symbols=ignore-in-shared-libs"\EXTRA_CCFLAGS="-I/opt/target/include"\SAMPLE_ENABLED=16.
3.
NsightEclipseEditionNsightEclipseEditionsupportscross-platformdevelopment.
SeetheNsightEclipseEditionGettingStartedGuideformoredetails.
www.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|27Chapter7.
POST-INSTALLATIONACTIONSThepost-installationactionsmustbemanuallyperformed.
Theseactionsaresplitintomandatory,recommended,andoptionalsections.
7.
1.
MandatoryActionsSomeactionsmustbetakenaftertheinstallationbeforetheCUDAToolkitandDrivercanbeused.
7.
1.
1.
EnvironmentSetupThePATHvariableneedstoinclude/usr/local/cuda-10.
1/binand/usr/local/cuda-10.
1/NsightCompute-.
referstotheversionofNsightComputethatshipswiththeCUDAtoolkit,e.
g.
2019.
1.
ToaddthispathtothePATHvariable:$exportPATH=/usr/local/cuda-10.
1/bin:/usr/local/cuda-10.
1/NsightCompute-2019.
1${PATH:+:${PATH}}Inaddition,whenusingtherunfileinstallationmethod,theLD_LIBRARY_PATHvariableneedstocontain/usr/local/cuda-10.
1/lib64ona64-bitsystem,or/usr/local/cuda-10.
1/libona32-bitsystemTochangetheenvironmentvariablesfor64-bitoperatingsystems:$exportLD_LIBRARY_PATH=/usr/local/cuda-10.
1/lib64\${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}Tochangetheenvironmentvariablesfor32-bitoperatingsystems:$exportLD_LIBRARY_PATH=/usr/local/cuda-10.
1/lib\${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}Notethattheabovepathschangewhenusingacustominstallpathwiththerunfileinstallationmethod.
Post-installationActionswww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|287.
1.
2.
POWER9SetupBecauseoftheadditionofnewfeaturesspecifictotheNVIDIAPOWER9CUDAdriver,therearesomeadditionalsetuprequirementsinorderforthedrivertofunctionproperly.
TheseadditionalstepsarenothandledbytheinstallationofCUDApackages,andfailuretoensuretheseextrarequirementsaremetwillresultinanon-functionalCUDAdriverinstallation.
TherearetwochangesthatneedtobemademanuallyafterinstallingtheNVIDIACUDAdrivertoensureproperoperation:1.
TheNVIDIAPersistenceDaemonshouldbeautomaticallystartedforPOWER9installations.
Checkthatitisrunningwiththefollowingcommand:$systemctlstatusnvidia-persistencedIfitisnotactive,runthefollowingcommand:$sudosystemctlenablenvidia-persistenced2.
DisableaudevruleinstalledbydefaultinsomeLinuxdistributionsthatcausehot-pluggablememorytobeautomaticallyonlinedwhenitisphysicallyprobed.
ThisbehaviorpreventsNVIDIAsoftwarefrombringingNVIDIAdevicememoryonlinewithnon-defaultsettings.
ThisudevrulemustbedisabledinorderfortheNVIDIACUDAdrivertofunctionproperlyonPOWER9systems.
OnRedHatEnterpriseLinux7,thisrulecanbefoundin:/lib/udev/rules.
d/40-redhat.
rulesOnUbuntu17.
04,thisrulecanbefoundin:/lib/udev/rules.
d/40-vm-hotadd.
rulesTherulegenerallytakesaformwhereitdetectstheadditionofamemoryblockandchangesthe'state'attributetoonline.
Forexample,inRHEL7,therulelookslikethis:SUBSYSTEM=="memory",ACTION=="add",PROGRAM="/bin/uname-p",RESULT!
="s390*",ATTR{state}=="offline",ATTR{state}="online"Thisrulemustbedisabledbycopyingthefileto/etc/udev/rules.
dandcommentingout,removing,orchangingthehot-pluggablememoryruleinthe/etccopysothatitdoesnotapplytoPOWER9NVIDIAsystems.
Forexample,onRHEL7.
5orearlierversions:$sudocp/lib/udev/rules.
d/40-redhat.
rules/etc/udev/rules.
d$sudosed-i'/SUBSYSTEM=="memory",ACTION=="add"/d'/etc/udev/rules.
d/40-redhat.
rulesOnRHEL7.
6andlaterversions:$sudocp/lib/udev/rules.
d/40-redhat.
rules/etc/udev/rules.
d$sudosed-i's/SUBSYSTEM!
="memory",ACTION!
="add",GOTO="memory_hotplug_end"/SUBSYSTEM=="*",GOTO="memory_hotplug_end"/'/etc/udev/rules.
d/40-redhat.
rulesPost-installationActionswww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|29Youwillneedtorebootthesystemtoinitializetheabovechanges.
ForNUMAbestpracticesonIBMNewellPOWER9,seeNUMABestPractices.
7.
2.
RecommendedActionsOtheractionsarerecommendedtoverifytheintegrityoftheinstallation.
7.
2.
1.
InstallPersistenceDaemonNVIDIAisprovidingauser-spacedaemononLinuxtosupportpersistenceofdriverstateacrossCUDAjobruns.
Thedaemonapproachprovidesamoreelegantandrobustsolutiontothisproblemthanpersistencemode.
FormoredetailsontheNVIDIAPersistenceDaemon,seethedocumentationhere.
TheNVIDIAPersistenceDaemoncanbestartedastherootuserbyrunning:$/usr/bin/nvidia-persistenced--verboseThiscommandshouldberunonboot.
ConsultyourLinuxdistribution'sinitdocumentationfordetailsonhowtoautomatethis.
7.
2.
2.
InstallWritableSamplesInordertomodify,compile,andrunthesamples,thesamplesmustbeinstalledwithwritepermissions.
Aconvenienceinstallationscriptisprovided:$cuda-install-samples-10.
1.
shThisscriptisinstalledwiththecuda-samples-10-1package.
Thecuda-samples-10-1packageinstallsonlyaread-onlycopyin/usr/local/cuda-10.
1/samples.
7.
2.
3.
VerifytheInstallationBeforecontinuing,itisimportanttoverifythattheCUDAtoolkitcanfindandcommunicatecorrectlywiththeCUDA-capablehardware.
Todothis,youneedtocompileandrunsomeoftheincludedsampleprograms.
EnsurethePATHand,ifusingtherunfileinstallationmethod,LD_LIBRARY_PATHvariablesaresetcorrectly.
7.
2.
3.
1.
VerifytheDriverVersionIfyouinstalledthedriver,verifythatthecorrectversionofitisloaded.
Ifyoudidnotinstallthedriver,orareusinganoperatingsystemwherethedriverisnotloadedviaakernelmodule,suchasL4T,skipthisstep.
Whenthedriverisloaded,thedriverversioncanbefoundbyexecutingthecommandPost-installationActionswww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|30$cat/proc/driver/nvidia/versionNotethatthiscommandwillnotworkonaniGPU/dGPUsystem.
7.
2.
3.
2.
CompilingtheExamplesTheversionoftheCUDAToolkitcanbecheckedbyrunningnvcc-Vinaterminalwindow.
ThenvcccommandrunsthecompilerdriverthatcompilesCUDAprograms.
ItcallsthegcccompilerforCcodeandtheNVIDIAPTXcompilerfortheCUDAcode.
TheNVIDIACUDAToolkitincludessampleprogramsinsourceform.
Youshouldcompilethembychangingto~/NVIDIA_CUDA-10.
1_Samplesandtypingmake.
Theresultingbinarieswillbeplacedunder~/NVIDIA_CUDA-10.
1_Samples/bin.
7.
2.
3.
3.
RunningtheBinariesAftercompilation,findandrundeviceQueryunder~/NVIDIA_CUDA-10.
1_Samples.
IftheCUDAsoftwareisinstalledandconfiguredcorrectly,theoutputfordeviceQueryshouldlooksimilartothatshowninFigure1.
Figure1ValidResultsfromdeviceQueryCUDASampleTheexactappearanceandtheoutputlinesmightbedifferentonyoursystem.
Theimportantoutcomesarethatadevicewasfound(thefirsthighlightedline),thatthedevicematchestheoneonyoursystem(thesecondhighlightedline),andthatthetestpassed(thefinalhighlightedline).
IfaCUDA-capabledeviceandtheCUDADriverareinstalledbutdeviceQueryreportsthatnoCUDA-capabledevicesarepresent,thislikelymeansthatthe/dev/nvidia*filesaremissingorhavethewrongpermissions.
Post-installationActionswww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|31OnsystemswhereSELinuxisenabled,youmightneedtotemporarilydisablethissecurityfeaturetorundeviceQuery.
Todothis,type:$setenforce0fromthecommandlineasthesuperuser.
RunningthebandwidthTestprogramensuresthatthesystemandtheCUDA-capabledeviceareabletocommunicatecorrectly.
ItsoutputisshowninFigure2.
Figure2ValidResultsfrombandwidthTestCUDASampleNotethatthemeasurementsforyourCUDA-capabledevicedescriptionwillvaryfromsystemtosystem.
Theimportantpointisthatyouobtainmeasurements,andthatthesecond-to-lastline(inFigure2)confirmsthatallnecessarytestspassed.
Shouldthetestsnotpass,makesureyouhaveaCUDA-capableNVIDIAGPUonyoursystemandmakesureitisproperlyinstalled.
Ifyourunintodifficultieswiththelinkstep(suchaslibrariesnotbeingfound),consulttheLinuxReleaseNotesfoundinthedocfolderintheCUDASamplesdirectory.
7.
2.
4.
InstallNsightEclipsePluginsToinstallNsightEclipseplugins,aninstallationscriptisprovided:$/usr/local/cuda-10.
1/bin/nsight_ee_plugins_manage.
shinstallRefertoNsightEclipsePluginsInstallationGuideformoredetails.
Post-installationActionswww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|327.
3.
OptionalActionsOtheroptionsarenotnecessarytousetheCUDAToolkit,butareavailabletoprovideadditionalfeatures.
7.
3.
1.
InstallThird-partyLibrariesSomeCUDAsamplesusethird-partylibrarieswhichmaynotbeinstalledbydefaultonyoursystem.
Thesesamplesattempttodetectanyrequiredlibrarieswhenbuilding.
Ifalibraryisnotdetected,itwaivesitselfandwarnsyouwhichlibraryismissing.
Tobuildandrunthesesamples,youmustinstallthemissinglibraries.
ThesedependenciesmaybeinstallediftheRPMorDebcuda-samples-10-1packageisused.
Incaseswherethesedependenciesarenotinstalled,followtheinstructionsbelow.
RHEL/CentOS$sudoyuminstallfreeglut-devellibX11-devellibXi-devellibXmu-devel\makemesa-libGLU-develFedora$sudodnfinstallfreeglut-devellibX11-devellibXi-devellibXmu-devel\makemesa-libGLU-develSLES$sudozypperinstalllibglut3libX11libXi6libXmu6libGLU1makeOpenSUSE$sudozypperinstallfreeglut-devellibX11-devellibXi-devellibXmu-devel\makeMesa-libGL-develUbuntu$sudoapt-getinstallg++freeglut3-devbuild-essentiallibx11-dev\libxmu-devlibxi-devlibglu1-mesalibglu1-mesa-dev7.
3.
2.
Installthesourcecodeforcuda-gdbThecuda-gdbsourcemustbeexplicitlyselectedforinstallationwiththerunfileinstallationmethod.
Duringtheinstallation,inthecomponentselectionpage,expandthecomponent"CUDATools10.
1"andselectthecuda-gdb-srcforinstallation.
Itisuncheckedbydefault.
Toobtainacopyofthesourcecodeforcuda-gdbusingtheRPMandDebianinstallationmethods,thecuda-gdb-srcpackagemustbeinstalled.
Thesourcecodeisinstalledasatarballinthe/usr/local/cuda-10.
1/extrasdirectory.
www.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|33Chapter8.
ADVANCEDSETUPBelowisinformationonsomeadvancedsetupscenarioswhicharenotcoveredinthebasicinstructionsabove.
Table6AdvancedSetupScenarioswhenInstallingCUDAScenarioInstructionsInstallCUDAusingthePackageManagerinstallationmethodwithoutinstallingtheNVIDIAGLlibraries.
RHEL7/CentOS7InstallCUDAusingthefollowingcommand:$sudoyuminstallcuda-toolkit-10-1\nvidia-driver-cudanvidia-kmodIfthesystemisusinganon-NVIDIAGPUtorenderthedisplay,removethefilesat/etc/X11/xorg.
confand/usr/lib64/nvidia/xorg/libglx.
so,andremovethenomodesetkernelparameterfromthebootcommand-line.
FollowtheinstructionsheretoensurethatNouveauisdisabled.
RHEL6/CentOS6InstallCUDAusingthefollowingcommand:$sudoyuminstallcuda-toolkit-10-1\xorg-x11-drv-nvidia-libsnvidia-kmodIfthesystemisusinganon-NVIDIAGPUtorenderthedisplay,removethefileat/etc/X11/xorg.
conf.
FollowtheinstructionsheretoensurethatNouveauisdisabled.
FedoraInstallCUDAusingthefollowingcommand:$sudodnfinstallcuda-toolkit-10-1\nvidia-driver-cudaakmod-nvidiaFollowtheinstructionsheretoensurethatNouveauisdisabled.
Ifperforminganupgradeoverapreviousinstallation,theNVIDIAkernelmodulemayneedtoberebuiltbyfollowingtheinstructionshere.
OpenSUSE/SLESOnsomesystemconfigurationstheNVIDIAGLlibrariesmayneedtobelockedbeforeinstallationusing:AdvancedSetupwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|34ScenarioInstructions$sudozypperaddlocknvidia-glG04InstallCUDAusingthefollowingcommand:$sudozypperinstall--no-recommendscuda-toolkit-10-1\nvidia-computeG04\nvidia-gfxG04-kmp-defaultFollowtheinstructionsheretoensurethatNouveauisdisabled.
UbuntuThisfunctionalityisn'tsupportedonUbuntu.
Instead,thedriverpackagesintegratewiththeBumblebeeframeworktoprovideasolutionforuserswhowishtocontrolwhatapplicationstheNVIDIAdriversareusedfor.
SeeUbuntu'sBumblebeewikiformoreinformation.
UpgradefromaRPM/Debdriverinstallationwhichincludesthediagnosticdriverpackagestoadriverinstallationwhichdoesnotincludethediagnosticdriverpackages.
RHEL/CentOSRemovediagnosticpackagesusingthefollowingcommand:$sudoyumremovecuda-drivers-diagnostic\xorg-x11-drv-nvidia-diagnosticFollowtheinstructionsheretocontinueinstallationasnormal.
FedoraRemovediagnosticpackagesusingthefollowingcommand:$sudodnfremovecuda-drivers-diagnostic\xorg-x11-drv-nvidia-diagnosticFollowtheinstructionsheretocontinueinstallationasnormal.
OpenSUSE/SLESRemovediagnosticpackagesusingthefollowingcommand:$sudozypperremovecuda-drivers-diagnostic\nvidia-diagnosticG04Followtheinstructionsheretocontinueinstallationasnormal.
UbuntuRemovediagnosticpackagesusingthefollowingcommand:$sudoapt-get--purgeremovecuda-drivers-diagnostic\nvidia-384-diagnosticFollowtheinstructionsheretocontinueinstallationasnormal.
UseaspecificGPUforrenderingthedisplay.
AddorreplaceaDeviceentryinyourxorg.
conffile,locatedat/etc/X11/xorg.
conf.
TheDeviceentryshouldresemblethefollowing:Section"Device"Identifier"Device0"Driver"driver_name"VendorName"vendor_name"BusID"bus_id"EndSectionThedetailswillyouwillneedtoadddifferonacase-by-casebasis.
Forexample,ifyouhavetwoNVIDIAGPUsandyouwantthefirstGPUtobeusedfordisplay,youwouldreplace"driver_name"with"nvidia","vendor_name"with"NVIDIACorporation"and"bus_id"withtheBusIDoftheGPU.
AdvancedSetupwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|35ScenarioInstructionsTheBusIDwillresemble"PCI:00:02.
0"andcanbefoundbyrunninglspci.
InstallCUDAtoaspecificdirectoryusingthePackageManagerinstallationmethod.
RPMTheRPMpackagesdon'tsupportcustominstalllocationsthroughthepackagemanagers(YumandZypper),butitispossibletoinstalltheRPMpackagestoacustomlocationusingrpm's--relocateparameter:$sudorpm--install--relocate/usr/local/cuda-10.
1=/new/toolkitpackage.
rpmYouwillneedtoinstallthepackagesinthecorrectdependencyorder;thistaskisnormallytakencareofbythepackagemanagers.
Forexample,ifpackage"foo"hasadependencyonpackage"bar",youshouldinstallpackage"bar"first,andpackage"foo"second.
YoucancheckthedependenciesofaRPMpackageasfollows:$rpm-qRppackage.
rpmNotethatthedriverpackagescannotberelocated.
DebTheDebpackagesdonotsupportcustominstalllocations.
ItishoweverpossibletoextractthecontentsoftheDebpackagesandmovethefilestothedesiredinstalllocation.
SeethenextscenarioformoredetailsonextractingDebpackages.
Extractthecontentsoftheinstallers.
RunfileTheRunfilecanbeextractedintothestandaloneToolkit,SamplesandDriverRunfilesbyusingthe--extractparameter.
TheToolkitandSamplesstandaloneRunfilescanbefurtherextractedbyrunning:$.
/runfile.
run--tarmxvfTheDriverRunfilecanbeextractedbyrunning:$.
/runfile.
run-xRPMTheRPMpackagescanbeextractedbyrunning:$rpm2cpiopackage.
rpm|cpio-idmvDebTheDebpackagescanbeextractedbyrunning:$dpkg-deb-xpackage.
deboutput_dirModifyUbuntu'saptpackagemanagertoqueryspecificarchitecturesforspecificrepositories.
Thisisusefulwhenaforeignarchitecturehasbeenadded,causing"404NotFound"errorstoappearwhentheEachrepositoryyouwishtorestricttospecificarchitecturesmusthaveitssources.
listentrymodified.
Thisisdonebymodifyingthe/etc/apt/sources.
listfileandanyfilescontainingrepositoriesyouwishtorestrictunderthe/etc/apt/sources.
list.
d/directory.
Normally,itissufficienttomodifyonlytheentriesin/etc/apt/sources.
listAnarchitecture-restrictedrepositoryentrylookslike:deb[arch=,]Forexample,ifyouwantedtorestrictarepositorytoonlytheamd64andi386architectures,itwouldlooklike:AdvancedSetupwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|36ScenarioInstructionsrepositorymeta-dataisupdated.
deb[arch=amd64,i386]Itisnotnecessarytorestrictthedeb-srcrepositories,astheserepositoriesdon'tprovidearchitecture-specificpackages.
Formoredetails,seethesources.
listmanpage.
Thenvidia.
kokernelmodulefailstoload,sayingsomesymbolsareunknown.
Forexample:nvidia:Unknownsymboldrm_open(err0)Checktoseeifthereareanyoptionallyinstallablemodulesthatmightprovidethesesymbolswhicharenotcurrentlyinstalled.
Fortheexampleofthedrm_opensymbol,checktoseeifthereareanypackageswhichprovidedrm_openandarenotalreadyinstalled.
Forinstance,onUbuntu14.
04,thelinux-image-extrapackageprovidestheDRMkernelmodule(whichprovidesdrm_open).
ThispackageisoptionaleventhoughthekernelheadersreflecttheavailabilityofDRMregardlessofwhetherthispackageisinstalledornot.
TherunfileinstallerfailstoextractduetolimitedspaceintheTMPdirectory.
ThiscanoccuronsystemswithlimitedstorageintheTMPdirectory(usually/tmp),oronsystemswhichuseatmpfsinmemorytohandletemporarystorage.
Inthiscase,the--tmpdircommand-lineoptionshouldbeusedtoinstructtherunfiletouseadirectorywithsufficientspacetoextractinto.
Moreinformationonthisoptioncanbefoundhere.
Re-enableWaylandafterinstallingtheRPMdriveronFedora.
WaylandisdisabledduringinstallationoftheFedoradriverRPMduetocompatabilityissues.
Tore-enablewayland,commentoutthislinein/etc/gdm/custom.
conf:WaylandEnable=falsewww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|37Chapter9.
FREQUENTLYASKEDQUESTIONSHowdoIinstalltheToolkitinadifferentlocationTheRunfileinstallationaskswhereyouwishtoinstalltheToolkitandtheSamplesduringaninteractiveinstall.
Ifinstallingusinganon-interactiveinstall,youcanusethe--toolkitpathand--samplespathparameterstochangetheinstalllocation:$.
/runfile.
run--silent\--toolkit--toolkitpath=/my/new/toolkit\--samples--samplespath=/my/new/samplesTheRPMandDebpackagescannotbeinstalledtoacustominstalllocationdirectlyusingthepackagemanagers.
Seethe"InstallCUDAtoaspecificdirectoryusingthePackageManagerinstallationmethod"scenariointheAdvancedSetupsectionformoreinformation.
WhydoIsee"nvcc:Nosuchfileordirectory"whenItrytobuildaCUDAapplicationYourPATHenvironmentvariableisnotsetupcorrectly.
EnsurethatyourPATHincludesthebindirectorywhereyouinstalledtheToolkit,usually/usr/local/cuda-10.
1/bin.
$exportPATH=/usr/local/cuda-10.
1/bin${PATH:+:${PATH}}WhydoIsee"errorwhileloadingsharedlibraries::cannotopensharedobjectfile:NoFrequentlyAskedQuestionswww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|38suchfileordirectory"whenItrytorunaCUDAapplicationthatusesaCUDAlibraryYourLD_LIBRARY_PATHenvironmentvariableisnotsetupcorrectly.
EnsurethatyourLD_LIBRARY_PATHincludestheliband/orlib64directorywhereyouinstalledtheToolkit,usually/usr/local/cuda-10.
1/lib{,64}:$exportLD_LIBRARY_PATH=/usr/local/cuda-10.
1/lib\${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}WhydoIseemultiple"404NotFound"errorswhenupdatingmyrepositorymeta-dataonUbuntuTheseerrorsoccurafteraddingaforeignarchitecturebecauseaptisattemptingtoqueryforeacharchitecturewithineachrepositorylistedinthesystem'ssources.
listfile.
Repositoriesthatdonothostpackagesforthenewlyaddedarchitecturewillpresentthiserror.
Whilenoisy,theerroritselfdoesnoharm.
PleaseseetheAdvancedSetupsectionfordetailsonhowtomodifyyoursources.
listfiletopreventtheseerrors.
HowcanItellXtoignoreaGPUforcompute-onlyuseTomakesureXdoesn'tuseacertainGPUfordisplay,youneedtospecifywhichotherGPUtousefordisplay.
Formoreinformation,pleaserefertothe"UseaspecificGPUforrenderingthedisplay"scenariointheAdvancedSetupsection.
Whydoesn'tthecuda-repopackageinstalltheCUDAToolkitandDriversWhenusingRPMorDeb,thedownloadedpackageisarepositorypackage.
Suchapackageonlyinformsthepackagemanagerwheretofindtheactualinstallationpackages,butwillnotinstallthem.
SeethePackageManagerInstallationsectionformoredetails.
HowdoIgetCUDAtoworkonalaptopwithaniGPUandadGPUrunningUbuntu14.
04AfterinstallingCUDA,setthedrivervaluefortheinteldevicein/etc/X11/xorg.
confto'modesetting'asshownbelow:FrequentlyAskedQuestionswww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|39Section"Device"Identifier"intel"Driver"modesetting".
.
.
EndSectionTopreventUbuntufromrevertingthechangeinxorg.
conf,edit/etc/default/grubtoadd"nogpumanager"toGRUB_CMDLINE_LINUX_DEFAULT.
Runthefollowingcommandtoupdategrubbeforerebooting:$sudoupdate-grubWhatdoIdoifthedisplaydoesnotload,orCUDAdoesnotwork,afterperformingasystemupdateSystemupdatesmayincludeanupdatedLinuxkernel.
Inmanycases,anewLinuxkernelwillbeinstalledwithoutproperlyupdatingtherequiredLinuxkernelheadersanddevelopmentpackages.
ToensuretheCUDAdrivercontinuestoworkwhenperformingasystemupdate,rerunthecommandsintheKernelHeadersandDevelopmentPackagessection.
Additionally,onFedora,theAkmodsframeworkwillsometimesfailtocorrectlyrebuildtheNVIDIAkernelmodulepackageswhenanewLinuxkernelisinstalled.
Whenthishappens,itisusuallysufficienttoinvokeAkmodsmanuallyandregeneratethemodulemappingfilesbyrunningthefollowingcommandsinavirtualconsole,andthenrebooting:$sudoakmods--force$sudodepmodYoucanreachavirtualconsolebyhittingctrl+alt+f2atthesametime.
HowdoIinstallaCUDAdriverwithaversionlessthan367usinganetworkrepoToinstallaCUDAdriverataversionearlierthan367usinganetworkrepo,therequiredpackageswillneedtobeexplicitlyinstalledatthedesiredversion.
Forexample,toinstall352.
99,insteadofinstallingthecuda-driversmetapackageatversion352.
99,youwillneedtoinstallallrequiredpackagesofcuda-driversatversion352.
99.
HowdoIinstallanolderCUDAversionusinganetworkrepoDependingonyoursystemconfiguration,youmaynotbeabletoinstalloldversionsofCUDAusingthecudametapackage.
InordertoinstallaspecificversionofCUDA,youmayneedtospecifyallofthepackagesthatwouldnormallybeinstalledbythecudametapackageattheversionyouwanttoinstall.
FrequentlyAskedQuestionswww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|40Ifyouareusingyumtoinstallcertainpackagesatanolderversion,thedependenciesmaynotresolveasexpected.
Inthiscaseyoumayneedtopass"--setopt=obsoletes=0"toyumtoallowaninstallofpackageswhichareobsoletedatalaterversionthanyouaretryingtoinstall.
www.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|41Chapter10.
ADDITIONALCONSIDERATIONSNowthatyouhaveCUDA-capablehardwareandtheNVIDIACUDAToolkitinstalled,youcanexamineandenjoythenumerousincludedprograms.
TobeginusingCUDAtoacceleratetheperformanceofyourownapplications,consulttheCUDACProgrammingGuide,locatedin/usr/local/cuda-10.
1/doc.
AnumberofhelpfuldevelopmenttoolsareincludedintheCUDAToolkittoassistyouasyoudevelopyourCUDAprograms,suchasNVIDIANsightEclipseEdition,NVIDIAVisualProfiler,cuda-gdb,andcuda-memcheck.
Fortechnicalsupportonprogrammingquestions,consultandparticipateinthedeveloperforumsathttp://developer.
nvidia.
com/cuda/.
www.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|42Chapter11.
REMOVINGCUDATOOLKITANDDRIVERFollowthebelowstepstoproperlyuninstalltheCUDAToolkitandNVIDIADriversfromyoursystem.
Thesestepswillensurethattheuninstallationwillbeclean.
RHEL/CentOSToremoveCUDAToolkit:$sudoyumremove"*cublas*""cuda*"ToremoveNVIDIADrivers:$sudoyumremove"*nvidia*"FedoraToremoveCUDAToolkit:$sudodnfremove"*cublas*""cuda*"ToremoveNVIDIADrivers:$sudodnfremove"*nvidia*"OpenSUSE/SLESToremoveCUDAToolkit:$sudozypperremove"*cublas*""cuda*"ToremoveNVIDIADrivers:$sudozypperremove"*nvidia*"UbuntuToremoveCUDAToolkit:$sudoapt-get--purgeremove"*cublas*""cuda*"RemovingCUDAToolkitandDriverwww.
nvidia.
comNVIDIACUDAInstallationGuideforLinuxDU-05347-001_v10.
1|43ToremoveNVIDIADrivers:$sudoapt-get--purgeremove"*nvidia*"NoticeALLNVIDIADESIGNSPECIFICATIONS,REFERENCEBOARDS,FILES,DRAWINGS,DIAGNOSTICS,LISTS,ANDOTHERDOCUMENTS(TOGETHERANDSEPARATELY,"MATERIALS")AREBEINGPROVIDED"ASIS.
"NVIDIAMAKESNOWARRANTIES,EXPRESSED,IMPLIED,STATUTORY,OROTHERWISEWITHRESPECTTOTHEMATERIALS,ANDEXPRESSLYDISCLAIMSALLIMPLIEDWARRANTIESOFNONINFRINGEMENT,MERCHANTABILITY,ANDFITNESSFORAPARTICULARPURPOSE.
Informationfurnishedisbelievedtobeaccurateandreliable.
However,NVIDIACorporationassumesnoresponsibilityfortheconsequencesofuseofsuchinformationorforanyinfringementofpatentsorotherrightsofthirdpartiesthatmayresultfromitsuse.
NolicenseisgrantedbyimplicationofotherwiseunderanypatentrightsofNVIDIACorporation.
Specificationsmentionedinthispublicationaresubjecttochangewithoutnotice.
Thispublicationsupersedesandreplacesallotherinformationpreviouslysupplied.
NVIDIACorporationproductsarenotauthorizedascriticalcomponentsinlifesupportdevicesorsystemswithoutexpresswrittenapprovalofNVIDIACorporation.
TrademarksNVIDIAandtheNVIDIAlogoaretrademarksorregisteredtrademarksofNVIDIACorporationintheU.
S.
andothercountries.
Othercompanyandproductnamesmaybetrademarksoftherespectivecompanieswithwhichtheyareassociated.
Copyright2009-2019NVIDIACorporation.
Allrightsreserved.
www.
nvidia.
com

.asia域名是否适合做个人网站及.asia域名注册和续费成本

今天看到群里的老秦同学在布局自己的网站项目,这个同学还是比较奇怪的,他就喜欢用这些奇怪的域名。比如前几天看到有用.in域名,个人网站他用的.me域名不奇怪,这个还是常见的。今天看到他在做的一个范文网站的域名,居然用的是 .asia 后缀。问到其理由,是有不错好记的前缀。这里简单的搜索到.ASIA域名的新注册价格是有促销的,大约35元首年左右,续费大约是80元左右,这个成本算的话,比COM域名还贵。...

HostYun(25元)俄罗斯CN2广播IP地址

从介绍看啊,新增的HostYun 俄罗斯机房采用的是双向CN2线路,其他的像香港和日本机房,均为国内直连线路,访问质量不错。HostYun商家通用九折优惠码:HostYun内存CPUSSD流量带宽价格(原价)购买地址1G1核10G300G/月200M28元/月购买链接1G1核10G500G/月200M38元/月购买链接1G1核20G900G/月200M68元/月购买链接2G1核30G1500G/月...

Hostodo:$34.99/年KVM-2.5GB/25G NVMe/8TB/3个数据中心

Hostodo在九月份又发布了两款特别套餐,开设在美国拉斯维加斯、迈阿密和斯波坎机房,基于KVM架构,采用NVMe SSD高性能磁盘,最低1.5GB内存8TB月流量套餐年付34.99美元起。Hostodo是一家成立于2014年的国外VPS主机商,主打低价VPS套餐且年付为主,基于OpenVZ和KVM架构,美国三个地区机房,支持支付宝或者PayPal、加密货币等付款。下面列出这两款主机配置信息。CP...

ubuntu14.04为你推荐
openeuler电脑上显示openser是什么意思?中老铁路一带一路的火车是什么火车甲骨文不满赔偿工作不满半年被辞退,请问赔偿金是怎么算的?www.qq530.com谁能给我一个听歌的网站?www.bbb336.comwww.zzfyx.com大家感觉这个网站咋样,给俺看看呀。多提意见哦。哈哈。haokandianyingwang谁给个好看的电影网站看看。5xoy.comhttp www.05eee.com杨丽晓博客杨丽晓是如何进入娱乐圈的?www.123qqxx.com我的首页http://www.hao123.com被改成了http://www.669dh.cn/?yhc本冈一郎只想问本冈一郎的效果真的和说的一样吗?大概多长时间可以管用呢?用过的进!
域名转让 最便宜的vps 香港vps主机 德国vps 高防dns vps.net 私人服务器 isatap gomezpeer 一元域名 网通ip 炎黄盛世 电子邮件服务器 php空间推荐 idc是什么 135邮箱 中国电信测网速 流量计费 上海联通宽带测速 申请免费空间和域名 更多