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

Something wrong in text_parser.h #209

Closed
Lisz1024 opened this issue Jan 12, 2017 · 1 comment
Closed

Something wrong in text_parser.h #209

Lisz1024 opened this issue Jan 12, 2017 · 1 comment

Comments

@Lisz1024
Copy link
Contributor

  const int nthread = omp_get_max_threads();
  data->resize(nthread);
  ...
  #pragma omp parallel num_threads(nthread_)
  {
    // threadid
    int tid = omp_get_thread_num();
    size_t nstep = (chunk.size + nthread - 1) / nthread;
   ...
  }

Why the num_threads is nthread_ , buy use nthread to calculate nstep?
In my machine, nthread_ = 2 and nthread = 20 , so I only can read 1/10 data, 18 data blocks are empty ...
Why not only use one of them? @tqchen

@tqchen
Copy link
Member

tqchen commented Jan 12, 2017

good point, can you open a PR to fix this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants