- #1
emilmammadzada
- 94
- 18
- TL;DR Summary
- Running the tests njoy16 in ubuntu terminal
With which commands can I build and run the tests files in njoy16 on ubuntu?
cd NJOY2016-2016.69
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ../
make -j8
sudo make install
make test
i want build and run in tests sample 01 .I dont know using which commandlinesThis is for njoy2016 ? A new release happened an hour ago. I grabbed it, unpacked and did,
Code:cd NJOY2016-2016.69 mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release ../ make -j8 sudo make install make test
You need some things installed, git, python, cmake, a fortran compiler. This is under ubuntu.
cd tests
cd 01
cp ../../../tests/resources/t511 tape20
cp ../../../tests/resources/t322 tape26
njoy < input
app give error command not found(you are in build, having built and installed, the files tape20 and tape26 may already be there if you've run the tests)
The output messages is in the file called output. The result is in a file called tape25 which should match the reference file in the same directory. There are other files too, I have no idea what they are.Code:cd tests cd 01 cp ../../../tests/resources/t511 tape20 cp ../../../tests/resources/t322 tape26 njoy < input
i am trying to download it again if i get an error i will add it hereThis sounds like the build did not complete correctly. What errors did you get at the end of the cmake step and the make step?
emil@DESKTOP-:~/NJOY2016/build$ cmake -DCMAKE_BUILD_TYPE=Release ../i am trying to download it again if i get an error i will add it here
emil@DESKTOP-:~/NJOY2016/build$ makeOk, any fatal errors running the make command?
emil@DESKTOP-:~/NJOY2016/build/tests/01$ lemil@DESKTOP-:~/NJOY2016/build$ make
[ 92%] Building Fortran object CMakeFiles/njoy.dir/src/main.f90.o
[ 95%] Linking Fortran shared library libnjoy.so
[ 95%] Built target njoy
Scanning dependencies of target njoy_executable
[ 97%] Building Fortran object CMakeFiles/njoy_executable.dir/src/main.f90.o
[100%] Linking Fortran executable njoy
[100%] Built target njoy_executable
emil@DESKTOP-:~/NJOY2016/build$ sudo make install
[sudo] password for emil:
[ 95%] Built target njoy
[100%] Built target njoy_executable
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libnjoy.so
-- Installing: /usr/local/bin/njoy
-- Set runtime path of "/usr/local/bin/njoy" to ""
emil@DESKTOP-:~/NJOY2016/build$ make test
76/77 Test #76: Test76 ........................... Passed 211.17 sec
Start 77: Test78
77/77 Test #77: Test78 ........................... Passed 0.59 sec
100% tests passed, 0 tests failed out of 77
Total Test time (real) = 2156.79 sec
cmake -D static_libraries=True -D static_njoy=True -D CMAKE_EXE_LINKER_FLAGS="-static" ../
this libnjoy.so in the build directoryThat is strange. Does /usr/local/lib/libnjoy.so exist on your system?
A suggestion from the bug reports is to use this cmake line instead to make a static executable.
Rebuilding from that and installing again might avoid the problem.Code:cmake -D static_libraries=True -D static_njoy=True -D CMAKE_EXE_LINKER_FLAGS="-static" ../
i try again its runningthis libnjoy.so in the build directory
emil@DESKTOP-:~/NJOY2016-2016.69/build$ l
CMakeCache.txt CTestTestfile.cmake Testing/ fortran_modules/ libnjoy.so* tests/
CMakeFiles/ Makefile cmake_install.cmake install_manifest.txt njoy*