Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
347 stars 231 forks source link

issue with M2 from emacs #2148

Closed LukeOeding closed 2 years ago

LukeOeding commented 3 years ago

When I installed M2-1.18 with the brew instructions I'm able to use it fine in the terminal, but I have problems when I launch from emacs:

Macaulay2, version 1.18
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, MinimalPrimes,
               PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone
/usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix.m2:180:16:(1):[18]: error: maps not composable
/usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix.m2:180:16:(1):[18]: --entering debugger (type help to see debugger commands)
/usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix.m2:180:16-180:16: --source code:
          then error "maps not composable";

Any idea what may have gone wrong?

mahrud commented 3 years ago

Is there a line above the Macaulay2 version line when you start M2 within emacs? For me it's something like this:

+ /home/linuxbrew/.linuxbrew/bin/M2 --print-width 125

If not, can you press Ctrl+u then release and press the key combination that starts M2 in emacs? This should show you the current value of M2-command, maybe something is wrong there.

LukeOeding commented 3 years ago

Here are the two instances (before and after just calling M2 with no options)

i5 : quit

Process M2 finished

+ M2 --no-readline --print-width 178
Macaulay2, version 1.18
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, MinimalPrimes, PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone
/usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix.m2:180:16:(1):[18]: error: maps not composable
/usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix.m2:180:16:(1):[18]: --entering debugger (type help to see debugger commands)
/usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix.m2:180:16-180:16: --source code:
          then error "maps not composable";

i1 : exit

Process M2 finished

+ M2
Macaulay2, version 1.18
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, MinimalPrimes, PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone
/usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix.m2:180:16:(1):[18]: error: maps not composable
/usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix.m2:180:16:(1):[18]: --entering debugger (type help to see debugger commands)
/usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix.m2:180:16-180:16: --source code:
          then error "maps not composable";

i1 : 
mahrud commented 3 years ago

Can you try running with M2 -q? Also, what is the value of the variable commandLine in M2?

LukeOeding commented 3 years ago

This seems to work:

Process M2 finished

+ M2 -q
Macaulay2, version 1.18
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, MinimalPrimes, PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone

i1 : commandLine

o1 = {/usr/local/Cellar/macaulay2/1.18/bin/M2-binary, -q}

o1 : List

i2 : 
mahrud commented 3 years ago

Strange. I don't think this is related to brew, so I'll transfer the issue to the main repository.

mahrud commented 3 years ago

cc: @DanGrayson

DanGrayson commented 3 years ago

If it works with "-q" added, then you probably have some code in your "init.m2" file that is composing matrices incorrectly. Try running with M2 --notify, to see which files are loaded.

mahrud commented 3 years ago

Why would that happen inside emacs and not from terminal?

LukeOeding commented 3 years ago

Here is what I get with --notify:

--executable = /usr/local/Cellar/macaulay2/1.18/bin/M2-binary
Macaulay2, version 1.18
--prefixDirectory = /usr/local/Cellar/macaulay2/1.18/
--topBuilddir = null
--topSrcdir = null
--phase 2
--file search path directories:
--    /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/
--    /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/
--loading /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/setup.m2
--about to read /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/loadsequence
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/command.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/classes.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/option.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/methods.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/shared.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/autoload.m2
--Layout#1 assigned for directory /usr/local/Cellar/macaulay2/1.18/
--Layout#1 assigned for directory /Users/lao0004/Library/Application Support/Macaulay2/local/
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/system.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/regex.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/run.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/profile.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/debugging.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/remember.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/files.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/set.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/fold.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/max.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/structure.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/combinatorics.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/lists.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/nets.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/robust.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/content.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/hypertext.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/validate.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/expressions.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/peek.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/printing.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/gateway.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/rings.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/integers.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/engine.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/enginering.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/rationals.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/reals.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/intervals.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/quotient.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/powers.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/orderedmonoidrings.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/variables.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/indeterminates.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/ofcm.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/tables.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/modules.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix1.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/mutablemat.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/localring.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/quotring.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/freealgebras.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/multilin.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/flint.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/genmat.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/modules2.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/gb.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix2.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/galois.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/ringmap.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/newring.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix3.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/ext.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/tor.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/gradedmodules.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/chaincomplexes.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/res.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/monideal.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/intersect.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/factor.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/integrate.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/http.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/minPres.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/monomcurve.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/fano.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/schubert.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/code.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/dotdot.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/local.m2
--database not present: /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/Core/cache/rawdocumentation-dcba-8.db
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/packages.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/examples.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/document.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/installPackage.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/testing.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/help.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/format.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/html.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/markdown.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/latex.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/book.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/varieties.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/webapp.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/jupyter.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/mathml.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/texmacs.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/pretty.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/programs.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/undoc.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/obsolete.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/exports.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/tvalues.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/typicalvalues.m2
--package "Core" loaded
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/last.m2
--read /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/loadsequence
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/setup.m2
--phase 3
--database not present: /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/Core/cache/rawdocumentation-dcba-8.db
--database not present: /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/User/cache/rawdocumentation-dcba-8.db
--opening database /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/Elimination/cache/rawdocumentation-dcba-8.db
 -- beginDocumentation: using documentation database, skipping the rest of /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Elimination.m2
--package "Elimination" loaded
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Elimination.m2
--opening database /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/LLLBases/cache/rawdocumentation-dcba-8.db
 -- beginDocumentation: using documentation database, skipping the rest of /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/LLLBases.m2
--package "LLLBases" loaded
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/LLLBases.m2
--opening database /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/MinimalPrimes/cache/rawdocumentation-dcba-8.db
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/MinimalPrimes/AnnotatedIdeal.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/MinimalPrimes/PDState.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/MinimalPrimes/splitIdeals.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/MinimalPrimes/quickGB.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/MinimalPrimes/factorTower.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/MinimalPrimes/radical.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/MinimalPrimes/tests.m2
 -- beginDocumentation: using documentation database, skipping the rest of /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/MinimalPrimes.m2
--package "MinimalPrimes" loaded
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/MinimalPrimes.m2
--opening database /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/IntegralClosure/cache/rawdocumentation-dcba-8.db
--opening database /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/Saturation/cache/rawdocumentation-dcba-8.db
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Saturation/quotient-test.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Saturation/saturate-test.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Saturation/annihilator-test.m2
 -- beginDocumentation: using documentation database, skipping the rest of /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Saturation.m2
--package "Saturation" loaded
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Saturation.m2
--opening database /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/PrimaryDecomposition/cache/rawdocumentation-dcba-8.db
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/PrimaryDecomposition/GTZ.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/PrimaryDecomposition/Shimoyama-Yokoyama.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/PrimaryDecomposition/Eisenbud-Huneke-Vasconcelos.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/PrimaryDecomposition/tests.m2
 -- beginDocumentation: using documentation database, skipping the rest of /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/PrimaryDecomposition.m2
--package "PrimaryDecomposition" loaded
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/PrimaryDecomposition.m2
--opening database /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/ReesAlgebra/cache/rawdocumentation-dcba-8.db
 -- beginDocumentation: using documentation database, skipping the rest of /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/ReesAlgebra.m2
--package "ReesAlgebra" loaded
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/ReesAlgebra.m2
 -- beginDocumentation: using documentation database, skipping the rest of /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/IntegralClosure.m2
--package "IntegralClosure" loaded
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/IntegralClosure.m2
--opening database /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/Classic/cache/rawdocumentation-dcba-8.db
--opening database /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/Parsing/cache/rawdocumentation-dcba-8.db
 -- beginDocumentation: using documentation database, skipping the rest of /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Parsing.m2
--package "Parsing" loaded
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Parsing.m2
 -- beginDocumentation: using documentation database, skipping the rest of /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Classic.m2
--package "Classic" loaded
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Classic.m2
--opening database /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/TangentCone/cache/rawdocumentation-dcba-8.db
 -- beginDocumentation: using documentation database, skipping the rest of /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/TangentCone.m2
--package "TangentCone" loaded
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/TangentCone.m2
--opening database /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/ConwayPolynomials/cache/rawdocumentation-dcba-8.db
 -- beginDocumentation: using documentation database, skipping the rest of /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/ConwayPolynomials.m2
--package "ConwayPolynomials" loaded
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/ConwayPolynomials.m2
--opening database /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/InverseSystems/cache/rawdocumentation-dcba-8.db
 -- beginDocumentation: using documentation database, skipping the rest of /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/InverseSystems.m2
--package "InverseSystems" loaded
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/InverseSystems.m2
--opening database /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/SimpleDoc/cache/rawdocumentation-dcba-8.db
--opening database /usr/local/Cellar/macaulay2/1.18/lib/Macaulay2/Text/cache/rawdocumentation-dcba-8.db
 -- beginDocumentation: using documentation database, skipping the rest of /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Text.m2
--package "Text" loaded
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Text.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/SimpleDoc/helpers.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/SimpleDoc/templates.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/SimpleDoc/example.m2
 -- beginDocumentation: using documentation database, skipping the rest of /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/SimpleDoc.m2
--package "SimpleDoc" loaded
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/SimpleDoc.m2
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, MinimalPrimes, PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/AbstractToricVarieties.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/AdjointIdeal.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/AInfinity.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/AlgebraicSplines.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/AnalyzeSheafOnP1.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/AssociativeAlgebras.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/BeginningMacaulay2.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Benchmark.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Bertini.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/BGG.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/BIBasis.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/BinomialEdgeIdeals.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Binomials.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/BoijSoederberg.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Book3264Examples.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/BooleanGB.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Browse.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Bruns.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/ChainComplexExtras.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/ChainComplexOperations.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/CharacteristicClasses.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Chordal.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Classic.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/CohomCalg.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/CoincidentRootLoci.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/CompleteIntersectionResolutions.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Complexes.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/ConformalBlocks.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/ConvexInterface.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/ConwayPolynomials.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/CorrespondenceScrolls.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Cremona.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Cyclotomic.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/PHCpack.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/DecomposableSparseSystems.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Depth.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/DeterminantalRepresentations.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/DGAlgebras.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/DiffAlg.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Divisor.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Dmodules.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/EagonResolution.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/EdgeIdeals.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/EigenSolver.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Elimination.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/EliminationMatrices.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/EllipticCurves.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/EllipticIntegrals.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/EngineTests.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/EnumerationCurves.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/EquivariantGB.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/ExampleSystems.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/ExteriorIdeals.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/FastLinAlg.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/FGLM.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/FiniteFittingIdeals.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/FirstPackage.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/FormalGroupLaws.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/FourierMotzkin.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/FourTiTwo.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/FrobeniusThresholds.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/GenericInitialIdeal.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/gfanInterface.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/GKMVarieties.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/GradedLieAlgebras.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/GraphicalModels.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/GraphicalModelsMLE.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Graphics.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Graphs.m2
--loaded /usr/local/Cellar/macaulay2/1.18/share/Macaulay2/GroebnerWalk.m2
/usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix.m2:180:16:(1):[18]: error: maps not composable
/usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix.m2:180:16:(1):[18]: --entering debugger (type help to see debugger commands)
/usr/local/Cellar/macaulay2/1.18/share/Macaulay2/Core/matrix.m2:180:16-180:16: --source code:
          then error "maps not composable";
mahrud commented 3 years ago

Instead of ` ... `, try putting your multiline code between three back-ticks, like this:

```m2
...
DanGrayson commented 3 years ago

Try typing CTRL-d a few times after getting the error message "error: maps not composable" to see which package composed two matrices during loading. I know that VectorGraphics does.

mahrud commented 3 years ago

You can also do M2 --stop.

LukeOeding commented 3 years ago

Thanks for the attentiveness! These steps seem to have cleared up the issue now, though I don't know why. Now when I start M2 in Aquamacs I no longer get that error.

DanGrayson commented 3 years ago

All those suggestions were just debugging suggestions -- I don't see how they could have changed anything. Oh, well, all's well that ends well.

mahrud commented 2 years ago

@LukeOeding could you try running uninstallAllPackages()? I wonder if there's an old package that needs to be reinstalled.

If that doesn't work, it might help to look at the last few lines of M2 --notify before the error. It should say something like -- loading X and then the error.

LukeOeding commented 2 years ago

Here are the last few lines after starting with M2 --notify, and after uninstallAllPackages()

 -- loaded /usr/local/share/Macaulay2/GroebnerWalk.m2
 -- loading Hadamard.m2
/usr/local/share/Macaulay2/Core/matrix.m2:182:16:(1):[19]: error: maps not composable
/usr/local/share/Macaulay2/Core/matrix.m2:182:16:(1):[19]: --entering debugger (type help to see debugger commands)
/usr/local/share/Macaulay2/Core/matrix.m2:182:16-182:16: --source code:
          then error "maps not composable";

i1 : uninstallAllPackages()
 -- uninstalling package PieriMaps
 -- uninstalling package SchurRings

i2 : 
Hadamard.m2:73:2:(3):[18]: --entering debugger (type help to see debugger commands)
Hadamard.m2:73:1-73:53: --source code:
V*transpose matrix({flatten {{1,1,1,1},apply(12,i-> 0)}})

i3 : 
LukeOeding commented 2 years ago

After 'M2 --stop' I get the following:


+ M2 --stop
Macaulay2, version 1.20
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, Isomorphism, LLLBases, MinimalPrimes, OnlineLookup, PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone
/usr/local/share/Macaulay2/Core/matrix.m2:182:16:(1):[19]: error: maps not composable
Hadamard.m2:73:2:(2):[18]: --back trace--
/tmp/macaulay2-20220711-21700-xm008/M2-release-1.20/M2/Macaulay2/m2/startup.m2.in:66:17:(0):[18]: --back trace--
/usr/local/share/Macaulay2/Core/Core.m2:107:22:(1):[17]: --back trace--
/usr/local/share/Macaulay2/Core/Core.m2:103:10:(1):[15]: --back trace--
/usr/local/share/Macaulay2/Core/Core.m2:114:22:(1):[14]: --back trace--
/usr/local/share/Macaulay2/Core/packages.m2:146:5:(1):[13]: --back trace--
/usr/local/share/Macaulay2/Core/methods.m2:154:80:(1):[12]: --back trace--
/usr/local/share/Macaulay2/Core/installPackage.m2:309:48:(1):[10]: --back trace--
/usr/local/share/Macaulay2/Core/installPackage.m2:308:32:(1):[9]: --back trace--
/usr/local/share/Macaulay2/Core/installPackage.m2:298:17:(1):[8]: --back trace--
/usr/local/share/Macaulay2/Core/installPackage.m2:276:52:(1):[5]: --back trace--
/usr/local/share/Macaulay2/Core/last.m2:63:16:(1):[3]: --back trace--
/tmp/macaulay2-20220711-21700-xm008/M2-release-1.20/M2/Macaulay2/m2/startup.m2.in:86:58:(0):[2]: --back trace--
/tmp/macaulay2-20220711-21700-xm008/M2-release-1.20/M2/Macaulay2/m2/startup.m2.in:86:32:(0):[1]: --back trace--

Process M2 exited abnormally with code 1
mahrud commented 2 years ago

Oh, this is helpful:

i2 : 
Hadamard.m2:73:2:(3):[18]: --entering debugger (type help to see debugger commands)
Hadamard.m2:73:1-73:53: --source code:
V*transpose matrix({flatten {{1,1,1,1},apply(12,i-> 0)}})

Because this is not the contents of the Hadamard package! Do you happen to have a file named hadamard.m2 or Hadamard.m2 somewhere on your path? You can type path to see the list of directories M2 searches for files.

I suspect renaming this file should fix your problem, though it might also be better if Macaulay2 loaded packages from the right directory, not anywhere on the path.

LukeOeding commented 2 years ago

OK, this worked. It's really strange that my personal file "hadamard.m2" was read when launching M2 within Aquamacs.

maybe my path variable is messed up?

i171 : path o171 = {./, ../../../Library/Application Support/Macaulay2/code/, ../../../Library/Application Support/Macaulay2/local/share/Macaulay2/, /usr/local/share/Macaulay2/} the file in question was in a completely different place

/Users/oeding/Dropbox/COMPUTATIONS/Macaulay2\ Worksheets/

DanGrayson commented 2 years ago

Is it the case that the current directory is not that directory?

What does "notify=true" indicate about where the file is loaded from?

LukeOeding commented 2 years ago

I launch M2 from /Users/oeding/Dropbox/COMPUTATIONS/Macaulay2\ Worksheets/

Also, after I changed /Users/oeding/Dropbox/COMPUTATIONS/Macaulay2\ Worksheets/hadamard.m2 to /Users/oeding/Dropbox/COMPUTATIONS/Macaulay2\ Worksheets/my_hadamard.m2

the relevant section after `M2 --notify' is this:

-- loading GroebnerWalk.m2 -- loaded /usr/local/share/Macaulay2/GroebnerWalk.m2 -- loading Hadamard.m2 -- loaded /usr/local/share/Macaulay2/Hadamard.m2 -- loading HigherCIOperators.m2

however, when I change it back I get

-- loading GroebnerWalk.m2 -- loaded /usr/local/share/Macaulay2/GroebnerWalk.m2 -- loading Hadamard.m2 /usr/local/share/Macaulay2/Core/matrix.m2:182:16:(1):[19]: error: maps not composable /usr/local/share/Macaulay2/Core/matrix.m2:182:16:(1):[19]: --entering debugger (type help to see debugger commands) /usr/local/share/Macaulay2/Core/matrix.m2:182:16-182:16: --source code: then error "maps not composable";

LukeOeding commented 2 years ago

I think I understand the problem now. I'm not allowed to have a filename in the directory from which I launch M2 that conflicts with a package that already exists, otherwise M2 reads the wrong file. Going forward I guess I just have to do better at naming files...