Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instalation problem #186

Open
MaxwellTY opened this issue Jan 22, 2024 · 5 comments
Open

Instalation problem #186

MaxwellTY opened this issue Jan 22, 2024 · 5 comments

Comments

@MaxwellTY
Copy link

MaxwellTY commented Jan 22, 2024

Hello!

I have a problem with the installation (NJOY21). The first disturbing command appears at cmake -DCMAKE_BUILD_TYPE=Release ../.
I receive this warning:

CMake Warning (dev) at build/_deps/njoy-src/CMakeLists.txt:103 (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.

but everything else looks fine.

The real problems begin with make...:

[ 57%] Built target njoy
[ 61%] Built target njoy_c_bindings
[ 82%] Built target utility
[ 85%] Built target njoy21
[ 87%] Building CXX object src/njoy21/CommandLine/test/CMakeFiles/njoy21.CommandLine.test.dir/CommandLine.test.cpp.o
In file included from /usr/include/signal.h:328,
                 from /home/Max/GIT/NJOY21/build/_deps/catch-adapter-src/src/single_include/catch.hpp:6520,
                 from /home/Max/GIT/NJOY21/src/njoy21/CommandLine/test/CommandLine.test.cpp:2:
/home/Max/GIT/NJOY21/build/_deps/catch-adapter-src/src/single_include/catch.hpp:6543:33: error: size of array ‘altStackMem’ is not an integral constant-expression
 6543 |         static char altStackMem[SIGSTKSZ];
      |                                 ^~~~~~~~
/home/Max/GIT/NJOY21/build/_deps/catch-adapter-src/src/single_include/catch.hpp:6594:45: error: size of array ‘altStackMem’ is not an integral constant-expression
 6594 |     char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
      |                                             ^~~~~~~~
In file included from /home/Max/GIT/NJOY21/build/_deps/hana-adapter-src/src/include/boost/hana.hpp:191,
                 from /home/Max/GIT/NJOY21/build/_deps/endftk-src/src/ENDFtk/section/6.hpp:8,
                 from /home/Max/GIT/NJOY21/build/_deps/endftk-src/src/ENDFtk.hpp:19,
                 from /home/Max/GIT/NJOY21/src/njoy21.hpp:14,
                 from /home/Max/GIT/NJOY21/src/njoy21/CommandLine/test/CommandLine.test.cpp:4:
/home/Max/GIT/NJOY21/build/_deps/hana-adapter-src/src/include/boost/hana/traits.hpp:71:62: warning: ‘template<class _Tp> struct std::is_literal_type’ is deprecated [-Wdeprecated-declarations]
   71 |     constexpr auto is_literal_type = detail::hana_trait<std::is_literal_type>{};
      |                                                              ^~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/bits/move.h:57,
                 from /usr/include/c++/12/bits/exception_ptr.h:43,
                 from /usr/include/c++/12/exception:168,
                 from /usr/include/c++/12/ios:39,
                 from /usr/include/c++/12/istream:38,
                 from /usr/include/c++/12/sstream:38,
                 from /home/Max/GIT/NJOY21/build/_deps/catch-adapter-src/src/single_include/catch.hpp:384:
/usr/include/c++/12/type_traits:771:5: note: declared here
  771 |     is_literal_type
      |     ^~~~~~~~~~~~~~~
make[2]: *** [src/njoy21/CommandLine/test/CMakeFiles/njoy21.CommandLine.test.dir/build.make:76: src/njoy21/CommandLine/test/CMakeFiles/njoy21.CommandLine.test.dir/CommandLine.test.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2700: src/njoy21/CommandLine/test/CMakeFiles/njoy21.CommandLine.test.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

I tried commenting out the 26th and 27th lines (flags) in CMakeLists.txt, but it didn't do anything. I would appreciate your help.

@whaeck
Copy link
Member

whaeck commented Jan 24, 2024

I have not seen this error before. Can you tell me which compiler and OS you're using so I can diagnose the problem?

As an alternative, you can also try to use NJOY2016 directly (NJOY21 uses NJOY2016 under the hood): https://github.com/njoy/NJOY2016
The installation procedure for this version of NJOY is essentially the same as what you done for NJOY21 but it will go a lot faster (it only requires a Fortran compiler).

@MaxwellTY
Copy link
Author

I tried on two PC with different operating systems: Debian (release: 12) and Ubuntu (release: 23) and I've got exactly the same errors and warnings. My gcc version is 12.2.0.

@wahidluthfi
Copy link

Yeah, I also encounter the same issue when compiling NJOY21 in WSL Ubuntu. I am using gcc 11.4.0 and cmake 3.22.1.
Screenshot 2024-05-28 103401

on the other hand, I also compiled njoy2016 in the same machine and it could do the 'make test' with a 100% pass, but when I use it to check my input, like the one that I attach here, it looks like it is stuck when I am using command 'njoy -i U235 -v'
testU235.zip
Screenshot 2024-05-28 104039

I am also trying to rerun test no 21 from the njoy test folder, but it is also stuck. is there any change on the command line to run njoy from the terminal?
test21.zip

thanks

@kkaryos
Copy link

kkaryos commented Jun 30, 2024

is there a solution for this?

@wahidluthfi
Copy link

wahidluthfi commented Aug 13, 2024

as per 13 August 2024, I recommend you to use NJOY2016 because their latest update (NJOY2016.76) has solved the previous issue and I got 100% tests passed.
image

https://github.com/njoy/NJOY2016

note: the run command for njoy2016 from terminal is

njoy < inputfile
njoy < inputfile > output.o # terminal stdout to output.file
njoy < inputfile |& tee output.o # if using tee

I am using WSL Ubuntu from Win 11:
git version 2.34.1
cmake version 3.22.1
gcc 11.4.0 (Ubuntu 11.4.0-1ubuntu1 22.04)
GNU Fortran 11.4.0 (Ubuntu 11.4.0-1ubuntu1 22.04)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants