cholla-hydro / cholla

A GPU-based hydro code
https://github.com/cholla-hydro/cholla/wiki
MIT License
65 stars 32 forks source link

buildAndRunTests broken on dev #280

Closed evaneschneider closed 1 year ago

evaneschneider commented 1 year ago

On the current version of dev, trying to execute buildAndRunTests fails. Reproduced by @helenarichie, perhaps a bug introduced by a recent PR touching paths in run_tests.sh?

Workflow to reproduce error: checkout dev source builds/run_tests.sh buildAndRunTests -c gcc -t hydro

results in being bumped up to home directory with an error message, i.e. make: *** No rule to make target 'clobber'. Stop.

Running Setup... fatal: not a git repository (or any of the parent directories): .git bash: /builds/setup.c3po.gcc.sh: No such file or directory

Building Cholla...

make: *** No targets specified and no makefile found. Stop.

evaneschneider commented 1 year ago

Running tests manually still works, i.e. ./bin/cholla.hydro.c3po.tests --cholla-root /home/evans/code/cholla --build-type hydro --machine c3po --gtest_filter=tHYDRO is fine.

alwinm commented 1 year ago

As I understand it, this is because setupTests sets up the environment variable CHOLLA_ROOT but it is being used before the first invocation of setupTests in cd CHOLLA_ROOT which cds to nothing (aka home directory):

https://github.com/cholla-hydro/cholla/blame/dcec6fb9555890145cfa0017db8690ee2ad2a82e/builds/run_tests.sh#L252

bcaddy commented 1 year ago

This is already fixed in PR #273. Sorry I forgot to open an issue about it.

alwinm commented 1 year ago

Until that's merged in you can run build and run tests by first manually doing this in the git repo

export CHOLLA_ROOT="$(git rev-parse --show-toplevel)"

(if that doesnt work you would just have to run setupTests first)

evaneschneider commented 1 year ago

Fixed in PR #273.