modularml / mojo

The Mojo Programming Language
https://docs.modular.com/mojo/manual/
Other
22.88k stars 2.58k forks source link

After run modular install max , I can not run max CLI #2828

Open crazylionwsw opened 3 months ago

crazylionwsw commented 3 months ago

Issue description

截屏2024-05-26 14 40 49

Mojo Tools [ ████████████████████████████████████████████████████████████████████████████████████████████████████████████████░░░░░░░░░░░░░░░░ ] 77% [mojo][error] Mojo SDK post-install test "mojo package" failed:

SubprocessError: Command '/home/ubuntu/.modular/pkg/packages.modular.com_max/bin/mojo run /tmp/tmpxsz_c1mt/test_package_user.mojo -I /tmp/tmpxsz_c1mt' returned non-zero exit status 1. stderr: JIT session error: Cannot allocate memory /home/ubuntu/.modular/pkg/packages.modular.com_max/bin/mojo: error: Failed to materialize symbols: { (exec, { main }) } File "/home/ubuntu/.modular/pkg/packages.modular.com_max/scripts/checks/self-test-tools.py", line 268, in test_mojo_package self.run_mojo( File "/home/ubuntu/.modular/pkg/packages.modular.com_max/scripts/checks/self-test-tools.py", line 197, in run_mojo return self.run(self.mojo, subcommand, *args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.modular/pkg/packages.modular.com_max/scripts/checks/self-test-tools.py", line 185, in run raise SubprocessError( [mojo][error] Mojo SDK post-install test "mojo debug" failed: SubprocessError: Command ''/home/ubuntu/.modular/pkg/packages.modular.com_max/bin/mojo' 'debug' '-Xlldb' '--one-line-before-file' '-Xlldb' 'settings set target.load-cwd-lldbinit false' '-Xlldb' '--one-line-before-file' '-Xlldb' 'settings set target.disable-aslr false' '-Xlldb' '--one-line-before-file' '-Xlldb' 'settings set plugin.process.gdb-remote.packet-timeout 60' '-Xlldb' '-o' '-Xlldb' 'b test_debug.mojo:15' '-Xlldb' '-o' '-Xlldb' 'run' '-Xlldb' '-o' '-Xlldb' 'frame var foo' '-Xlldb' '-b' '/home/ubuntu/.modular/pkg/packages.modular.com_max/test/test_debug.mojo'' returned non-zero exit status 1. stdout: Current executable set to '/home/ubuntu/.modular/pkg/packages.modular.com_max/bin/mojo' (x86_64). Breakpoint 1: no locations (pending). WARNING: Unable to resolve breakpoint to any actual locations. JIT session error: Cannot allocate memory /home/ubuntu/.modular/pkg/packages.modular.com_max/bin/mojo: error: Failed to materialize symbols: { (exec, { main }) } Process 1372 launched: '/home/ubuntu/.modular/pkg/packages.modular.com_max/bin/mojo' (x86_64) Process 1372 stopped and restarted: thread 1 received signal: SIGCHLD Process 1372 exited with status = 1 (0x00000001) stderr: error: Command requires a process which is currently stopped. File "/home/ubuntu/.modular/pkg/packages.modular.com_max/scripts/checks/self-test-tools.py", line 354, in test_mojo_debug raise SubprocessError( [mojo][error] Some components of the Mojo SDK may have been installed successfully, but others may not work as expected. [mojo][error] Please submit an issue to https://github.com/modularml/mojo and include the full output of the command you just ran. Mojo Tools [ ████████████████████████████████████████████████████████████████████████████████████████████████████████████████░░░░░░░░░░░░░░░░ ] 77% modular: error: failed to run script

Failure Information:

==========================

Testing MAX [ ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████░░░░░░░░░░░░░░░░ ] 88% [max][error] MAX SDK post-install test "max benchmark --input-data-schema relu-torchscript/relu3x100x100-schema.yaml relu-torchscript/relu3x100x100.torchscript" failed: SubprocessError: Command 'max benchmark --input-data-schema /home/ubuntu/.modular/pkg/packages.modular.com_max/test/relu-torchscript/relu3x100x100-schema.yaml /home/ubuntu/.modular/pkg/packages.modular.com_max/test/relu-torchscript/relu3x100x100.torchscript' returned non-zero exit status 1. stdout: Modular Benchmarking Tool Modular version: 24.3.0-9882e19d-release MLPerf scenario: Single Stream (use --mlperf-scenario to change) Compiling model... OK (took 3.754712e+00s) stderr:

Compiling model.
Compiling model. ..
Compiling model. .. ...
Done!
JIT session error: Cannot allocate memory
Error preparing model: setup for model forward returned error: Failed to materialize symbols: { (720EB06118B37FFBF5FBE3133191985460B28956EE58A0B17D3F1D52FF6712B1, { __stub_5e27dec978030354 }) }

File "/home/ubuntu/.modular/pkg/packages.modular.com_max/scripts/checks/self-test-max.py", line 220, in test_max_cli_benchmark_pytorch

output = self.run_max_cli(
         ^^^^^^^^^^^^^^^^^

File "/home/ubuntu/.modular/pkg/packages.modular.com_max/scripts/checks/self-test-max.py", line 196, in run_max_cli return self.run("max", subcommand, *args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.modular/pkg/packages.modular.com_max/scripts/checks/self-test-max.py", line 175, in run raise SubprocessError( [max][error] Some components of the MAX SDK may have been installed successfully, but others may not work as expected. [max][error] Please submit an issue to https://github.com/modularml/max and include the full output of the command you just ran. Testing MAX [ ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████░░░░░░░░░░░░░░░░ ] 88% modular: error: failed to run script

Failure Information:

==========================

Errors detected [ █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ ] 100%

Steps to reproduce

  1. curl -s https://get.modular.com | sh - (Good)
  2. python3 -m venv max-venv && source max-venv/bin/activate. (Good)
  3. modular auth (Good)
  4. modular install max (Run included error, pls see above Image)
  5. MAX_PATH=$(modular config max.path) && python3 -m pip install --find-links $MAX_PATH/wheels max-engine (Error) ERROR: Could not find a version that satisfies the requirement max-engine (from versions: none) ERROR: No matching distribution found for max-engine

Version Info

- Provide Modular CLI version by pasting the output of `modular -v`
 A:modular 0.8.0 (39a426b5)

- What OS did you install modular CLI on ?
A: MacOS, use multipass create a Virtual Environment and install Ubuntu 23.10
walter-erquinigo commented 2 months ago

The compiler requires at least 2GB of free ram in order to operate. Can you make sure you have the required amount of RAM?

panaschristou commented 2 weeks ago

I have the same exact problem as above. Similar errors in the modular install max step, same exact error in the next step. However, when I activate the conda environment and I check the versions for max and mojo it prints them out correctly. I am not sure why is that even though it does not seem to find a link to install max-engine.