-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29070 from matthewfeickert/feat/add-iregi
Add IREGI
- Loading branch information
Showing
3 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
From e19ac63f03c4e5103f1456803b5e1db8169b9040 Mon Sep 17 00:00:00 2001 | ||
From: Matthew Feickert <matthew.feickert@cern.ch> | ||
Date: Sun, 9 Feb 2025 03:10:29 -0700 | ||
Subject: [PATCH] fix: Make makefile_ML5_lib compatible with precompiled | ||
libraries | ||
|
||
* Let makefile_ML5_lib build IREGI standalone against existing | ||
compiled versions of the libraries. | ||
--- | ||
vendor/IREGI/src/makefile_ML5_lib | 17 +++-------------- | ||
1 file changed, 3 insertions(+), 14 deletions(-) | ||
|
||
diff --git a/vendor/IREGI/src/makefile_ML5_lib b/vendor/IREGI/src/makefile_ML5_lib | ||
index fff9dc8..7319db6 100644 | ||
--- a/vendor/IREGI/src/makefile_ML5_lib | ||
+++ b/vendor/IREGI/src/makefile_ML5_lib | ||
@@ -6,14 +6,9 @@ FFDIR=$(qcdlooppath)/ff | ||
onelooppath=$(PWD)/oneloop | ||
#FFLAGS=-O -g -ggdb -fno-automatic -fbounds-check -I$(onelooppath) # -fbounds-check is very useful in checking mermory error,-g is for debuging,-ggdb is for debuging special in gdb | ||
FFLAGS=-O -g -fPIC -I$(onelooppath) | ||
-obj= global.o funlib.o linear_algebra.o kinematics.o matrices.o matrix_base.o cmatrix_base.o mis_warp.o special_fun.o pave_reduce.o cpave_reduce.o si_reduce.o csi_reduce.o ti_reduce.o cti_reduce.o gti_reduce.o binary_tree.o IREGI4ML5_interface.o avh_olo_foriregi.o | ||
-olomod= avh_olo_foriregi.mod avh_olo_foriregi_dp_box.mod avh_olo_foriregi_dp_olog.mod avh_olo_foriregi_units.mod \ | ||
- avh_olo_foriregi_dp.mod avh_olo_foriregi_dp_boxc.mod avh_olo_foriregi_dp_prec.mod avh_olo_foriregi_version.mod \ | ||
- avh_olo_foriregi_dp_arrays.mod avh_olo_foriregi_dp_bub.mod avh_olo_foriregi_dp_print.mod \ | ||
- avh_olo_foriregi_dp_auxfun.mod avh_olo_foriregi_dp_dilog.mod avh_olo_foriregi_dp_qmplx.mod \ | ||
- avh_olo_foriregi_dp_bnlog.mod avh_olo_foriregi_dp_kinds.mod avh_olo_foriregi_dp_tri.mod | ||
-mod= global.mod funlib.mod linear_algebra.mod kinematics.mod matrices.mod matrix_base.mod cmatrix_base.mod mis_warp.mod special_fun.mod pave_reduce.mod cpave_reduce.mod si_reduce.mod csi_reduce.mod ti_reduce.mod cti_reduce.mod gti_reduce.mod $(olomod) | ||
-libiregi.a: make_ql $(obj) $(mod) | ||
+obj= global.o funlib.o linear_algebra.o kinematics.o matrices.o matrix_base.o cmatrix_base.o mis_warp.o special_fun.o pave_reduce.o cpave_reduce.o si_reduce.o csi_reduce.o ti_reduce.o cti_reduce.o gti_reduce.o binary_tree.o IREGI4ML5_interface.o | ||
+mod= global.mod funlib.mod linear_algebra.mod kinematics.mod matrices.mod matrix_base.mod cmatrix_base.mod mis_warp.mod special_fun.mod pave_reduce.mod cpave_reduce.mod si_reduce.mod csi_reduce.mod ti_reduce.mod cti_reduce.mod gti_reduce.mod | ||
+libiregi.a: $(obj) $(mod) | ||
@rm -f libiregi.a | ||
@ar csr libiregi.a $(obj) | ||
#$(QLDIR)libqcdloop.a $(FFDIR)libff.a $(onelooppath)libavh_olo.a | ||
@@ -39,8 +34,6 @@ matrix_base.o matrix_base.mod : matrix_base.f90 | ||
$(FC) -c $< $(FFLAGS) | ||
cmatrix_base.o cmatrix_base.mod : cmatrix_base.f90 | ||
$(FC) -c $< $(FFLAGS) | ||
-avh_olo_foriregi.mod : oneloop/avh_olo_foriregi.f90 | ||
- $(FC) -c $< $(FFLAGS) | ||
mis_warp.o mis_warp.mod : mis_warp.f90 kinematics.mod global.mod $(olomod) | ||
$(FC) -c $< $(FFLAGS) | ||
special_fun.o special_fun.mod : special_fun.f90 | ||
@@ -64,9 +57,5 @@ binary_tree.o binary_tree.mod : binary_tree.f90 global.mod | ||
IREGI4ML5_interface.o : IREGI4ML5_interface.f90 global.mod funlib.mod ti_reduce.mod binary_tree.mod cti_reduce.mod | ||
$(FC) -c $< $(FFLAGS) | ||
|
||
-make_ql: | ||
- (make -f makefile_qcdloop) | ||
- | ||
clean: | ||
@rm -rf $(obj) $(exe) *.mod *~ *.a | ||
- @(make clean -f makefile_qcdloop) | ||
-- | ||
2.47.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{% set name = "iregi" %} | ||
{% set version = "1.1.0" %} | ||
|
||
package: | ||
name: {{ name }} | ||
version: {{ version }} | ||
|
||
source: | ||
- url: https://github.com/hep-packaging-coordination/mg5amcnlo-release-mirror/releases/download/3.5.7/MG5_aMC_v3.5.7.tar.gz | ||
sha256: ca3e027f078438318bd4143a102aebc2d51358f537b5d52bbc574fe49a6a901e | ||
patches: | ||
# FIXME: makefile_ML5_lib tries to build everything by default | ||
- makefile_ML5_lib.patch | ||
# FIXME: mg5amcnlo uses 'avh_olo_forIREGI' instead of 'avh_olo' is mis_warp.f90 | ||
- use-avh_olo.patch | ||
|
||
build: | ||
number: 0 | ||
|
||
outputs: | ||
- name: {{ name }}-static | ||
|
||
build: | ||
skip: true # [win] | ||
script: | ||
- cd vendor/IREGI/src/ | ||
|
||
# Remove vendored code that is on conda-forge | ||
- rm -rf oneloop | ||
- rm -rf qcdloop | ||
- rm makefile | ||
- rm makefile_oneloop | ||
- rm makefile_qcdloop | ||
|
||
# Build | ||
# Enable extended-source with '-ffixed-line-length-none' for long lines | ||
# c.f. https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html#index-ffixed-line-length-n | ||
# The build is not parallel safe, so must compile single threaded | ||
- make -f makefile_ML5_lib FC=$FC FFLAGS="$FFLAGS -std=legacy -Wall -ffixed-line-length-none -I$PREFIX/include/oneloop" | ||
|
||
# Install | ||
- mv libiregi.a $PREFIX/lib/ | ||
- mkdir -p $PREFIX/include/iregi | ||
- mv *.mod $PREFIX/include/iregi/ | ||
|
||
requirements: | ||
build: | ||
- {{ stdlib('c') }} | ||
- {{ compiler('fortran') }} | ||
- make | ||
- libtool | ||
host: | ||
- oneloop | ||
|
||
test: | ||
commands: | ||
- test -f $PREFIX/lib/libiregi.a | ||
- test -f $PREFIX/include/iregi/binary_tree.mod | ||
- test -f $PREFIX/include/iregi/cmatrix_base.mod | ||
- test -f $PREFIX/include/iregi/cpave_reduce.mod | ||
- test -f $PREFIX/include/iregi/csi_reduce.mod | ||
- test -f $PREFIX/include/iregi/cti_reduce.mod | ||
- test -f $PREFIX/include/iregi/funlib.mod | ||
- test -f $PREFIX/include/iregi/global.mod | ||
- test -f $PREFIX/include/iregi/gti_reduce.mod | ||
- test -f $PREFIX/include/iregi/kinematics.mod | ||
- test -f $PREFIX/include/iregi/linear_algebra.mod | ||
- test -f $PREFIX/include/iregi/matrices.mod | ||
- test -f $PREFIX/include/iregi/matrix_base.mod | ||
- test -f $PREFIX/include/iregi/mis_warp.mod | ||
- test -f $PREFIX/include/iregi/pave_reduce.mod | ||
- test -f $PREFIX/include/iregi/si_reduce.mod | ||
- test -f $PREFIX/include/iregi/special_fun.mod | ||
- test -f $PREFIX/include/iregi/ti_reduce.mod | ||
|
||
about: | ||
home: https://github.com/mg5amcnlo/mg5amcnlo/tree/3.x/vendor/IREGI/src | ||
summary: 'IREGI: one-loop tensor Integral REduction with General propagator Indices' | ||
description: | | ||
IREGI is a package for one-loop tensor Integral REduction with General | ||
propagator Indices. | ||
The algorithm was proposed by G. Duplancic, B. Nizic | ||
(DOI: [10.1140/epjc/s2004-01723-7](https://doi.org/10.1140/epjc/s2004-01723-7)). | ||
This implementation for MADLOOP5 in MadGraph5_aMC@NLO was originally | ||
authored by Hua-Sheng Shao. | ||
# IREGI source only exists in the MG5_aMC@NLO repo and so has the same license | ||
# modified University of Illinois/NCSA license | ||
license: LicenseRef-NCSA | ||
license_family: OTHER | ||
license_file: LICENSE | ||
dev_url: https://github.com/mg5amcnlo/mg5amcnlo/tree/3.x/vendor/IREGI/src | ||
|
||
extra: | ||
feedstock-name: iregi | ||
recipe-maintainers: | ||
- matthewfeickert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From 751683b8e56e6116338d8b0d2e50eed9cfb5be53 Mon Sep 17 00:00:00 2001 | ||
From: Matthew Feickert <matthew.feickert@cern.ch> | ||
Date: Sun, 9 Feb 2025 03:14:54 -0700 | ||
Subject: [PATCH] fix: Use avh_olo as standalone build | ||
|
||
* Use avh_olo from OneLOop. | ||
--- | ||
vendor/IREGI/src/mis_warp.f90 | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/vendor/IREGI/src/mis_warp.f90 b/vendor/IREGI/src/mis_warp.f90 | ||
index 3f3b93b..3c972ef 100644 | ||
--- a/vendor/IREGI/src/mis_warp.f90 | ||
+++ b/vendor/IREGI/src/mis_warp.f90 | ||
@@ -1,7 +1,7 @@ | ||
MODULE mis_warp | ||
USE global | ||
USE kinematics | ||
-USE avh_olo_forIREGI | ||
+USE avh_olo | ||
IMPLICIT NONE | ||
LOGICAL::first=.TRUE. | ||
SAVE first | ||
-- | ||
2.47.1 | ||
|