Hi,
How does complex.h used in R? Whether a compiler support complex.h
or not, does it affect R's performance? I used PGI compiler to build
R-devel on AMD Opteron, but the configuration file failed to link BLAS
library despite the fact it is located in the usual location,
/usr/lib64. PGI said they don't support complex.h. R configuration
script printed out that doublecomplex is not supported. Are "supporting
complex.h" and "linking BLAS library" related?
any comments on this issue?
note: I can ignore linking BLAS and proceed to compile R with PGI
compiler successfully.
Regards,
Jennifer
complex.h in R
6 messages · Jennifer Lai, Brian Ripley
On Sat, 24 Sep 2005, Jennifer Lai wrote:
Hi,
How does complex.h used in R? Whether a compiler support complex.h
or not, does it affect R's performance?
complex.h will only used in future (2.2.0-to-be) versions of R, and only if configure finds enough C99 support. Otherwise R's own C-level complex support is used, as it always was. One would expect the OS's support to be faster and more accurate (but one could be disappointed, we have found).
I used PGI compiler to build R-devel on AMD Opteron, but the configuration file failed to link BLAS library despite the fact it is located in the usual location, /usr/lib64.
Look in config.log to find out why.
PGI said they don't support complex.h. R configuration script printed out that doublecomplex is not supported.
That is *FORTRAN* DOUBLE COMPLEX, and that does affect the operation of R, as without it you will not have complex linear algebra support.
Are "supporting complex.h" and "linking BLAS library" related?
No. They are completely orthoogonal concepts.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595
1 day later
Hi, I checked config.log and BLAS_LIBS was not set. However, I have set BLAS_LIBS='-L/usr/lib64 -lblas' in config.site file. I can't figure out why BLAS_LIBS is not set, when PGI compiler is used. When gcc is used, BLAS_LIBS need not be set in config.site and automatically get picked up by the configuration script. Here is a snapshot of the configuration script output (for buidling R with PGI compiler): checking for complex.h... yes checking for double complex... no checking for sgemm_ in -L/usr/lib64 -lblas... yes checking whether double complex BLAS can be used... no Is there other thing I should look into in the config.log? Your help is very much appreicated. Thanks, Jennifer
Prof Brian Ripley wrote:
On Sat, 24 Sep 2005, Jennifer Lai wrote:
Hi, How does complex.h used in R? Whether a compiler support complex.h or not, does it affect R's performance?
complex.h will only used in future (2.2.0-to-be) versions of R, and only if configure finds enough C99 support. Otherwise R's own C-level complex support is used, as it always was. One would expect the OS's support to be faster and more accurate (but one could be disappointed, we have found).
I used PGI compiler to build R-devel on AMD Opteron, but the configuration file failed to link BLAS library despite the fact it is located in the usual location, /usr/lib64.
Look in config.log to find out why.
PGI said they don't support complex.h. R configuration script printed out that doublecomplex is not supported.
That is *FORTRAN* DOUBLE COMPLEX, and that does affect the operation of R, as without it you will not have complex linear algebra support.
Are "supporting complex.h" and "linking BLAS library" related?
No. They are completely orthoogonal concepts.
On Mon, 26 Sep 2005, Jennifer Lai wrote:
Hi, I checked config.log and BLAS_LIBS was not set. However, I have set BLAS_LIBS='-L/usr/lib64 -lblas' in config.site file. I can't figure out why BLAS_LIBS is not set, when PGI compiler is used. When gcc is used, BLAS_LIBS need not be set in config.site and automatically get picked up by the configuration script. Here is a snapshot of the configuration script output (for buidling R with PGI compiler): checking for complex.h... yes checking for double complex... no checking for sgemm_ in -L/usr/lib64 -lblas... yes checking whether double complex BLAS can be used... no Is there other thing I should look into in the config.log?
You need to look for the evidence for the line
checking for sgemm_ in -L/usr/lib64 -lblas... yes
in config.log. I very much doubt that -L/usr/lib64 helps you: surely that should be in your library path. But you will probably find you cannot mix code compiled under different compilers, especially as -lblas is likely to be Fortran compiled with g77. (You may need -lblas -lg2c, but you would be better off using the BLAS built into R.)
Your help is very much appreicated. Thanks, Jennifer Prof Brian Ripley wrote:
On Sat, 24 Sep 2005, Jennifer Lai wrote:
Hi, How does complex.h used in R? Whether a compiler support complex.h or not, does it affect R's performance?
complex.h will only used in future (2.2.0-to-be) versions of R, and only if configure finds enough C99 support. Otherwise R's own C-level complex support is used, as it always was. One would expect the OS's support to be faster and more accurate (but one could be disappointed, we have found).
I used PGI compiler to build R-devel on AMD Opteron, but the configuration file failed to link BLAS library despite the fact it is located in the usual location, /usr/lib64.
Look in config.log to find out why.
PGI said they don't support complex.h. R configuration script printed out that doublecomplex is not supported.
That is *FORTRAN* DOUBLE COMPLEX, and that does affect the operation of R, as without it you will not have complex linear algebra support.
Are "supporting complex.h" and "linking BLAS library" related?
No. They are completely orthoogonal concepts.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Hi,
Prof Brian Ripley wrote:
On Mon, 26 Sep 2005, Jennifer Lai wrote:
Hi, I checked config.log and BLAS_LIBS was not set. However, I have set BLAS_LIBS='-L/usr/lib64 -lblas' in config.site file. I can't figure out why BLAS_LIBS is not set, when PGI compiler is used. When gcc is used, BLAS_LIBS need not be set in config.site and automatically get picked up by the configuration script. Here is a snapshot of the configuration script output (for buidling R with PGI compiler): checking for complex.h... yes checking for double complex... no checking for sgemm_ in -L/usr/lib64 -lblas... yes checking whether double complex BLAS can be used... no Is there other thing I should look into in the config.log?
You need to look for the evidence for the line
checking for sgemm_ in -L/usr/lib64 -lblas... yes
in config.log. I very much doubt that -L/usr/lib64 helps you: surely that should be in your library path. But you will probably find you cannot mix code compiled under different compilers, especially as -lblas is likely to be Fortran compiled with g77. (You may need -lblas -lg2c, but you would be better off using the BLAS built into R.)
"-lg2c -lblas" didn't work. I am not sure if mixing code compiled under different compilers is the problem, because I built R with ACML library (PGI compiled), and config.log still shows that BLAS_LIBS is not set. Sorry for being ignorant, but where is the BLAS built into R? Is configuring R with "--without-blas" option pick up the BLAS built into R? I thought it's to build R with BLAS package. Your help is very much appreciated. Thanks, Jennifer
On Mon, 26 Sep 2005, Jennifer Lai wrote:
Hi, Prof Brian Ripley wrote:
On Mon, 26 Sep 2005, Jennifer Lai wrote:
Hi, I checked config.log and BLAS_LIBS was not set. However, I have set BLAS_LIBS='-L/usr/lib64 -lblas' in config.site file. I can't figure out why BLAS_LIBS is not set, when PGI compiler is used. When gcc is used, BLAS_LIBS need not be set in config.site and automatically get picked up by the configuration script. Here is a snapshot of the configuration script output (for buidling R with PGI compiler): checking for complex.h... yes checking for double complex... no checking for sgemm_ in -L/usr/lib64 -lblas... yes checking whether double complex BLAS can be used... no Is there other thing I should look into in the config.log?
You need to look for the evidence for the line
checking for sgemm_ in -L/usr/lib64 -lblas... yes
in config.log.
Where is it?
I very much doubt that -L/usr/lib64 helps you: surely that
should be in your library path. But you will probably find you cannot mix code compiled under different compilers, especially as -lblas is likely to be Fortran compiled with g77. (You may need -lblas -lg2c, but you would be better off using the BLAS built into R.)
"-lg2c -lblas" didn't work. I am not sure if mixing code compiled under different compilers is the problem, because I built R with ACML library (PGI compiled), and config.log still shows that BLAS_LIBS is not set. Sorry for being ignorant, but where is the BLAS built into R? Is configuring R with "--without-blas" option pick up the BLAS built into R? I thought it's to build R with BLAS package.
No, and please 1) Do read the relevant manual 2) Do answer the question.
Your help is very much appreciated. Thanks, Jennifer
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595