From ernest.turro at ic.ac.uk  Wed Feb  3 22:17:55 2010
From: ernest.turro at ic.ac.uk (Ernest Turro)
Date: Wed, 3 Feb 2010 21:17:55 +0000
Subject: [Rd] Fwd: ctrl-C aborts R when compiling package code with
	ICC+openMP
References: <3A083ED8-8635-48BD-879B-5D6E2BC05AD5@ic.ac.uk>
Message-ID: <1CC16EB0-3006-41B7-84C1-9DD765554045@ic.ac.uk>

I omitted to mention that when I set KMP_DUPLICATE_LIB_OK=TRUE and OMP_NUM_THREADS=1, I consistently get this error instead:

OMP: Error #13: Assertion failure at kmp_csupport.c(465).
OMP: Hint: Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see http://www.intel.com/software/products/support/.

Thanks,
Ernest


Begin forwarded message:

> From: Ernest Turro <ernest.turro at imperial.ac.uk>
> Date: 3 February 2010 20:49:42 GMT
> To: r-devel List <r-devel at r-project.org>
> Subject: [Rd] ctrl-C aborts R when compiling package code with ICC+openMP
> x-mailer: Apple Mail (2.1077)
> 
> Hi all,
> 
> I have some C++ code that I call from my package. In my main C++ loop, I check for user interrupts and return to the R shell after ensuring I've deallocated memory appropriately. This works fine when the code is compiled with gcc+openmp and with icc without openmp, but when I compile with icc and use openmp, the entire R session is immediately terminated when I hit ctrl-C. This happens even if I only have one thread and even if I set an openmp barrier just before checking for user interrupts.
> 
> When the R session terminates unexpectedly, I usually just get "Aborted" before return to the bash prompt. Occasionally, though, I get this error:
> 
> OMP: Error #15: Initializing libguide.so, but found libguide.so already initialized.
> OMP: Hint: This may cause performance degradation and correctness issues. Set environment variable KMP_DUPLICATE_LIB_OK=TRUE to ignore this problem and force the program to continue anyway. Please note that the use of KMP_DUPLICATE_LIB_OK is unsupported and using it may cause undefined behavior. For more information, please contact Intel(R) Premier Support.
> 
> But KMP_DUPLICATE_LIB_OK=TRUE changes nothing.
> 
> I had a look at:
> http://software.intel.com/en-us/articles/opm-abort-initializing-libguide40dll/
> 
> which suggests there may be a conflict between libguide40 and libiomp5md, but I can't find any loaded R packages that link against libiomp5md...
> 
> Does anyone have any ideas?
> 
> Many thanks,
> 
> Ernest
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Fwd: ctrl-C aborts R when compiling package code with ICC+openMP
Ernest Turro