[JOSS Review] Compile failure
https://github.com/openjournals/joss-reviews/issues/3771
I failed to compile the code. When I typed in this command (as instructed for the fourth step of Basic Installation and Usage
in README)
python $ORION2_DIR/setup.py --with-orion2 --no-gui
I first got an error message complaining about undefined variable WITH_CHOMBO
. Copying the following lines within the no_gui
function solves this problem. (or this can be moved outside functions so that defined globally.)
https://bitbucket.org/orionmhdteam/orion2_release1/src/dcd893ca943a350199ded758fd085c95c6c6035e/Tools/Python/ut.py#lines-51
Now, I’ve got another error message:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/ckim/Sources/orion2_release1//Src/Templates/orion2.ini'
Apparently, there is only pluto.ini
in the folder.
Comments (8)
-
reporter -
reporter Also, apparently, the installation instruction steps in README are somewhat messed up. The step number is not right.
-
@changgoo. I’m not able to reproduce your error, but this looks like a python problem. In ut.py, it only goes looking for orion files in Templates if it can’t find any of the ORION2 files in your current directory, i.e., if os.getcwd()+'/init.c' does not exist. However, setup.py shouldn’t take you to the ut.py function no_gui as long as --no-gui is in your arguments list.
I checked out a fresh version and compiled Chombo and did the following with no issue:
cd /home1/00653/tg458122/orion2_release1/Test_Prob/MHD/Blast/
python $ORION2_DIR/setup.py --with-orion2 --no-gui
make
I do get an error if I try to compile in a location that is not a test problem directory, i.e., one that does not have an init.c, orion2.ini and definitions.h.
Can you check your environment variables?
-
reporter Yes, that was the issue. The compile step has to be done in a folder with those key files. Basically, the instruction in README was incorrect, while the instruction in the documentation (Chapter 6. Quick start) was fine. What I’m doing now as a reviewer is to follow the instruction as a user and check whether the code works as it is instructed. My recommendation is to give more clear instruction in README as in the documentation (e.g., adding what are the necessary files in the folder to compile) since the README file is the first thing seen by users. Users would want to do the quick start based on README.
Minor points: README step numbering needs to be corrected.
-
Great! I checked in some changes to the README and documentation. However, I think I see the issue you may have had with the step order – the first 2 steps are how to compile the documentation not the codebase. We also checked in a full orion2_documentation.pdf for convenience. Can you confirm if that is the issue and whether it is clearer now?
-
reporter Oh, the minor issue on the step order I meant is simply that after the step 4), following steps are numbered as 3), 4), 4).
-
Ah, ok! That’s fixed now, thanks.
-
- changed status to resolved
Repository changes made.
- Log in to comment
@soffner I didn’t compile it on the Template directory. If you look in to the
no_gui
function in theut.py
file, what it is trying to do is copyorion2.ini
file from theorion2_dir+'Src/Templates/orion2.ini'
, which is passed by the environment variable$ORION2_DIR
. But, since the file doesn’t exist there, it complains. It is trivial to fix either by putting the correct file in the correct path or give correct instruction in README.