Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
09e5730
Make cmake find dll files for installing
ckebschull Jun 2, 2023
278a2f2
Enable building in MSYS2 environment
ckebschull Jun 2, 2023
1333cce
Update build instructions for MSYS2
ckebschull Jun 2, 2023
e8accd0
Fix typo in build.sh
ckebschull Jun 2, 2023
47586fd
Update to latest libslam version
ckebschull Aug 29, 2023
d77fe03
Remove old lib and include libraries
ckebschull Aug 29, 2023
5420101
remove integer time-step limitation
jwy-1997 Oct 12, 2023
a195824
updates for the rdinp
jwy-1997 Oct 12, 2023
67ca277
adjust according to comment
jwy-1997 Oct 13, 2023
116b699
update according to comment again for some fixs that I forgot
jwy-1997 Oct 13, 2023
16996b6
add new time updates
jwy-1997 Oct 19, 2023
0a28d81
update time-stamp fix
jwy-1997 Oct 20, 2023
02b8654
update src to remove test code and update the time-stamp label
jwy-1997 Oct 20, 2023
c62fc35
Add value to error message for better debugging.
ckebschull Nov 1, 2024
0722a32
Merge branch 'develop' into chk/build-on-windows
ckebschull Nov 25, 2024
7e0b6ab
Copy dll files to work dir after build
ckebschull Nov 25, 2024
5dd720a
Use MSYS Makefiles instead of Ninja as CMake generator
ckebschull Dec 4, 2024
13fd7b3
Add extra packages for windows compilation
zurdala Jan 10, 2025
9129b72
Merge pull request #49 from Space-Systems/chk/build-on-windows
ckebschull Jan 10, 2025
4aee0c9
Merge branch 'jwy/time_showing' of https://github.com/B05208038/neptu…
zurdala Jan 10, 2025
4920e43
Set the original times in the work/neptune.inp file
zurdala Jan 10, 2025
35fd9ef
Make script executable
zurdala Jan 10, 2025
5f54da4
Change step size from int to dp everywhere
ckebschull Feb 28, 2025
4b73f52
Update to latest libslam with date2longstring fix
ckebschull Feb 28, 2025
671075e
Init start epoch of propagation
zurdala Mar 3, 2025
f64aea2
Update work data files
zurdala Mar 3, 2025
e1328a9
Merge pull request #52 from Space-Systems/owen-time-fix
zurdala Mar 3, 2025
f53a9f1
Merge branch 'master' into develop
zurdala Mar 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ elseif (CMAKE_BUILD_TYPE STREQUAL "Release")

endif (CMAKE_BUILD_TYPE STREQUAL "Debug")

set(CMAKE_FIND_LIBRARY_SUFFIXES .dll ${CMAKE_FIND_LIBRARY_SUFFIXES})

if ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS} -O0 -cpp -DDBLE -g -fbounds-check -fbacktrace -ffree-line-length-none -finit-local-zero -Wall")
set (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS} -O3 -DDBLE -ffree-line-length-none -cpp")
Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,31 @@ The propagator is written in Fortran-2008 and HPC ready by enabling OpenMP.
The software can be compiled on
* Linux,
* macOS and
* Windows (using the Windows Subsystem for Linux on Windows 10, cygwin or MinGW)
* Windows (MSYS2)

To build NEPTUNE you will need:
* a fortran compiler (e.g. gfortran >= 8.0 or ifort > 19.0)
* cmake >= 3.12
* the [Orbital Propagation Interface (OPI-2015)](https://github.com/ILR/OPI) (retrieved automatically)
* the support library [libslam](https://github.com/IRAS/libslam) (retrieved automatically)
* the testing framework [pFUnit](https://github.com/Goddard-Fortran-Ecosystem/pFUnit) (retrieved automatically)
* doxygen (only for the source code documentation)
* graphviz (only for the source code documentation)
* latex (only for editing the technical documentation)
* On Ubuntu 18.04 LTS this works: `apt install texlive texlive-lang-german texlive-latex-extra texlive-tubs texlive-science`

For MSYS2 you need to install the newest MSYS2 version and install in the MINGW64 environment (important to use this shell in particular):
* mingw-w64-x86_64-gcc
* mingw-w64-x86_64-gcc-fortran
* mingw-w64-x86_64-cmake
* mingw-w64-x86_64-ninja
* mingw-w64-x86_64-toolchain
* base-devel

To install, use `pacman -S mypackagename`.

Note that installing `mingw-w64-x86_64-python3` might lead to issues building pFUnit.

To get started execute the build script:
```
$ bash build.sh
Expand Down
95 changes: 63 additions & 32 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# Define how to build the libraries and executables:
BUILD_TYPE=Debug
Fortran_COMPILER=gfortran
GENERATOR="Unix Makefiles"
ENABLE_OPI_SUPPORT=OFF
LIBSUFFIX="so"
if [[ "$OSTYPE" == "linux-gnu" ]]; then
LIBSUFFIX="so"
Expand All @@ -12,32 +14,38 @@ elif [[ "$OSTYPE" == "CYGWIN"* ]]; then
LIBSUFFIX="dll"
elif [[ "$OSTYPE" == "MINGW"* ]]; then
LIBSUFFIX="dll"
elif [[ "$OSTYPE" == "msys"* ]]; then
LIBSUFFIX="dll"
GENERATOR="MSYS Makefiles"
fi
git submodule update --init --recursive
################################################################################
# #
# Build OPI #
# #
################################################################################
# Build OPI
cd OPI || exit
# Create the build directory if it does not exist
if [[ ! -d "build" ]]; then
mkdir build
else
rm -rf build/*
fi
cd build || exit
echo "Updating cmake"
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=../ -DCMAKE_Fortran_COMPILER=$Fortran_COMPILER -DENABLE_CXX11=ON -DENABLE_CL_SUPPORT=OFF -DENABLE_CUDA_SUPPORT=OFF -DENABLE_PYTHON=OFF ../
echo "Building OPI"
make install
if [[ $? -ne 0 ]]; then
echo "Could not build OPI. Exiting."
exit $?
if [[ "$ENABLE_OPI_SUPPORT" == "ON" ]]; then
# Build OPI
cd OPI || exit || exit
# Create the build directory if it does not exist
if [[ ! -d "build" ]]; then
mkdir build
else
rm -rf build/*
fi
cd build || exit || exit
echo "Updating cmake"
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=../ -DCMAKE_Fortran_COMPILER=$Fortran_COMPILER -DENABLE_CXX11=ON -DENABLE_CL_SUPPORT=OFF -DENABLE_CUDA_SUPPORT=OFF -DENABLE_PYTHON=OFF -G "$GENERATOR" ../
echo "Building OPI"
cmake --build .
cmake --install .
if [[ $? -ne 0 ]]; then
echo "Could not build OPI. Exiting."
exit $?
fi
echo "Leaving OPI"
cd ../../
fi
echo "Leaving OPI"
cd ../../
################################################################################
# #
# Build libslam #
Expand All @@ -53,15 +61,25 @@ else
fi
cd build || exit
echo "Updating cmake"
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_Fortran_COMPILER=$Fortran_COMPILER -DENABLE_OpenMP_SUPPORT=OFF -DENABLE_POSTGRESQL_SUPPORT=OFF ../
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_Fortran_COMPILER=$Fortran_COMPILER -DENABLE_OpenMP_SUPPORT=OFF -DENABLE_POSTGRESQL_SUPPORT=OFF -G "$GENERATOR" ../
echo "Building libslam"
make install
cmake --build .
cmake --install .
if [[ $? -ne 0 ]]; then
echo "Could not build libslam. Exiting."
exit $?
fi
echo "Manually preparing 'lib' and 'include' directories"
cd ../
# Delete the include and lib folders when they exist,
# as linking on windows will create directories which
# leads to errors on the second run of the script
if [[ ! -d "include" ]]; then
rm -rf include
fi
if [[ ! -d "lib" ]]; then
rm -rf lib
fi
ln -sf build/include include
ln -sf build/lib lib
echo "Leaving libslam"
Expand All @@ -81,10 +99,10 @@ fi
cd build || exit
echo "Updating cmake"
export FC=$Fortran_COMPILER
cmake -DSKIP_MPI=yes ../
cmake -DSKIP_MPI=yes -G "$GENERATOR" ../
echo "Building pFUnit"
make
make install
cmake --build .
cmake --install .
cd ../
echo "Leaving pFUnit"
cd ../
Expand All @@ -97,11 +115,13 @@ cd ../
if [[ ! -d "lib" ]]; then
mkdir lib
fi
# Create the links to libraries needed by CAMP
cd lib || exit
# Create the links to libraries needed by NEPTUNE
cd lib || exit || exit
ln -sf ../libslam/lib/libslam-Fortran.$LIBSUFFIX .
ln -sf ../OPI/lib/libOPI-Fortran.$LIBSUFFIX .
ln -sf ../OPI/lib/libOPI.$LIBSUFFIX .
if [[ "$ENABLE_OPI_SUPPORT" == "ON" ]]; then
ln -sf ../OPI/lib/libOPI-Fortran.$LIBSUFFIX .
ln -sf ../OPI/lib/libOPI.$LIBSUFFIX .
fi
cd ..
# Create the include directory if it does not exist
if [[ ! -d "include" ]]; then
Expand All @@ -110,7 +130,9 @@ fi
# Create the links to includes needed by NEPTUNE
cd include || exit
ln -sf ../libslam/include/SLAM .
ln -sf ../OPI/include/OPI .
if [[ "$ENABLE_OPI_SUPPORT" == "ON" ]]; then
ln -sf ../OPI/include/OPI .
fi
cd ..
# Create the build directory if it does not exist
if [[ ! -d "build" ]]; then
Expand All @@ -121,15 +143,24 @@ fi
cd build || exit
echo "Updating cmake"
export PFUNIT_DIR=..//pFUnit/build/installed
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_Fortran_COMPILER=$Fortran_COMPILER -DENABLE_OPI_SUPPORT=ON -DSKIP_MSIS_2=ON ../
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_Fortran_COMPILER=$Fortran_COMPILER -DENABLE_OPI_SUPPORT=$ENABLE_OPI_SUPPORT -DSKIP_MSIS_2=ON -G "$GENERATOR" ../
echo "Building NEPTUNE"
make install
cmake --build .
cmake --install .
if [[ $? -ne 0 ]]; then
echo "Could not build NEPTUNE. Exiting."
exit $?
fi
echo "Leaving NEPTUNE"
cd ../work || exit
ln -sf ../bin/neptune-sa .
cd ../work || exit || exit
if [[ "$OSTYPE" == "msys"* || "$OSTYPE" == "MINGW"* ]]; then
ln -sf ../bin/neptune-sa.exe . || exit || exit
ln -sf ../bin/libneptune.dll . || exit || exit
ln -sf ../lib/libneptune.dll.a . || exit || exit
ln -sf ../libslam/lib/libslam-Fortran.dll . || exit || exit
ln -sf ../libslam/lib/libslam-Fortran.dll.a . || exit || exit
else
ln -sf ../bin/neptune-sa . || exit || exit
fi
cd ..
echo "Done"
Loading