Running the tests njoy16 in ubuntu terminal

In summary: 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 - skippedCMake Warning (dev) at CMakeLists.txt:104 (list): Policy CMP0121 is not set: The list() command now validates parsing of index arguments.
  • #1
emilmammadzada
109
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?
 
Engineering news on Phys.org
  • #2
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 emilmammadzada
  • #3
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$ ???
 
  • #4
(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 emilmammadzada
  • #5
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$
 
  • #6
You did a make and a sudo make install?
 
  • Like
Likes emilmammadzada
  • #7
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
 
  • #8
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 emilmammadzada
  • #9
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 Alex A
  • #11
Ok, any fatal errors running the make command?
 
  • Informative
Likes 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 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 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 Alex A

Similar threads

Replies
6
Views
1K
Replies
3
Views
2K
Replies
3
Views
2K
  • Computing and Technology
Replies
6
Views
943
  • Programming and Computer Science
Replies
2
Views
867
  • Programming and Computer Science
Replies
30
Views
2K
  • Computing and Technology
Replies
23
Views
2K
Replies
2
Views
1K
  • Nuclear Engineering
Replies
2
Views
1K
Replies
3
Views
1K
Back
Top