Re: [Bioc-devel] Problem with non-portable compiler flags on package test

2019-04-13 Thread Aaron Lun
To contribute another data point on the use of architecture-specific 
compilation settings, see the discussion at:


https://www.mail-archive.com/bioc-devel@r-project.org/msg10525.html

This discrepancy took two months to track down. Two months! During my 
holidays! And it wasn't even my fault!


So, if you're putting in architecture-specific flags, (i) it had better 
be worth it, and (ii) a few CHECK warnings are and will be the least of 
your concerns.


-A

On 4/12/19 2:32 AM, Martin Morgan wrote:

Your configure outsmarts the check system, so your options are to omit the 
flags or to live with the warning. Either solution is fine with Bioconductor.

Martin

On 4/12/19, 4:17 AM, "Bioc-devel on behalf of Jochen Knaus" 
 wrote:

 Hi everybody,
 
 for our new R package "Netboost" we have a problem about non portable

 compiler flags. Basically we support AVX in our own C++ code (using
 compiler intrinsics to use the AVX units). Of course we have a non-AVX
 code path.
 
 For building we use autotools and configure to determine at installation

 time if the AVX unit is available and supported by the given compilers.
 If available then compilation is done with AVX, if not, then ordinary
 code path is used.
 
 The problem is the R package test, which does see the set AVX flag in

 "Makevars" (as Makevars.in is configured to use AVX if the test is
 executed on a machine supporting AVX).
 
 Note: due to bundled software, this is a Linux only package, so no

 support for Microsoft compilers is required (with other flag names).
 
 Is there any way around this warning, which is a real false-positive, as

 the flag is not set in environments not suitable.
 
 Thanks a lot for any help!
 
 Jo
 
 
 Details:
 
 for testing we use GNU Autotools and the AX_EXT M4-macroset to determine

 the hardware and compiler support for additional features:
 https://www.gnu.org/software/autoconf-archive/ax_ext.html
 
 configure.ac:
 
 m4_include([m4/ax_gcc_x86_avx_xgetbv.m4])

 m4_include([m4/ax_gcc_x86_cpuid.m4])
 m4_include([m4/ax_check_compile_flag.m4])
 m4_include([m4/ax_ext.m4])
 
 # Probe CPU and compilers

 AX_EXT
 
 src/Makevars.in:
 
 PKG_CXXFLAGS=`${R_HOME}/bin/Rscript -e "Rcpp:::CxxFlags()"` @SIMD_FLAGS@
 
 Running R CMD CHECK with --as-cran, we get the warning:
 
 http://bioconductor.org/spb_reports/netboost_buildreport_20190412033232.html
 
 * checking compilation flags used ... WARNING Compilation used the

 following non-portable flag(s): -Wno-deprecated -maes -mavx -mavx2 -mfma
 -mmmx -msse -msse3 -msse4.1 -msse4.2 -mssse3
 
 (Basically we only need -mavx and optionally FMA, but AX_EXT sets all).
 
 --

 Jochen Knaus
 Institute of Biometry and Statistics
 Faculty of Medicine and Medical Center - University of Freiburg
 Office: IMBI library
 Postal address: Stefan-Meier-Str. 26, D-79104 Freiburg
 Phone: +49/761/203-5528
 Mail: j...@imbi.uni-freiburg.de
 Homepage: http://www.imbi.uni-freiburg.de
 
 
 	[[alternative HTML version deleted]]
 
 ___

 Bioc-devel@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/bioc-devel
 
___

Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel



___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Problem with non-portable compiler flags on package test

2019-04-12 Thread Martin Morgan
Your configure outsmarts the check system, so your options are to omit the 
flags or to live with the warning. Either solution is fine with Bioconductor.

Martin

On 4/12/19, 4:17 AM, "Bioc-devel on behalf of Jochen Knaus" 
 wrote:

Hi everybody,

for our new R package "Netboost" we have a problem about non portable 
compiler flags. Basically we support AVX in our own C++ code (using 
compiler intrinsics to use the AVX units). Of course we have a non-AVX 
code path.

For building we use autotools and configure to determine at installation 
time if the AVX unit is available and supported by the given compilers. 
If available then compilation is done with AVX, if not, then ordinary 
code path is used.

The problem is the R package test, which does see the set AVX flag in 
"Makevars" (as Makevars.in is configured to use AVX if the test is 
executed on a machine supporting AVX).

Note: due to bundled software, this is a Linux only package, so no 
support for Microsoft compilers is required (with other flag names).

Is there any way around this warning, which is a real false-positive, as 
the flag is not set in environments not suitable.

Thanks a lot for any help!

Jo


Details:

for testing we use GNU Autotools and the AX_EXT M4-macroset to determine 
the hardware and compiler support for additional features: 
https://www.gnu.org/software/autoconf-archive/ax_ext.html

configure.ac:

m4_include([m4/ax_gcc_x86_avx_xgetbv.m4])
m4_include([m4/ax_gcc_x86_cpuid.m4])
m4_include([m4/ax_check_compile_flag.m4])
m4_include([m4/ax_ext.m4])

# Probe CPU and compilers
AX_EXT

src/Makevars.in:

PKG_CXXFLAGS=`${R_HOME}/bin/Rscript -e "Rcpp:::CxxFlags()"` @SIMD_FLAGS@

Running R CMD CHECK with --as-cran, we get the warning:

http://bioconductor.org/spb_reports/netboost_buildreport_20190412033232.html

* checking compilation flags used ... WARNING Compilation used the 
following non-portable flag(s): -Wno-deprecated -maes -mavx -mavx2 -mfma 
-mmmx -msse -msse3 -msse4.1 -msse4.2 -mssse3

(Basically we only need -mavx and optionally FMA, but AX_EXT sets all).

-- 
Jochen Knaus
Institute of Biometry and Statistics
Faculty of Medicine and Medical Center - University of Freiburg
Office: IMBI library
Postal address: Stefan-Meier-Str. 26, D-79104 Freiburg
Phone: +49/761/203-5528
Mail: j...@imbi.uni-freiburg.de
Homepage: http://www.imbi.uni-freiburg.de


[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


[Bioc-devel] Problem with non-portable compiler flags on package test

2019-04-12 Thread Jochen Knaus
Hi everybody,

for our new R package "Netboost" we have a problem about non portable 
compiler flags. Basically we support AVX in our own C++ code (using 
compiler intrinsics to use the AVX units). Of course we have a non-AVX 
code path.

For building we use autotools and configure to determine at installation 
time if the AVX unit is available and supported by the given compilers. 
If available then compilation is done with AVX, if not, then ordinary 
code path is used.

The problem is the R package test, which does see the set AVX flag in 
"Makevars" (as Makevars.in is configured to use AVX if the test is 
executed on a machine supporting AVX).

Note: due to bundled software, this is a Linux only package, so no 
support for Microsoft compilers is required (with other flag names).

Is there any way around this warning, which is a real false-positive, as 
the flag is not set in environments not suitable.

Thanks a lot for any help!

Jo


Details:

for testing we use GNU Autotools and the AX_EXT M4-macroset to determine 
the hardware and compiler support for additional features: 
https://www.gnu.org/software/autoconf-archive/ax_ext.html

configure.ac:

m4_include([m4/ax_gcc_x86_avx_xgetbv.m4])
m4_include([m4/ax_gcc_x86_cpuid.m4])
m4_include([m4/ax_check_compile_flag.m4])
m4_include([m4/ax_ext.m4])

# Probe CPU and compilers
AX_EXT

src/Makevars.in:

PKG_CXXFLAGS=`${R_HOME}/bin/Rscript -e "Rcpp:::CxxFlags()"` @SIMD_FLAGS@

Running R CMD CHECK with --as-cran, we get the warning:

http://bioconductor.org/spb_reports/netboost_buildreport_20190412033232.html

* checking compilation flags used ... WARNING Compilation used the 
following non-portable flag(s): -Wno-deprecated -maes -mavx -mavx2 -mfma 
-mmmx -msse -msse3 -msse4.1 -msse4.2 -mssse3

(Basically we only need -mavx and optionally FMA, but AX_EXT sets all).

-- 
Jochen Knaus
Institute of Biometry and Statistics
Faculty of Medicine and Medical Center - University of Freiburg
Office: IMBI library
Postal address: Stefan-Meier-Str. 26, D-79104 Freiburg
Phone: +49/761/203-5528
Mail: j...@imbi.uni-freiburg.de
Homepage: http://www.imbi.uni-freiburg.de


[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel