Running the tests njoy16 in ubuntu terminal

  • Thread starter Thread starter emilmammadzada
  • Start date Start date
  • Tags Tags
    Running Ubuntu
Click For Summary

Discussion Overview

The discussion revolves around building and running test files for the NJOY2016 software on an Ubuntu terminal. Participants share commands, experiences, and troubleshooting steps related to the installation and execution of the software, including issues with library dependencies and command not found errors.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Experimental/applied

Main Points Raised

  • One participant asks for the commands to build and run test files in NJOY2016 on Ubuntu.
  • Another participant provides a sequence of commands for building and installing NJOY2016, emphasizing the need for certain dependencies like git, python, cmake, and a Fortran compiler.
  • There is a request for clarification on how to run a specific test sample (sample 01) and the command lines required for it.
  • Some participants suggest copying specific resource files (tape20 and tape26) and running the command 'njoy < input' to execute the tests, noting that output will be generated in a file called 'output'.
  • One participant encounters a "command not found" error when trying to run 'njoy < input', leading to questions about whether the build and installation were successful.
  • Another participant inquires about any errors during the cmake and make steps, suggesting that the build may not have completed correctly.
  • There are reports of successful build and installation steps, but issues persist with loading shared libraries, specifically 'libnjoy.so'.
  • A suggestion is made to use a different cmake command to create a static executable as a potential workaround for the library loading issue.

Areas of Agreement / Disagreement

Participants express differing experiences with the installation process and the resulting errors. There is no consensus on the cause of the library loading issue, and multiple approaches to resolving it are proposed.

Contextual Notes

Some participants mention warnings during the cmake step, and there are unresolved questions about the existence of the 'libnjoy.so' file on the system. The discussion reflects various assumptions about the environment and dependencies required for successful execution.

emilmammadzada
Messages
133
Reaction score
19
TL;DR
Running the tests njoy16 in ubuntu terminal
With which commands can I build and run the tests files in njoy16 on ubuntu?
 
Engineering news on Phys.org
This 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.
 
  • Like
Likes   Reactions: emilmammadzada
Alex A said:
This 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.
i want build and run in tests sample 01 .I dont know using which commandlines
emil@DESKTOP-:~/NJOY2016$ l
CMakeLists.txt LICENSE README.md ReleaseNotes.md build/ docs/ metaconfigure/ src/ tests/
emil@DESKTOP-:~/NJOY2016$ cd build
emil@DESKTOP-:~/NJOY2016/build$ l
CMakeCache.txt CTestTestfile.cmake cmake_install.cmake libnjoy.so* output
CMakeFiles/ Makefile fortran_modules/ njoy* tests/
emil@DESKTOP-:~/NJOY2016/build$ cd tests
emil@DESKTOP-:~/NJOY2016/build/tests$ l
01/ 06/ 11/ 16/ 21/ 26/ 31/ 36/ 41/ 46/ 51/ 56/ 61/ 66/ 71/ 76/ execute.py
02/ 07/ 12/ 17/ 22/ 27/ 32/ 37/ 42/ 47/ 52/ 57/ 62/ 67/ 72/ CMakeFiles/
03/ 08/ 13/ 18/ 23/ 28/ 33/ 38/ 43/ 48/ 53/ 58/ 63/ 68/ 73/ CTestTestfile.cmake
04/ 09/ 14/ 19/ 24/ 29/ 34/ 39/ 44/ 49/ 54/ 59/ 64/ 69/ 74/ Makefile
05/ 10/ 15/ 20/ 25/ 30/ 35/ 40/ 45/ 50/ 55/ 60/ 65/ 70/ 75/ cmake_install.cmake
emil@DESKTOP-:~/NJOY2016/build/tests$ cd 01
emil@DESKTOP-:~/NJOY2016/build/tests/01$ l
CMakeFiles/ Makefile input* referenceTape25 tape26*
CTestTestfile.cmake cmake_install.cmake output tape20* test.inp
emil@DESKTOP-:~/NJOY2016/build/tests/01$ ???
 
(you are in build, having built and installed, the files tape20 and tape26 may already be there if you've run the tests)
Code:
cd tests
cd 01
cp ../../../tests/resources/t511 tape20
cp ../../../tests/resources/t322 tape26
njoy < input
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.
 
  • Like
Likes   Reactions: emilmammadzada
Alex A said:
(you are in build, having built and installed, the files tape20 and tape26 may already be there if you've run the tests)
Code:
cd tests
cd 01
cp ../../../tests/resources/t511 tape20
cp ../../../tests/resources/t322 tape26
njoy < input
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.
app give error command not found
emil@DESKTOP-:~/NJOY2016/build/tests/01$ l
CMakeFiles/ CTestTestfile.cmake Makefile cmake_install.cmake input* output referenceTape25 tape20* tape26*
emil@DESKTOP-:~/NJOY2016/build/tests/01$ njoy < input
njoy: command not found
emil@DESKTOP-:~/NJOY2016/build/tests/01$
 
You did a make and a sudo make install?
 
  • Like
Likes   Reactions: emilmammadzada
i did make and a sudo make install .app give it error
emil@DESKTOP-:~/NJOY2016/build/tests/01$ l
CMakeFiles/ CTestTestfile.cmake Makefile cmake_install.cmake input* output referenceTape25 tape20* tape26*
emil@DESKTOP-:~/NJOY2016/build/tests/01$ njoy < input
njoy: error while loading shared libraries: libnjoy.so: cannot open shared object file: No such file or directory
 
This sounds like the build did not complete correctly. What errors did you get at the end of the cmake step and the make step?
 
  • Like
Likes   Reactions: emilmammadzada
Alex A said:
This sounds like the build did not complete correctly. What errors did you get at the end of the cmake step and the make step?
i am trying to download it again if i get an error i will add it here
 
  • #10
emilmammadzada said:
i am trying to download it again if i get an error i will add it here
emil@DESKTOP-:~/NJOY2016/build$ cmake -DCMAKE_BUILD_TYPE=Release ../
-- Found Python3: /usr/bin/python3.10 (found suitable version "3.10.6", minimum required is "3.5") found components: Interpreter
-- The Fortran compiler identification is GNU 11.3.0
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/f95 - skipped
CMake Warning (dev) at CMakeLists.txt:104 (list):
Policy CMP0121 is not set: The list() command now validates parsing of
index arguments. Run "cmake --help-policy CMP0121" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
Invalid list index "CMAKE_INSTALL_RPATH".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found Git: /usr/bin/git (found version "2.34.1")
--
-- -----------------------------------------------------------
--
-- njoy
-- Git current branch: master
-- Git commit hash: a3a2d7fa2f9f3aa3a543467084e080fa4bc5b587
--
-- -----------------------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /home/emil/NJOY2016/build
 
  • Like
Likes   Reactions: Alex A
  • #11
Ok, any fatal errors running the make command?
 
  • Informative
Likes   Reactions: emilmammadzada
  • #12
Alex A said:
Ok, any fatal errors running the make command?
emil@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
 
  • #13
emilmammadzada said:
emil@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
emil@DESKTOP-:~/NJOY2016/build/tests/01$ l
CMakeFiles/ CTestTestfile.cmake Makefile cmake_install.cmake input* referenceTape25 tape20* tape26*
emil@DESKTOP-:~/NJOY2016/build/tests/01$ njoy < input
njoy: error while loading shared libraries: libnjoy.so: cannot open shared object file: No such file or directory
emil@DESKTOP-:~/NJOY2016/build/tests/01$
same error
 
  • Like
Likes   Reactions: Alex A
  • #14
That 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.
Code:
cmake -D static_libraries=True -D static_njoy=True -D CMAKE_EXE_LINKER_FLAGS="-static" ../
Rebuilding from that and installing again might avoid the problem.
 
  • Informative
Likes   Reactions: emilmammadzada
  • #15
Alex A said:
That 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.
Code:
cmake -D static_libraries=True -D static_njoy=True -D CMAKE_EXE_LINKER_FLAGS="-static" ../
Rebuilding from that and installing again might avoid the problem.
this 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*
 
  • #16
emilmammadzada said:
this 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*
i try again its running
emil@DESKTOP-:~/NJOY2016-2016.69/build/tests/01$ njoy < input

njoy 2016.69 07Feb22 02/08/23 03:44:56
*****************************************************************************

moder... 0.0s

reconr... 0.1s

broadr... 0.1s

heatr... 0.1s

thermr... 0.1s

wrote thermal data for temp = 2.9600E+02 0.2s

thermr... 0.2s

***warning***maximum value of beta limits the allowed energy transfer
the sct approx. will be used for transfers larger than 1.024 ev.

wrote thermal data for temp = 2.9600E+02 0.7s

groupr... 0.7s

---message from conver---cannot do complete particle production for mt= 91
only mf4/mf5 provided

moder... 1.1s
1.8s
*****************************************************************************
emil@DESKTOP-:~/NJOY2016-2016.69/build/tests/01$ l
CMakeFiles/ Makefile input* referenceTape25 tape21 tape23 tape25
CTestTestfile.cmake cmake_install.cmake output tape20* tape22 tape24 tape26*
emil@DESKTOP-:~/NJOY2016-2016.69/build/tests/01$ gedit output
 
  • Like
Likes   Reactions: Alex A

Similar threads

Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
3
Views
3K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 30 ·
2
Replies
30
Views
4K
Replies
2
Views
3K
Replies
2
Views
2K