From ad894c3014a656eb8b5e29a3b95e40c837f73fbd Mon Sep 17 00:00:00 2001 From: Wim Haeck Date: Wed, 2 Nov 2022 11:53:23 -0600 Subject: [PATCH 1/5] Some spring cleaning --- .travis.yml | 46 -------------------------- .travis/build.sh | 44 ------------------------- .travis/signature.sh | 29 ---------------- Dockerfile | 10 ------ appveyor.yml | 78 -------------------------------------------- 5 files changed, 207 deletions(-) delete mode 100644 .travis.yml delete mode 100755 .travis/build.sh delete mode 100755 .travis/signature.sh delete mode 100644 Dockerfile delete mode 100644 appveyor.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2c9833ae..00000000 --- a/.travis.yml +++ /dev/null @@ -1,46 +0,0 @@ -sudo: required -git: - submodules: false -addons: - apt: - sources: - - ubuntu-toolchain-r-test - - george-edison55-precise-backports - packages: - - gcc-6 - - gfortran-6 - -language: c - -compiler: - - gcc - -os: - - linux - - osx - -before_install: -- if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then - brew update; - brew upgrade python3; - brew install gcc || true; - fi - - -osx_image: xcode8 -script: "./.travis/build.sh" -after_success: "./.travis/signature.sh" - -env: - matrix: - - build_type=debug static_libraries=FALSE - - build_type=release static_libraries=FALSE - - build_type=debug static_libraries=TRUE - - build_type=release static_libraries=TRUE - global: - secure: IUWZ5BkSTQHXEzjlRKvcLxenomV04QMh2I1Wi9ooDBl/b/EBS5WaUO99haj26F2zQhxxD12ZYY6CdCtqgV8tBdXMlTtlqA6LS5Sp6hz1Ijkr6729XzGf9TkaUKD+ef5NgrjFjhW8k8sO4Q+QijjX3ZT6CgtIcY9f5JZvTTQbFukNTRSHMCClP9PAPj7V2iZwRXpFSW/t+v/6Mj3vLofXaGeP29aHuUG4zf/rex6MXXAMOxCsLvpnaoWpeyU4u0g+KcfsQMm+cFiWrz5KawLs/eNAzYg+DvtzEnjNUJ70u+yZoDWIvFd24HCmlAClq7tAOto4Z70IVzuJKjxnAZJpzzhSP06jzIlZmXQdDHVgiMQjOw2HA1/fwNDCYSyGb3CaYWdqUZ1VbbbIDZAi7mtjqSw+iYMY5BVqc5C8CwY4bgONt3mybAU/Xm5RfPTfy/Qk6rCwojQ4JaDfTqEaTlTPvL7xZweF9reEwaunZvzf+ooHnL8f3ke1Ok5OhGUaj+ftAOdB+A6BDec2jau4YbckhKfVbRNTivZTvNcPQIl/YyqmtiIi93N+YxYOhrPliKKN9gNbLZIhZ3cClVg7BauWxM5OK94Q9tyvMcNpBx2OtrXVF5EfkesdtFb+qBIlmhUSBPmpVEZtdm8KeFvmt0VaMLFIPMu8ecA63KCGVwJc9wg= -matrix: - include: - - os: linux - compiler: gcc - env: build_type=coverage static_libraries=FALSE diff --git a/.travis/build.sh b/.travis/build.sh deleted file mode 100755 index b6a80cb0..00000000 --- a/.travis/build.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -set -x - -if [ "$TRAVIS_OS_NAME" = "linux" ]; then - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 90 \ - --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-6 \ - --slave /usr/bin/gcov gcov /usr/bin/gcov-6 \ - --slave /usr/bin/gcc-ar ar /usr/bin/gcc-ar-6 \ - --slave /usr/bin/gcc-nm nm /usr/bin/gcc-nm-6 \ - --slave /usr/bin/gcc-ranlib ranlib /usr/bin/gcc-ranlib-6 - sudo update-alternatives --config gcc - export CUSTOM=('-D CMAKE_AR=/usr/bin/gcc-ar' '-D CMAKE_NM=/usr/bin/gcc-nm' '-D CMAKE_RANLIB=/usr/bin/gcc-ranlib') -else - export CUSTOM=("-D no_link_time_optimization=TRUE") -fi - -export FC=$(which gfortran) - -mkdir build -cd build -cmake ${CUSTOM[@]}\ - -D CMAKE_BUILD_TYPE=$build_type \ - -D static_libraries=$static_libraries \ - -D appended_flags="$appended_flags" .. -make -j2 -export COMPILATION_FAILURE=$? -if [ $COMPILATION_FAILURE -ne 0 ]; -then - exit 1 -fi - -ctest --output-on-failure -j2 -export TEST_FAILURE=$? -if [ $TEST_FAILURE -ne 0 ]; -then - exit 1 -fi -if [ "$build_type" = "coverage" ] -then - pip install --upgrade pip - pip install --user cpp-coveralls - echo "loading coverage information" - coveralls --exclude-pattern "/usr/include/.*|.*/CMakeFiles/.*|.*subprojects.*|.*dependencies.*|.*test\.cpp" --root ".." --build-root "." --gcov-options '\-lp' -fi diff --git a/.travis/signature.sh b/.travis/signature.sh deleted file mode 100755 index d91bc429..00000000 --- a/.travis/signature.sh +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/bash - -if [ "$TRAVIS_PULL_REQUEST" = false ] && - [ "$TRAVIS_BRANCH" = "master" ] && - [ "$build_type" = "coverage" ]; then - git config --global user.email "jlconlin@lanl.gov" - git config --global user.name "Jeremy Lloyd Conlin" - - timestamp=`date +%F_%T` - - git clone https://github.com/njoy/signatures.git - - project=$(basename $TRAVIS_REPO_SLUG) - DIR="$PWD/signatures/$project" - mkdir -p $DIR - - filename=$DIR/$timestamp - - ./metaconfigure/signature.py $filename - - cd $DIR - git checkout master - git add $filename.json - git commit -m "Adding signature file for $project." - - git remote add origin-travis https://user:${GH_TOKEN}@github.com/njoy/signatures.git > /dev/null 2>&1 - -git push --quiet --set-upstream origin-travis master -fi diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index fc3bdf2d..00000000 --- a/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM debian:latest - -RUN apt update && apt upgrade -y && \ - apt install gfortran cmake python3 git -y && \ - git clone https://github.com/njoy/NJOY2016.git &&\ - cd NJOY2016 && mkdir build && cd build &&\ - cmake .. && \ - make - -ENTRYPOINT [ "/bin/bash" ] diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index bb583b20..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,78 +0,0 @@ -image: - - "Visual Studio 2017" - -shallow_clone: false - -environment: - MINGW_DIR: C:\msys64\mingw64\bin - Path: C:\Python34-x64\;%MINGW_DIR%;%Path% - matrix: - - - CMAKE_BUILD: cygwin - STATIC_LIBS: true - CYGWIN_NOWINPATH: yes - clone_folder: "C:\\cygwin\\projects\\NJOY2016" - CYG_BASH: C:\cygwin\bin\bash - CYG_CACHE: C:\cygwin\var\cache\setup - CYG_MIRROR: http://cygwin.mirror.constant.com - CYG_ROOT: C:\cygwin - CC: /usr/bin/gcc - CXX: /usr/bin/g++ - FC: /usr/bin/gfortran - - - CMAKE_BUILD: MSYS - STATIC_LIBS: true - clone_folder: "C:\\projects\\NJOY2016" - CC: "%MINGW_DIR%\\gcc.exe" - CXX: "%MINGW_DIR%\\g++.exe" - FC: "%MINGW_DIR%\\gfortran.exe" - TMP_PATH: "C:\\Program Files (x86)\\CMake\\bin;C:\\Python34-x64;%MINGW_DIR%;C:\\Program Files\\Git\\cmd;C:\\msys64;C:\\Program Files\\Git\\usr\\bin" - - - CMAKE_BUILD: MSYS - STATIC_LIBS: false - clone_folder: "C:\\projects\\NJOY2016" - CC: "%MINGW_DIR%\\gcc.exe" - CXX: "%MINGW_DIR%\\g++.exe" - FC: "%MINGW_DIR%\\gfortran.exe" - TMP_PATH: "C:\\Program Files (x86)\\CMake\\bin;C:\\Python34-x64;%MINGW_DIR%;C:\\Program Files\\Git\\cmd;C:\\msys64;C:\\Program Files\\Git\\usr\\bin" - - - CMAKE_BUILD: MinGW - STATIC_LIBS: true - clone_folder: "C:\\projects\\NJOY2016" - CC: "%MINGW_DIR%\\gcc.exe" - CXX: "%MINGW_DIR%\\g++.exe" - FC: "%MINGW_DIR%\\gfortran.exe" - TMP_PATH: "C:\\Program Files (x86)\\CMake\\bin;C:\\Python34-x64;%MINGW_DIR%;C:\\Program Files\\Git\\cmd;C:\\msys64;C:\\Program Files\\Git\\usr\\bin" - - - CMAKE_BUILD: MinGW - STATIC_LIBS: false - clone_folder: "C:\\projects\\NJOY2016" - CC: "%MINGW_DIR%\\gcc.exe" - CXX: "%MINGW_DIR%\\g++.exe" - FC: "%MINGW_DIR%\\gfortran.exe" - TMP_PATH: "C:\\Program Files (x86)\\CMake\\bin;C:\\Python34-x64;%MINGW_DIR%;C:\\Program Files\\Git\\cmd;C:\\msys64;C:\\Program Files\\Git\\usr\\bin" - -init: - - if [%CMAKE_BUILD%]==[cygwin] git config --global core.autocrlf input - -install: - - if [%CMAKE_BUILD%]==[cygwin] C:\cygwin\setup-x86.exe -q --root %CYG_ROOT% --local-package-dir %CYG_CACHE% --packages cmake,make,git,python3,gcc-core,gcc-g++,gcc-fortran --force-current --no-shortcuts --no-startmenu --no-desktop - -before_build: - - if not [%CMAKE_BUILD%]==[cygwin] set OrigPath=%Path% - - if [%CMAKE_BUILD%]==[cygwin] set Path=C:\cygwin\bin - -build_script: - - mkdir build - - cd build - - if [%CMAKE_BUILD%]==[cygwin] %CYG_BASH% -c "/usr/bin/cmake -D static=%STATIC_LIBS% -G \"Unix Makefiles\" .." - - if [%CMAKE_BUILD%]==[cygwin] %CYG_BASH% -c "/usr/bin/make -j2" -# Non-cygwin builds - - if not [%CMAKE_BUILD%]==[cygwin] set Path=%TMP_PATH% - - if not [%CMAKE_BUILD%]==[cygwin] cmake -D CMAKE_Fortran_COMPILER=C:/msys64/mingw64/bin/gfortran.exe -D CMAKE_MAKE_PROGRAM=C:/msys64/mingw64/bin/mingw32-make.exe -D static=%STATIC_LIBS% -G "%CMAKE_BUILD% Makefiles" .. - - if not [%CMAKE_BUILD%]==[cygwin] set Path=%OrigPath% - - if not [%CMAKE_BUILD%]==[cygwin] mingw32-make -j2 - -after_build: - - if [%CMAKE_BUILD%]==[cygwin] %CYG_BASH% -c "ctest -j2 --output-on-failure" - - if not [%CMAKE_BUILD%]==[cygwin] ctest -j2 --output-on-failure From ae6b23c81ce79eb6809e3313a08af7e058423295 Mon Sep 17 00:00:00 2001 From: Wim Haeck Date: Wed, 2 Nov 2022 12:45:09 -0600 Subject: [PATCH 2/5] Updating readme --- README.md | 44 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2c75d5c1..edd73823 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,51 @@ # NJOY2016 - The NJOY Nuclear Data Processing System is a modular computer code designed to read evaluated data in ENDF format, transform the data in various ways, and output the results as libraries designed to be used in various applications. Each module performs a well defined processing task. The modules are essentially independent programs, and they communicate with each other using input and output files, plus a very few common variables. +The NJOY Nuclear Data Processing System is a modular computer code designed to read evaluated data in ENDF format, transform the data in various ways, and output the results as libraries designed to be used in various applications. Each module performs a well defined processing task. The modules are essentially independent programs, and they communicate with each other using input and output files, plus a very few common variables. ## Documentation -The documentation for NJOY2016 is found in the [NJOY2016-manual](https://github.com/njoy/NJOY2016-manual) repository. There, you can find a [pre-compiled PDF](https://github.com/njoy/NJOY2016-manual/raw/master/njoy16.pdf) of the manual. +The user manual for NJOY2016 can be found here: [NJOY User Manual (pdf)](https://github.com/njoy/NJOY2016-manual/raw/master/njoy16.pdf). -Please refer to the [Release Notes](ReleaseNotes.md) to see what has changed from one version to the next. +## Release and development versions +For the latest version of NJOY2016 and an overview of the latest changes, please see the [Release Notes](ReleaseNotes.md) or the [release](https://github.com/njoy/NJOY2016/releases) page. + +The latest release version of NJOY2016 can always be found at the head of the [main](https://github.com/njoy/NJOY2016) branch of this repository and every release is associated to a release tag. New versions are released on a regular basis (we aim to provide updates at least every three months). The latest development version of NJOY2016 containing the latest updates and changes can be found in at the head of the [develop](https://github.com/njoy/NJOY2016/tree/develop) branch. This development version should be used with caution. ## Installation -Instructions for the installation of NJOY2016 are found on our page, [Obtaining and Installing NJOY](https://docs.njoy21.io/install.html). -## Modules +### Prerequisites: + +The following are the prerequisites for compiling NJOY2016: + - git + - cmake 3.15 or higher + - a Fortran 2003 compliant compiler such as gcc-7 or higher + +Note: gcc-11.3 has been known to produce an internal compiler error while compiling NJOY2016, so as a result this specific version of gcc is not supported. Other versions of gcc (version 7 or higher) seem to be capable of compiling NJOY2016. + +### Instructions: + +To compile the latest NJOY2016 version, you can use the following instructions: +``` +git clone https://github.com/njoy/NJOY2016.git +cd NJOY2016 +mkdir build +cd build +cmake -DCMAKE_BUILD_TYPE=Release ../ +make -j8 +``` + +The above instructions will produce a release build consisting of a dynamic library and dynamically linked library. To compile a static version (i.e. the executable is not a dynamically linked executable), the cmake command shown above should be replaced with the following cmake command: +``` +cmake -DCMAKE_BUILD_TYPE=Release -Dstatic_libraries=ON -Dstatic_njoy=ON -DCMAKE_EXE_LINKER_FLAGS=-static ../ +``` + +When you have already cloned the NJOY2016 repository and wish to update to the latest version, you can use the following instructions (inside the build folder): +``` +git pull +make -j8 +``` + +## Module overview + `NJOY` directs the flow of data through the other modules and contains a library of common functions and subroutines used by the other modules. + `RECONR` reconstructs pointwise (energy-dependent) cross sections from ENDF resonance parameters and interpolation schemes. + `BROADR` Doppler broadens and thins pointwise cross sections. From 369c212af3e39ce19f4459e70b65e1d194b14c27 Mon Sep 17 00:00:00 2001 From: Wim Haeck Date: Wed, 2 Nov 2022 12:46:08 -0600 Subject: [PATCH 3/5] Small correction --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index edd73823..4ac811c3 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,8 @@ make -j8 The above instructions will produce a release build consisting of a dynamic library and dynamically linked library. To compile a static version (i.e. the executable is not a dynamically linked executable), the cmake command shown above should be replaced with the following cmake command: ``` -cmake -DCMAKE_BUILD_TYPE=Release -Dstatic_libraries=ON -Dstatic_njoy=ON -DCMAKE_EXE_LINKER_FLAGS=-static ../ +cmake -DCMAKE_BUILD_TYPE=Release -Dstatic_libraries=ON + -Dstatic_njoy=ON -DCMAKE_EXE_LINKER_FLAGS=-static ../ ``` When you have already cloned the NJOY2016 repository and wish to update to the latest version, you can use the following instructions (inside the build folder): From 721df373264e01ac925c621d98d950f428cb15c7 Mon Sep 17 00:00:00 2001 From: Wim Haeck Date: Wed, 2 Nov 2022 13:05:20 -0600 Subject: [PATCH 4/5] Another small correction --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4ac811c3..0024e3d3 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ cmake -DCMAKE_BUILD_TYPE=Release ../ make -j8 ``` -The above instructions will produce a release build consisting of a dynamic library and dynamically linked library. To compile a static version (i.e. the executable is not a dynamically linked executable), the cmake command shown above should be replaced with the following cmake command: +The above instructions will produce a release build consisting of a dynamic library and dynamically linked executable. To compile a static version (i.e. the executable is not a dynamically linked executable), the cmake command shown above should be replaced with the following cmake command: ``` cmake -DCMAKE_BUILD_TYPE=Release -Dstatic_libraries=ON -Dstatic_njoy=ON -DCMAKE_EXE_LINKER_FLAGS=-static ../ From dd3c61a62c9da93cdf61e75e88e0c93f920995a9 Mon Sep 17 00:00:00 2001 From: Wim Haeck Date: Wed, 2 Nov 2022 13:14:37 -0600 Subject: [PATCH 5/5] setting cmake minimum version to 3.15 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f6aa689..3f00aa44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required( VERSION 3.2 ) +cmake_minimum_required( VERSION 3.15 ) find_package( Python3 3.5 REQUIRED )