efabless / caravel_user_project

https://caravel-user-project.readthedocs.io
Apache License 2.0
180 stars 330 forks source link

Force all necessarily-serial make invocations to be serial (-j1) #219

Open growly opened 1 year ago

growly commented 1 year ago

I have cloned caravel_user_project and checked out gfmpw-0d. I followed these instructions.

I get sh: flow.tcl: command not found when trying to compile any designs:

make -C openlane user_proj_example
make[1]: Entering directory '/home/arya/src/bfg_mux_test_gf180mcu/openlane'
# user_proj_example
mkdir -p ./user_proj_example/runs/22_12_04_19_29 
rm -rf ./user_proj_example/runs/user_proj_example
ln -s $(realpath ./user_proj_example/runs/22_12_04_19_29) ./user_proj_example/runs/user_proj_example
docker run -it -v $(realpath /home/arya/src/bfg_mux_test_gf180mcu/..):$(realpath /home/arya/src/bfg_mux_test_gf180mcu/..) -v /home/arya/src/bfg_mux_test_gf180mcu/dependencies/pdks:/home/arya/src/bfg_mux_test_gf180mcu/dependencies/pdks -v /home/arya/src/bfg_mux_test_gf180mcu/caravel:/home/arya/src/bfg_mux_test_gf180mcu/caravel -v /home/arya/src/bfg_mux_test_gf180mcu/dependencies/openlane_src:/openlane -v /home/arya/src/bfg_mux_test_gf180mcu/mgmt_core_wrapper:/home/arya/src/bfg_mux_test_gf180mcu/mgmt_core_wrapper -e PDK_ROOT=/home/arya/src/bfg_mux_test_gf180mcu/dependencies/pdks -e PDK=gf180mcuC -e MISMATCHES_OK=1 -e CARAVEL_ROOT=/home/arya/src/bfg_mux_test_gf180mcu/caravel -e OPENLANE_RUN_TAG=22_12_04_19_29 -e MCW_ROOT=/home/arya/src/bfg_mux_test_gf180mcu/mgmt_core_wrapper -u 1000:1000 \
    efabless/openlane:2022.11.29 sh -c "flow.tcl -design $(realpath ./user_proj_example) -save_path $(realpath ..) -save -tag 22_12_04_19_29 -overwrite -ignore_mismatches"
sh: flow.tcl: command not found
make[1]: *** [Makefile:73: user_proj_example] Error 127
make[1]: Leaving directory '/home/arya/src/bfg_mux_test_gf180mcu/openlane'
make: *** [Makefile:108: user_proj_example] Error 2

The file is there and is executable:

$ docker run efabless/openlane:2022.11.29 sh -c "ls -al"
total 84
drwxr-xr-x  7 root root  4096 Nov 29 00:33 .
drwxr-xr-x  1 root root  4096 Dec  4 06:48 ..
-rw-r--r--  1 root root  1117 Nov 29 00:32 AUTHORS.md
drwxr-xr-x  2 root root  4096 Nov 29 00:32 configuration
drwxr-xr-x  8 root root  4096 Nov 29 00:32 dependencies
drwxr-xr-x 26 root root  4096 Nov 29 00:32 designs
-rwxr-xr-x  1 root root  7546 Nov 29 00:32 env.py
-rwxr-xr-x  1 root root 12732 Nov 29 00:32 flow.tcl
-rw-r--r--  1 root root 11350 Nov 29 00:32 LICENSE
drwxr-xr-x  3 root root  4096 Nov 29 00:32 regression_results
-rwxr-xr-x  1 root root 14650 Nov 29 00:32 run_designs.py
drwxr-xr-x 13 root root  4096 Nov 29 00:32 scripts
growly commented 1 year ago

interestingly the file is missing if I run the full docker invocation:

$ docker run -it -v $(realpath /home/arya/src/bfg_mux_test_gf180mcu/..):$(realpath /home/arya/src/bfg_mux_test_gf180mcu/..) -v /home/arya/src/bfg_mux_test_gf180mcu/dependencies/pdks:/home/arya/src/bfg_mux_test_gf180mcu/dependencies/pdks -v /home/arya/src/bfg_mux_test_gf180mcu/caravel:/home/arya/src/bfg_mux_test_gf180mcu/caravel -v /home/arya/src/bfg_mux_test_gf180mcu/dependencies/openlane_src:/openlane -v /home/arya/src/bfg_mux_test_gf180mcu/mgmt_core_wrapper:/home/arya/src/bfg_mux_test_gf180mcu/mgmt_core_wrapper -e PDK_ROOT=/home/arya/src/bfg_mux_test_gf180mcu/dependencies/pdks -e PDK=gf180mcuC -e MISMATCHES_OK=1 -e CARAVEL_ROOT=/home/arya/src/bfg_mux_test_gf180mcu/caravel -e OPENLANE_RUN_TAG=22_12_04_19_49 -e MCW_ROOT=/home/arya/src/bfg_mux_test_gf180mcu/mgmt_core_wrapper     efabless/openlane:2022.11.29 sh -c "pwd; ls -al"
/openlane
total 8
drwxr-xr-x 2 root root 4096 Dec  4 06:29 .
drwxr-xr-x 1 root root 4096 Dec  4 06:52 ..
growly commented 1 year ago

ah it's because of this mount:

-v /home/arya/src/bfg_mux_test_gf180mcu/dependencies/openlane_src:/openlane

openlane_src is empty. I'm guessing make setup failed silently.

growly commented 1 year ago

Ah, this is because my make environment sets parallel jobs to > 1 by default, and running make setup with greater than 1 parallel jobs seems to break it