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

Parallel Multicore Sampling #2

Closed
allrtaken opened this issue Aug 26, 2020 · 1 comment
Closed

Parallel Multicore Sampling #2

allrtaken opened this issue Aug 26, 2020 · 1 comment

Comments

@allrtaken
Copy link

allrtaken commented Aug 26, 2020

Hi,

Is it possible to enable the latest Unigen to take advantage of multi-core processors like it was possible for Unigen2? I tried setting

--th=8

but CPU usage indicated that only one core was being used throughout. I need to generate a lot of samples so it would really speed things up if it were possible to parallelize.

Thanks!

@msoos
Copy link
Collaborator

msoos commented Aug 26, 2020

Ah, sorry, this was a bug. The number of threads is not supported in this way, I now removed the option. Instead, please run with different seeds, manually. So for example:

$ ./unigen blasted_case110.cnf.gz.no_w.cnf  --samples 50 --verb 0 --sampleout mysamples_thread1 -s 1 &
$ ./unigen blasted_case110.cnf.gz.no_w.cnf  --samples 50 --verb 0 --sampleout mysamples_thread2 -s 2 &
$ ./unigen blasted_case110.cnf.gz.no_w.cnf  --samples 50 --verb 0 --sampleout mysamples_thread3 -s 3 &

For running on 3 cores. Then you can combine the samples from mysamples_thread1..3 into a single file, e.g. : cat mysamples_thread* > all_samples and you are done :)

I hope this helped,

Mate

@msoos msoos closed this as completed Aug 26, 2020
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