search for: nthread

Displaying 19 results from an estimated 19 matches for "nthread".

Did you mean: thread
2015 Dec 02
2
clang only spawns one thread
Hi, I am using LLVM 3.6.1 to test the following code: #include <omp.h> #include <stdio.h> #include <stdlib.h> int main() { int tid, nthreads; #pragma omp parallel sections private(nthreads, tid) { #pragma omp section { tid = omp_get_thread_num(); printf("Hello, tid = %d\n ", tid); } #pragma omp section { tid = omp_get_thread_num(); printf("Hello, tid = %d\n ", tid); } } if (tid =...
2019 Feb 02
1
Set the number of threads using openmp with .Fortran?
I got this to work on Linux but it is not working on Windows. *My understanding is that this should also work on windows, is that correct?* If so, what should I do? differently? To get it to work on Linux, I modified my R script as follows: #' OpenMP Hello World #' #' @param nthreads The number of threads that you want to use #' @example #' hello(nthreads=2) #' @export #' @useDynLib helloOpenMP, .registration = TRUE hello <- function(nthreads=4) { (OpenMPController::omp_set_num_threads(nthreads)) .Fortran("hello") return('Each thread wi...
2013 May 24
0
Rcpp with OpenMP - Need example Makevars
Dear R experts, recently I started developing a Rcpp package "OpenMPTest". Within that package I want to use OpenMP, as in the following code example: // header file #include <omp.h> using namespace Rcpp ; RcppExport SEXP testOpenMP( SEXP nThreads ) ; // cpp file SEXP testOpenMP( SEXP nThreads ) { BEGIN_RCPP NumericVector numberThreads = NumericVector( nThreads ); omp_set_num_threads( numberThreads(0) ); #pragma omp parallel { // Code inside this region runs in parallel. printf("Hello!\n"); } END_RCPP } A...
2010 Jul 10
1
Set the number of threads using openmp with .C
Hi everybody! Could somebody help me with the following? I'm trying to run a simple Hello World code in openmp using .C function. The C code i have is: #include <omp.h> #include <stdio.h> #include <R.h> void hello_omp(int *n) { int th_id, nthreads; omp_set_num_threads(*n); #pragma omp parallel private(th_id) { th_id = omp_get_thread_num(); Rprintf("Hello World from thread %d\n", th_id); #pragma omp barrier if ( th_id == 0 ) { nthreads = omp_get_num_threads(); Rprintf("There are %d th...
2007 Oct 08
16
Fileserver performance tests
...ver 12746: 7.445: FileServer Version 1.14 2005/06/21 21:18:52 personality successfully loaded 12746: 7.445: Usage: set $dir=<dir> 12746: 7.445: set $filesize=<size> defaults to 131072 12746: 7.445: set $nfiles=<value> defaults to 1000 12746: 7.445: set $nthreads=<value> defaults to 100 12746: 7.445: set $meaniosize=<value> defaults to 16384 12746: 7.445: set $meandirwidth=<size> defaults to 20 12746: 7.445: (sets mean dir width and dir depth is calculated as log (width, nfiles) 12746: 7.445: 12746: 7.445: run runti...
2019 Feb 01
2
Set the number of threads using openmp with .Fortran?
Hi everybody, I'm trying to develop an R package with Fortran and OpenMP. I wrote a simple hello world but I'm not able to set the number of threads. I found this old email chain <http://r.789695.n4.nabble.com/Set-the-number-of-threads-using-openmp-with-C-td2284685.html> and I tried to set my compile instructions accordingly but i had no luck. *This is my makevars:*
2018 Apr 03
0
xgboost: problems with predictions for count data [SEC=UNCLASSIFIED]
...family = "poisson", n.cores=2) range(gbmpred1$Predictions) [1] 10.04643 31.39230 # the expected predictions # Here are results from xgboost # use count:poisson library(xgboost) xgbst2.1 <- xgboost(data = as.matrix(sponge[, -c(3)]), label = sponge[, 3], max_depth = 2, eta = 0.001, nthread = 6, nrounds = 3000, objective = "count:poisson") xgbstpred2 <- predict(xgbst2.1, as.matrix(sponge.grid)) head(xgbstpred2) range(xgbstpred2) [1] 1.109032 4.083049 # much lower than expected table(xgbstpred2) 1.10903215408325 1.26556181907654 3.578040599823 4.0...
2011 Aug 29
3
How to safely using OpenMP pragma inside a .C() function?
I am trying to parallelize part of a C function that is called from R (via .C) using OpenMP's "parallel for" pragma. I get mixed results: some runs finish with no problem, but some lead to R crashing after issuing a long error message involving memory violations. I found this post, which describes how a .Call() function can be made to avoid crashing R by raising the stack limit:
2013 Jun 08
2
Compile error with gfortran-4.6
...irectives. When compiling the code in gfortran 4.4 does not occur any problem. When compiling the code in gfortran 4.6, an error message appears. In other compilers the error does not occur. A small example. ## Code in Fortran        subroutine hello()        implicit none        integer :: nthreads, tid        integer :: omp_get_num_threads, omp_get_thread_num        integer :: omp_get_max_threads, omp_set_num_threads        print *, 'Máximo de threads', omp_get_max_threads()        !$omp parallel         tid = omp_get_thread_num()        print *, 'Hello World from thread = ...
2014 Apr 18
2
[LLVMdev] multithreaded performance disaster with -fprofile-instr-generate (contention on profile counters)
...unt = std::min(MAX, std::max(NUMBER_OF_THREADS, NUMBER_OF_CORES)) > > Threads do not produce contention, it's cores that produce contention. > The formula must be: shard_count = k*NCORES > And if you want less memory in single-threaded case, then: shard_count = > min(k*NCORES, c*NTHREADS) > > > > >We are talking about developers here. Nobody would know the exact thread > counts, but developers know the ballpark number > > I strongly believe that we must relief developers from this choice during > build time, and do our best to auto-tune (if the final sch...
2013 Jun 08
0
Compile error gfortran-4.6
...irectives. When compiling the code in gfortran 4.4 does not occur any problem. When compiling the code in gfortran 4.6, an error message appears. In other compilers the error does not occur. A small example. ## Code in Fortran        subroutine hello()        implicit none        integer :: nthreads, tid        integer :: omp_get_num_threads, omp_get_thread_num        integer :: omp_get_max_threads, omp_set_num_threads        print *, 'Máximo de threads', omp_get_max_threads()        !$omp parallel         tid = omp_get_thread_num()        print *, 'Hello World from thread = ...
2010 Mar 02
9
Filebench Performance is weird
...hdd/fs32k; $statsdir=/export/home/abdullah/bench.stat/woow87; stats = /export/home/abdullah/bench.stat; filesystem = zfs; description = "ZFS-RR-WS-10M"; } CONFIG rr32k { function = generic; personality = randomread; filesize = 5g; iosize = 32k; nthreads = 1; workingset=10m; } And the Run result .... abdullah at HP_HDX_16:/usr/benchmarks/filebench/config# filebench rrws10m parsing profile for config: rr32k Creating Client Script /export/home/abdullah/bench.stat/HP_HDX_16-zfs-rrws10m-Mar_2_2010-03h_10m_46s/rr32k/thisrun.f Running /export/hom...
2014 Apr 18
4
[LLVMdev] multithreaded performance disaster with -fprofile-instr-generate (contention on profile counters)
On Apr 17, 2014, at 2:04 PM, Chandler Carruth <chandlerc at google.com> wrote: > On Thu, Apr 17, 2014 at 1:27 PM, Justin Bogner <mail at justinbogner.com> wrote: > Chandler Carruth <chandlerc at google.com> writes: > > if (thread-ID != main's thread-ID && shard_count < std::min(MAX, NUMBER_OF_CORES)) { > > shard_count = std::min(MAX,
2014 Apr 18
2
[LLVMdev] multithreaded performance disaster with -fprofile-instr-generate (contention on profile counters)
...gt;> NUMBER_OF_CORES)) >>> >>> Threads do not produce contention, it's cores that produce contention. >>> The formula must be: shard_count = k*NCORES >>> And if you want less memory in single-threaded case, then: shard_count = >>> min(k*NCORES, c*NTHREADS) >>> >>> >>> >>> >We are talking about developers here. Nobody would know the exact >>> thread counts, but developers know the ballpark number >>> >>> I strongly believe that we must relief developers from this choice >>> d...
2012 Mar 11
2
[patch] Threading support in ssh-agent
...AC_LANG_PROGRAM( + [[ + #include <unistd.h> + ]] , [[ + sysconf(_SC_NPROCESSORS_CONF); + ]] + ) + ] , [ + AC_DEFINE([HAVE___SC_NPROCESSORS_CONF],[],[Whether sysconf(_SC_NPROCESSORS_CONF) is supported.]) + AC_MSG_RESULT([yes]) + ssh_agent_options="$ssh_agent_options nthreads:auto" + ] , [ + AC_MSG_RESULT([no]) + AC_MSG_WARN([ssh-agent: do not use threading by default]) + ssh_agent_options="$ssh_agent_options nthreads:manual,default=0" + ] + ) +fi + # Check for PAM libs PAM_MSG="no" AC_ARG_WITH([pam], @@ -4285,6 +4362,7 @@ echo &quo...
2012 Aug 10
2
[LLVMdev] [RFC] Parallelization metadata and intrinsics in LLVM (for OpenMP, etc.)
...function. The pointer refers to an array of values, one for each thread that will execute the region. After the region completes, a loop must be created to actually perform the requested reduction. Inside the parallel region, each thread accesses its value using its thread id as the index. See the nthreads and tidx intrinsics below. -- Special handling regions -- - Serial Regions - Serial regions within parallel blocks (called 'single' in OpenMP) are executed only by one thread. As with parallel regions themselves, they are lowered as functions; the call site(s) of these functions are tag...
2009 Jan 27
5
Replacing HDD in x4500
The vendor wanted to come in and replace an HDD in the 2nd X4500, as it was "constantly busy", and since our x4500 has always died miserably in the past when a HDD dies, they wanted to replace it before the HDD actually died. The usual was done, HDD replaced, resilvering started and ran for about 50 minutes. Then the system hung, same as always, all ZFS related commands would just
2011 Nov 11
10
[RFC] [ver3 PATCH 0/6] Implement multiqueue virtio-net
This patch series resurrects the earlier multiple TX/RX queues functionality for virtio_net, and addresses the issues pointed out. It also includes an API to share irq's, f.e. amongst the TX vqs. I plan to run TCP/UDP STREAM and RR tests for local->host and local->remote, and send the results in the next couple of days. patch #1: Introduce VIRTIO_NET_F_MULTIQUEUE patch #2: Move
2011 Nov 11
10
[RFC] [ver3 PATCH 0/6] Implement multiqueue virtio-net
This patch series resurrects the earlier multiple TX/RX queues functionality for virtio_net, and addresses the issues pointed out. It also includes an API to share irq's, f.e. amongst the TX vqs. I plan to run TCP/UDP STREAM and RR tests for local->host and local->remote, and send the results in the next couple of days. patch #1: Introduce VIRTIO_NET_F_MULTIQUEUE patch #2: Move