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

Reduce number of macros in fortran compilation line for BLAS _64 API #861

Merged
merged 1 commit into from
Jul 4, 2023

Conversation

mkrainiuk
Copy link
Contributor

@mkrainiuk mkrainiuk commented Jun 28, 2023

Description

The PR removes the problem with very long list of ... -DISAMAX=ISAMAX_64 -DSASUM=SASUM_64 -DSAXPY=SAXPY_64 -D... options in BLAS_64 compilation lines. This PR adds only required macros for each particular file instead of generating list of macros for all files.

Compilation line before:

/usr/bin/f95   -frecursive -O2 -DNDEBUG -O2 -fPIC -fdefault-integer-8 -cpp -DISAMAX=ISAMAX_64 -DSASUM=SASUM_64 -DSAXPY=SAXPY_64 -DSCOPY=SCOPY_64 -DSDOT=SDOT_64 -DSNRM2=SNRM2_64 -DSROT=SROT_64 -DSROTG=SROTG_64 -DSSCAL=SSCAL_64 -DSSWAP=SSWAP_64 -DSDSDOT=SDSDOT_64 -DSROTMG=SROTMG_64 -DSROTM=SROTM_64 -DLSAME=LSAME_64 -DXERBLA=XERBLA_64 -DXERBLA_ARRAY=XERBLA_ARRAY_64 -DSGEMV=SGEMV_64 -DSGBMV=SGBMV_64 -DSSYMV=SSYMV_64 -DSSBMV=SSBMV_64 -DSSPMV=SSPMV_64 -DSTRMV=STRMV_64 -DSTBMV=STBMV_64 -DSTPMV=STPMV_64 -DSTRSV=STRSV_64 -DSTBSV=STBSV_64 -DSTPSV=STPSV_64 -DSGER=SGER_64 -DSSYR=SSYR_64 -DSSPR=SSPR_64 -DSSYR2=SSYR2_64 -DSSPR2=SSPR2_64 -DSGEMM=SGEMM_64 -DSSYMM=SSYMM_64 -DSSYRK=SSYRK_64 -DSSYR2K=SSYR2K_64 -DSTRMM=STRMM_64 -DSTRSM=STRSM_64 -DIDAMAX=IDAMAX_64 -DDASUM=DASUM_64 -DDAXPY=DAXPY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=CSYR2K_64 -DCTRMM=CTRMM_64 -DCTRSM=CTRSM_64 -DCHEMM=CHEMM_64 -DCHERK=CHERK_64 -DCHER2K=CHER2K_64 -DDCABS1=DCABS1_64 -DDZASUM=DZASUM_64 -DDZNRM2=DZNRM2_64 -DIZAMAX=IZAMAX_64 -DZAXPY=ZAXPY_64 -DZCOPY=ZCOPY_64 -DZDOTC=ZDOTC_64 -DZDOTU=ZDOTU_64 -DZDSCAL=ZDSCAL_64 -DZROTG=ZROTG_64 -DZSCAL=ZSCAL_64 -DZSWAP=ZSWAP_64 -DZDROT=ZDROT_64 -DZGEMV=ZGEMV_64 -DZGBMV=ZGBMV_64 -DZHEMV=ZHEMV_64 -DZHBMV=ZHBMV_64 -DZHPMV=ZHPMV_64 -DZTRMV=ZTRMV_64 -DZTBMV=ZTBMV_64 -DZTPMV=ZTPMV_64 -DZTRSV=ZTRSV_64 -DZTBSV=ZTBSV_64 -DZTPSV=ZTPSV_64 -DZGERC=ZGERC_64 -DZGERU=ZGERU_64 -DZHER=ZHER_64 -DZHPR=ZHPR_64 -DZHER2=ZHER2_64 -DZHPR2=ZHPR2_64 -DZGEMM=ZGEMM_64 -DZSYMM=ZSYMM_64 -DZSYRK=ZSYRK_64 -DZSYR2K=ZSYR2K_64 -DZTRMM=ZTRMM_64 -DZTRSM=ZTRSM_64 -DZHEMM=ZHEMM_64 -DZHERK=ZHERK_64 -DZHER2K=ZHER2K_64 -c /sandbox/netlib/lapack/BLAS/SRC/zsyr2k.f -o CMakeFiles/blas_64_obj.dir/zsyr2k.f.o 

Compilation line after:

/usr/bin/f95   -frecursive -O2 -DNDEBUG -O2 -fPIC -cpp -DZSYR2K=ZSYR2K_64 -DLSAME=LSAME_64 -DXERBLA=XERBLA_64 -c /sandbox/netlib/lapack/BLAS/SRC/zsyr2k.f -o CMakeFiles/blas_obj.dir/zsyr2k.f.o

Minor changes:

  • replace platform specific fPIC with POSITION_INDEPENDENT_CODE property in BLAS CMake config

Checklist

  • The documentation has been updated. N/A, since the changes are implementation detail to the excising functionality
  • If the PR solves a specific issue, it is set to be closed on merge. PR resolves one potential problem mentioned in CBLAS/LAPACKE extension for 64bit integer #666

@mkrainiuk mkrainiuk changed the title Reduce number of macros in fortran compilation line for BLAS_64 Reduce number of macros in fortran compilation line for BLAS _64 API Jun 28, 2023
@mkrainiuk mkrainiuk marked this pull request as draft June 28, 2023 21:22
@mkrainiuk mkrainiuk marked this pull request as ready for review June 28, 2023 23:09
@codecov
Copy link

codecov bot commented Jun 28, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (e2428ec) 0.00% compared to head (1d87581) 0.00%.

❗ Current head 1d87581 differs from pull request most recent head 80b492d. Consider uploading reports for the commit 80b492d to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #861   +/-   ##
=======================================
  Coverage    0.00%    0.00%           
=======================================
  Files        1916     1916           
  Lines      188485   188485           
=======================================
  Misses     188485   188485           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@langou langou merged commit 3b4fea6 into Reference-LAPACK:master Jul 4, 2023
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants