Sarah
New Member
Posts: 31
|
Post by Sarah on Nov 28, 2017 17:55:28 GMT 8
So... I just updated to profit v1.1.0 and added nbenchmark=5L in profitSetupData to see what happens: My Laptop simply crashes, the big machine at least manages to print an error message before that. The console output is "libgomp: Out of memory allocating 395136992576 bytes" and the log file says "Error in FUN(X[], ...) : 'mckill' failed Calls: %dopar% ... mclapply -> cleanup -> mckill -> unlist -> lapply -> FUN Execution halted" This happens even if I run a single galaxy on a single core with just 1 benchmark. Everything works fine if I set nbenchmark to 0 (so that's the good news). Any ideas what it's doing there (I can see how it would run out of memory if it seriously tries to allocate half a Terabyte to a single benchmark of a single galaxy, but why would it do that?)/how to solve this (other than just turning off the benchmarking)/has anybody else got similar issues?
|
|
|
Post by taranu on Nov 29, 2017 15:08:54 GMT 8
Hi Sarah, how are you calling profitSetupData? Does this happen even in the example given in the profitSetupData docs?
What version of GCC/OpenMP do you have? i.e.:
[...]$ echo |cpp -fopenmp -dM |grep -i open #define _OPENMP 201511 [...]$ gcc --version gcc (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2)
Also, by crashing on your laptop do you mean when running in Rstudio? Can you try running it in an R session in the terminal and see if there's any output? Try setting printbenchmark=TRUE and see if it gets to actually doing anything useful.
|
|
Sarah
New Member
Posts: 31
|
Post by Sarah on Nov 29, 2017 16:05:38 GMT 8
Hi Dan,
so I think the problem occurs when I set nbenchmark without setting omp_threads: The example given in ?profitSetupData works if I run it as is (except it warns me that I don't have OpenCL support), but it fails as soon as I remove the omp_threads=4 argument.
Running the example as given prints: name env_name version dev_name tinms.mean_single tinms.mean_double 1 brute NA NA NA NA 4.8 2 fft NA NA NA NA 30.6 [1] "Best convolver: 'brute' device: 'NA', t=[4.80e+00 ms]" Warning message: In profitOpenCLEnvInfo() : This ProFit package was not compiled with OpenCL support
I get the same output when removing most of the benchmarking arguments going back to defaults: Data=profitSetupData(image=image, sigma=sigma, segim=segim, mask=mask, psf=psf, modellist=modellist, tofit=tofit, tolog=tolog, magzero=0, algo.func='optim', verbose=TRUE, nbenchmark = 5L, printbenchmark = TRUE, omp_threads=4)
BUT if I remove omp_threads then Rstudio crashes and running it in the terminal gives "libgomp: Out of memory allocating 395136992576 bytes" (so the same it gave me on the big machine) and then closes R (no other output).
Here's the versions:
$ echo |cpp -fopenmp -dM |grep -i open #define _OPENMP 201307
$ gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
It also needs a library(backports) before running it otherwise it complains "Error: could not find function "startsWith""
|
|
Sarah
New Member
Posts: 31
|
Post by Sarah on Nov 29, 2017 16:29:11 GMT 8
Small update: It does work if I set omp_threads=0, just the default of NULL causes problems.
|
|
|
Post by taranu on Nov 29, 2017 19:30:31 GMT 8
Yeah, that was the problem. makeModel ignores omp_threads if it's NULL but the new-ish makeConvolver doesn't. Check out the update I just pushed and try it again.
|
|
Sarah
New Member
Posts: 31
|
Post by Sarah on Nov 29, 2017 20:40:54 GMT 8
Works now, thanks!
|
|