<!-- keep this as a security measure: #uncomment if the subject should only be modifiable by the listed groups # * Set ALLOWTOPICCHANGE = Main.TWikiAdminGroup,Main.CMSAdminGroup # * Set ALLOWTOPICRENAME = Main.TWikiAdminGroup,Main.CMSAdminGroup #uncomment this if you want the page only be viewable by the listed groups # * Set ALLOWTOPICVIEW = Main.TWikiAdminGroup,Main.CMSAdminGroup,Main.CMSAdminReaderGroup --> ---+ Submitting Multicore/Multithreading job using multiple processors/threads on a single physical computer (SMP parallel job) Your program might require a number of threads. For instance, in the following example there is a demand for 8 threads (declared by number in round brackets): <pre> #Setup FWK for multithreaded process.options.numberOfThreads=cms.untracked.uint32(8) </pre> or something like *nthreads* demand in python script: <pre> parser.add_argument('--nthreads', action='store', help='Number of CPU threads to use', type=int, default=8, required=False) </pre> You correspondingly *must declare the number of cores that your job will require by using =--cpus-per-task== option in your job submission script*: <pre> #!/bin/bash #SBATCH --job-name=smp_illustration # Job name #SBATCH -p wn #SBATCH --account=t3 #SBATCH -w t3wn58 # choose particular Compute Node from wn partition #SBATCH --ntasks=1 # Run a single task #SBATCH --cpus-per-task=8 # Number of CPU cores per task; Example of submitting 8-core parallel SMP job #SBATCH --mem=3gb # Job memory request ##SBATCH --mem-per-cpu=3072 # example of memory request for one CPU core #SBATCH --time=00:05:00 # Time limit hrs:min:sec #SBATCH --output=smp_%j.log # Standard output and error log your_smp_script.sh </pre> -- Main.NinaLoktionova - 2019-09-24
This topic: CmsTier3
>
WebHome
>
SlurmUsage
>
CPUExampleForUsingMultipleProcessors(threads)OnASinglePhysicalComputer
Topic revision: r5 - 2020-03-13 - NinaLoktionova
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback