Closed Layla-Kalhor closed 3 years ago
I also have this error when I want to load Resultant packages
ii6 : loadPackage "Resultants"
/usr/share/Macaulay2/Resultants.m2:2:1:(3):[7]: error: package Resultants not reloaded; try Reload => true
You can download the Resultants package from: https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2-1.16/share/doc/Macaulay2/Resultants/html/ (do note the different Macaulay2 version compared to the link that you posted)
Unfortunately, I am not aware of a generic link to the Resultants package, which does not contain the Macaulay2 version (and thus will not be outdated shortly). I will add a note to the documentation, however.
Let me know if you can run the notebook with the Resultants package. If not, please also attach the terminal output, i.e. run Mathematica with
mathematica
from a terminal and execute the notebook as usual.
I have used this link "https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2-1.16/share/doc/Macaulay2/Resultants/html/" , and I have downloaded Resultants.m2 and added it to the corresponding folder, BFB directory. ( I send a screen shot from my BFB folder, BFB.png)
and in the BFB.m, I have added this line:
Block[{$ContextPath}, Quiet[Needs["Resultants`", FileNameJoin[{PackageDirectory, "Resultants.m2"}]]]];
Unfortunately, I have previous errors. I have a question, I want to be sure.In your code, retval["Resultant"] calls the Resultants Package?
eigvals = DeleteDuplicates[eig /. Solve[retval[["Resultant"]] == 0, eig]] Thanks,Layla
Layla Kalhor, PhD student, Department of Physics, SBU. skype: Layla_FB
I have used this link "https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2-1.16/share/doc/Macaulay2/Resultants/html/" , and I have downloaded Resultants.m2 and added it to the corresponding folder, BFB directory. ( I send a screen shot from my BFB folder, BFB.png)
Great! However, your screenshot didn't make it into GitHub. Can you post it online?
and in the BFB.m, I have added this line:Block[{$ContextPath}, Quiet[Needs["Resultants`", FileNameJoin[{PackageDirectory, "Resultants.m2"}]]]];
Don't do that. Resultants.m2
is not a Mathematica package but a Macaulay2 package. It should be placed inside the Macaulay2 install directory.
I have a question, I want to be sure.In your code, retval["Resultant"] calls the Resultants Package?
No, retval
is an Association and the return value of GetResultant[...]
. The Macaulay2 package will be called internally. retval
only gives you access to the result of the computation.
Let me know if you can run the notebook with the Resultants package. If not, please also attach the terminal output, i.e. run Mathematica with mathematica from a terminal and execute the notebook as usual.
Don't forget to attach the terminal output ;)
Dear Marcel, Thank you for your time.
It is my screenshot of BFB directory.
And my terminal output,(sorry I did search, but I couldn't find how to attach my terminal output so I copy it here)
I removed the math kernel output because it was too long. Considering your picture of the BFB folder, you've placed the Resultants.m2
file in the wrong folder. Please go back to the install instructions (Prerequisites) and place it into the corresponding Macaulay2 folder.
Now, depending on your install procedure for Macaulay2, this could be either:
/usr/share/Macaulay2
or
/usr/local/share/Macaulay2
or any other path that you or your system chose.
For the terminal debugging output:
1) start a terminal
2) type mathematica
3) run Test.nb
as usual
4) copy the terminal output (not the notebook output) and post it here
I removed the math kernel output because it was too long. Considering your picture of the BFB folder, you've placed the
Resultants.m2
file in the wrong folder. Please go back to the install instructions (Prerequisites) and place it into the corresponding Macaulay2 folder.Now, depending on your install procedure for Macaulay2, this could be either:
/usr/share/Macaulay2
or
/usr/local/share/Macaulay2
or any other path that you or your system chose.
Thank you, Yes I did, but when I had an error I copied this file(`Resultants.m2) in BFB folder too
For the terminal debugging output:
1. start a terminal 2. type `mathematica` 3. run `Test.nb` as usual 4. copy the **terminal output** (not the notebook output) and post it here
(base) asus@layla:~/BoundedFromBelow$ mathematica
/usr/share/Macaulay2/Core/robust.m2:98:26:(1):[6]: error: no method for adjacent objects:
-- Resultant (of class Symbol)
-- SPACE 3 2 2 . (of class Sequence)
-- ({(2a - 2eig)x + b*x*y , b*x y + (2c - 2eig).
script.m2:4:18:(3):[5]: --back trace--
/usr/share/Macaulay2/Core/setup.m2:113:27:(1):[5]: --back trace--
/usr/share/Macaulay2/Core/setup.m2:106:18:(1):[4]: --back trace--
/usr/share/Macaulay2/Core/setup.m2:126:41:(1):[3]: --back trace--
/usr/share/Macaulay2/Core/setup.m2:129:6:(1):[2]: --back trace--
/home/dan/src/M2/M2.git/M2/Macaulay2/m2/startup.m2.in:547:63:(0):[1]: --back trace--
/home/dan/src/M2/M2.git/M2/Macaulay2/m2/startup.m2.in:668:6:(0): --back trace--
error in RunMacaulay2Script: script ended with bad exit code
my script.m2 file
loadPackage "Resultants"
ZZ[a, b, c, eig][x, y]
inputpolynomials = {2*a*x^3 - 2*eig*x^3 + b*x*y^2, b*x^2*y + 2*c*y^3 - 2*eig*y^3}
charpolynomial = Resultant(inputpolynomials, Algorithm=>Poisson)
"script.out" << toString(charpolynomial) << endl << close
what's up?
Something is still wrong with loading the Resultants package. Can you give an ls
of your Macaulay2 install directory?
Also, please delete it from the BFB directory. Might be that it cannot handle the package in two locations.
This might be related: https://github.com/Macaulay2/M2/issues/939
Thanks, I deleted this file, but I still had an error. My Macaulay2 list: there is Resultants.m2 , (I made it bold) (base) asus@layla:/usr/share/Macaulay2$ ls AbstractToricVarieties.m2 FourierMotzkin.m2 NumericalCertification SCSCP AdjointIdeal FourTiTwo.m2 NumericalCertification.m2 SCSCP.m2 AdjointIdeal.m2 FrobeniusThresholds NumericalHilbert SectionRing.m2 AlgebraicSplines.m2 FrobeniusThresholds.m2 NumericalHilbert.m2 SegreClasses.m2 AnalyzeSheafOnP1.m2 GenericInitialIdeal.m2 NumericalImplicitization.m2 SemidefiniteProgramming BeginningMacaulay2 gfanInterface.m2 NumericalSchubertCalculus SemidefiniteProgramming.m2 BeginningMacaulay2.m2 GradedLieAlgebras NumericalSchubertCalculus.m2 Seminormalization.m2 Benchmark.m2 GradedLieAlgebras.m2 NumericSolutions.m2 Serialization.m2 Bertini GraphicalModels.m2 OldPolyhedra.m2 SimpleDoc Bertini.m2 Graphics.m2 OldToricVectorBundles.m2 SimpleDoc.m2 BGG.m2 Graphs.m2 OpenMath SimplicialComplexes.m2 BIBasis.m2 GroebnerWalk.m2 OpenMath.m2 SimplicialDecomposability.m2 BinomialEdgeIdeals.m2 HigherCIOperators.m2 PackageCitations.m2 SimplicialPosets.m2 Binomials.m2 HighestWeights PackageTemplate.m2 SlackIdeals.m2 BoijSoederberg.m2 HighestWeights.m2 Parametrization SLnEquivariantMatrices.m2 Book3264Examples.m2 HodgeIntegrals.m2 Parametrization.m2 SLPexpressions BooleanGB.m2 HyperplaneArrangements.m2 Parsing.m2 SLPexpressions.m2 Browse.m2 IntegralClosure PencilsOfQuadrics.m2 SpaceCurves.m2 Bruns.m2 IntegralClosure.m2 Permanents.m2 SparseResultants.m2 ChainComplexExtras.m2 InvariantRing.m2 PHCpack SpechtModule.m2 ChainComplexOperations.m2 InverseSystems.m2 PHCpack.m2 SpecialFanoFourfolds.m2 CharacteristicClasses.m2 InvolutiveBases.m2 PhylogeneticTrees.m2 SpectralSequences.m2 Chordal K3Carpets.m2 PieriMaps.m2 SRdeformations.m2 Chordal.m2 Kronecker.m2 Points.m2 StatePolytope Classic.m2 KustinMiller.m2 Polyhedra StatePolytope.m2 CohomCalg.m2 LatticePolytopes.m2 Polyhedra.m2 StronglyStableIdeals.m2 CoincidentRootLoci LexIdeals.m2 Polymake.m2 Style CoincidentRootLoci.m2 Licenses.m2 Posets.m2 Style.m2 CompleteIntersectionResolutions.m2 LieTypes.m2 PositivityToricBundles.m2 SumsOfSquares Complexes.m2 LLLBases.m2 PrimaryDecomposition SumsOfSquares.m2 ConformalBlocks.m2 LocalRings PrimaryDecomposition.m2 SVDComplexes.m2 ConvexInterface LocalRings.m2 PruneComplex SymbolicPowers.m2 ConvexInterface.m2 M0nbar.m2 PruneComplex.m2 SymmetricPolynomials.m2 ConwayPolynomials.m2 Macaulay2Doc Pullback.m2 TangentCone.m2 Core Macaulay2Doc.m2 PushForward.m2 TateOnProducts.m2 CorrespondenceScrolls.m2 MapleInterface QthPower.m2 TensorComplexes.m2 Cremona MapleInterface.m2 Quasidegrees.m2 TestIdeals Cremona.m2 Markov.m2 QuillenSuslin.m2 TestIdeals.m2 Cyclotomic.m2 Matroids RandomCanonicalCurves.m2 Text.m2 DecomposableSparseSystems Matroids.m2 RandomComplexes.m2 ThreadedGB.m2 DecomposableSparseSystems.m2 MCMApproximations.m2 RandomCurves.m2 Topcom.m2 Depth.m2 MinimalPrimes RandomCurvesOverVerySmallFiniteFields.m2 TorAlgebra.m2 DeterminantalRepresentations.m2 MinimalPrimes.m2 RandomGenus14Curves.m2 ToricInvariants.m2 DGAlgebras.m2 Miura.m2 RandomIdeals.m2 ToricTopology.m2 DiffAlg.m2 MixedMultiplicity.m2 RandomMonomialIdeals.m2 ToricVectorBundles.m2 Divisor.m2 ModuleDeformations.m2 RandomObjects.m2 TriangularSets Dmodules MonodromySolver RandomPlaneCurves.m2 TriangularSets.m2 Dmodules.m2 MonodromySolver.m2 RandomSpaceCurves.m2 Triplets.m2 EdgeIdeals.m2 MonomialAlgebras RationalMaps.m2 Tropical Elimination.m2 MonomialAlgebras.m2 RationalPoints.m2 Tropical.m2 EliminationMatrices.m2 MultiGradedRationalMap.m2 ReactionNetworks Truncations.m2 EllipticCurves.m2 MultiplierIdealsDim2.m2 ReactionNetworks.m2 Units.m2 EllipticIntegrals.m2 MultiplierIdeals.m2 ReesAlgebra.m2 VectorFields.m2 EngineTests NAGtypes ReflexivePolytopesDB VectorGraphics EngineTests.m2 NAGtypes.m2 ReflexivePolytopesDB.m2 VectorGraphics.m2 EnumerationCurves.m2 NautyGraphs.m2 Regularity.m2 VersalDeformations.m2 EquivariantGB Nauty.m2 RelativeCanonicalResolution.m2 VirtualResolutions EquivariantGB.m2 NCAlgebra ResidualIntersections.m2 VirtualResolutions.m2 ExampleSystems NCAlgebra.m2 Resultants.m2 Visualize ExampleSystems.m2 NoetherNormalization.m2 RunExternalM2.m2 Visualize.m2 ExteriorIdeals.m2 NonminimalComplexes.m2 Schubert2 WeylGroups FastLinAlg.m2 Normaliz.m2 Schubert2.m2 WeylGroups.m2 FGLM.m2 NormalToricVarieties SchurComplexes.m2 XML.m2 FiniteFittingIdeals.m2 NormalToricVarieties.m2 SchurFunctors FirstPackage.m2 NumericalAlgebraicGeometry SchurFunctors.m2 FormalGroupLaws.m2 NumericalAlgebraicGeometry.m2 SchurRings.m2
Ok, thanks. I will try to reproduce the error on my system and will get back to you soon.
Thank you so much
Layla Kalhor, PhD student, Department of Physics, SBU. skype: Layla_FB
Is the error related to the Macaulay2 package? When I run this package in terminal and write M2, the Resultants package doesn't load....
(base) asus@layla:~$ M2
Macaulay2, version 1.16
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems,
LLLBases, MinimalPrimes, PrimaryDecomposition, ReesAlgebra,
TangentCone, Truncations
i1 : loadPackage "Re
RealFP ReesAlgebra$distinguished ReesAlgebra$specialFiberIdeal
RealField ReesAlgebra$expectedReesIdeal ReesAlgebra$symmetricAlgebraIdeal
RealQP ReesAlgebra$intersectInP ReesAlgebra$symmetricKernel
RealQP1 ReesAlgebra$isLinearType ReesAlgebra$versalEmbedding
RealRR ReesAlgebra$isReduction ReesAlgebra$whichGm
RealXD ReesAlgebra$jacobianDual Reload
Reduce ReesAlgebra$minimalReduction RemakeAllDocumentation
ReesAlgebra ReesAlgebra$multiplicity Repository
ReesAlgebra$Jacobian ReesAlgebra$normalCone RerunExamples
ReesAlgebra$PlaneCurveSingularities ReesAlgebra$reductionNumber Resolution
ReesAlgebra$Tries ReesAlgebra$reesAlgebra Result
ReesAlgebra$Trim ReesAlgebra$reesAlgebraIdeal RevLex
ReesAlgebra$analyticSpread ReesAlgebra$reesIdeal Reverse
ReesAlgebra$associatedGradedRing ReesAlgebra$specialFiber
i1 : loadPackage "Re
i1 : loadPackage "Resultants"
--warning: symbol "resultant" in Elimination.Dictionary is shadowed by a symbol in Resultants.Dictionary
-- use the synonym Elimination$resultant
--warning: symbol "discriminant" in Elimination.Dictionary is shadowed by a symbol in Resultants.Dictionary
-- use the synonym Elimination$discriminant
o1 = Resultants
o1 : Package
I was able to reproduce and fix the error: The Resultants syntax has changed. I modified the corresponding script. Please download the new version of BFB and retry. Thanks for your patience!
Thank you for your time and perfect attention, Sorry I was not patient! Thanks, fixed it.
I added a simple example to BFB and tried to run it, At first I used your definition of polynomials
and I got this error
and in terminal;
(base) asus@layla:~/BoundedFromBelow$ mathematica
/usr/share/Macaulay2/Core/enginering.m2:451:15:(1):[9]: error: can't promote number to ring
/usr/share/Macaulay2/Core/enginering.m2:459:38:(1):[8]: --back trace--
/usr/share/Macaulay2/Core/classes.m2:58:53:(1):[7]: --back trace--
/usr/share/Macaulay2/Core/enginering.m2:641:40:(1):[6]: --back trace--
script.m2:3:47:(3):[5]: --back trace--
/usr/share/Macaulay2/Core/setup.m2:113:27:(1):[5]: --back trace--
/usr/share/Macaulay2/Core/setup.m2:106:18:(1):[4]: --back trace--
/usr/share/Macaulay2/Core/setup.m2:126:41:(1):[3]: --back trace--
/usr/share/Macaulay2/Core/setup.m2:129:6:(1):[2]: --back trace--
/home/dan/src/M2/M2.git/M2/Macaulay2/m2/startup.m2.in:547:63:(0):[1]: --back trace--
/home/dan/src/M2/M2.git/M2/Macaulay2/m2/startup.m2.in:668:6:(0): --back trace--
error in RunMacaulay2Script: script ended with bad exit code
Then I used my definition of polynomials;
and I got this error
and in terminal;
(base) asus@layla:~/BoundedFromBelow$ mathematica
/usr/share/Macaulay2/Core/methods.m2:37:35:(1):[18]: error: no method found for applying ring to:
3 2
argument : {{- 4eig*x1 + lsh*x1*s }} (of class List)
/usr/share/Macaulay2/Core/methods.m2:133:19:(1):[17]: --back trace--
/usr/share/Macaulay2/Core/matrix1.m2:182:75:(1):[14]: --back trace--
/usr/share/Macaulay2/Core/matrix1.m2:186:11:(1):[13]: --back trace--
/usr/share/Macaulay2/Core/matrix1.m2:281:35:(1):[12]: --back trace--
/usr/share/Macaulay2/Core/methods.m2:119:80:(1):[11]: --back trace--
/usr/share/Macaulay2/Resultants.m2:82:43:(2):[9]: --back trace--
/usr/share/Macaulay2/Core/methods.m2:119:80:(1):[7]: --back trace--
/usr/share/Macaulay2/Core/option.m2:16:8:(1):[6]: --back trace--
script.m2:4:18:(3):[5]: --back trace--
/usr/share/Macaulay2/Core/setup.m2:113:27:(1):[5]: --back trace--
/usr/share/Macaulay2/Core/setup.m2:106:18:(1):[4]: --back trace--
/usr/share/Macaulay2/Core/setup.m2:126:41:(1):[3]: --back trace--
/usr/share/Macaulay2/Core/setup.m2:129:6:(1):[2]: --back trace--
/home/dan/src/M2/M2.git/M2/Macaulay2/m2/startup.m2.in:547:63:(0):[1]: --back trace--
/home/dan/src/M2/M2.git/M2/Macaulay2/m2/startup.m2.in:668:6:(0): --back trace--
error in RunMacaulay2Script: script ended with bad exit code
Thanks Layla
@Layla-Kalhor I've created #2. Please don't post a new problem in a closed issue. Also, start using Markdown for your posts, e.g. use triple backticks for anything that is code or terminal input/output.
OK, Thank you
Dear all, Thanks for your useful package specially in HEP.
I have installed BFB, according to "README.md" in this package.
- my mathematica version is 11.2.0.0
- I have installed Macaulay2, according to this site "https://faculty.math.illinois.edu/Macaulay2/" when I type M2 in terminal, I have this message:
I think, my problem is the lack of Resultants package!! because when I want to load this packge, I have a warning:
- I tried to install Resultants according to "README.md", but this page didn't open for(to) me https://faculty.math.illinois.edu/Macaulay2/doc/Macaulay2-1.10/share/doc/Macaulay2/Resultants/html/
- when I want to run Test.nb, I have an error in the
my error is
- I downloaded "BoundedFromBelow-master" and I unzipped this file. and there are other .m files in this directory, I also modify the file config.m
Thanks for your time and attention