Skip to content

Commit

Permalink
Merge branch 'amusecode:main' into petar_test_collision
Browse files Browse the repository at this point in the history
  • Loading branch information
rieder authored Nov 8, 2023
2 parents d6549c9 + b159086 commit cfde515
Show file tree
Hide file tree
Showing 312 changed files with 23,573 additions and 24,093 deletions.
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -484,10 +484,15 @@ test_python_sockets_implementation
.idea

src/amuse/community/bonsai2/src
src/amuse/community/*/version.py
src/amuse/version.py
doc/interactive_tutorial/_version.py
src/amuse/test/suite/_version.py
src/amuse/community/*/_version.py
src/amuse/_version.py
src/amuse/community/petar/src
src/amuse/community/seba/src
packages/amuse*/dist
packages/dist
src/amuse/community/phantom/src

# standard directory for a virtualenv
env/
91 changes: 0 additions & 91 deletions .travis.yml

This file was deleted.

42 changes: 27 additions & 15 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for amuse 2023.3.1.dev41+gaa14f8bf8.d20230322.
# Generated by GNU Autoconf 2.71 for amuse 2023.7.0.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
Expand Down Expand Up @@ -668,8 +668,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='amuse'
PACKAGE_TARNAME='amuse'
PACKAGE_VERSION='2023.3.1.dev41+gaa14f8bf8.d20230322'
PACKAGE_STRING='amuse 2023.3.1.dev41+gaa14f8bf8.d20230322'
PACKAGE_VERSION='2023.7.0'
PACKAGE_STRING='amuse 2023.7.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -1505,7 +1505,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures amuse 2023.3.1.dev41+gaa14f8bf8.d20230322 to adapt to many kinds of systems.
\`configure' configures amuse 2023.7.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1571,7 +1571,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of amuse 2023.3.1.dev41+gaa14f8bf8.d20230322:";;
short | recursive ) echo "Configuration of amuse 2023.7.0:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1725,7 +1725,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
amuse configure 2023.3.1.dev41+gaa14f8bf8.d20230322
amuse configure 2023.7.0
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2259,7 +2259,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by amuse $as_me 2023.3.1.dev41+gaa14f8bf8.d20230322, which was
It was created by amuse $as_me 2023.7.0, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -4942,13 +4942,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu

if test -n "$PYTHON"; then
# If the user set $PYTHON, use it and don't search something else.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 3.5" >&5
printf %s "checking whether $PYTHON version is >= 3.5... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 3.7" >&5
printf %s "checking whether $PYTHON version is >= 3.7... " >&6; }
prog="import sys
# split strings by '.' and convert to numeric. Append some zeros
# because we need at least 4 digits for the hex conversion.
# map returns an iterator in Python 3.0 and a list in 2.x
minver = list(map(int, '3.5'.split('.'))) + [0, 0, 0]
minver = list(map(int, '3.7'.split('.'))) + [0, 0, 0]
minverhex = 0
# xrange is not present in Python 3.0 and range returns an iterator
for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
Expand All @@ -4970,8 +4970,8 @@ fi
else
# Otherwise, try each interpreter until we find one that satisfies
# VERSION.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 3.5" >&5
printf %s "checking for a Python interpreter with version >= 3.5... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 3.7" >&5
printf %s "checking for a Python interpreter with version >= 3.7... " >&6; }
if test ${am_cv_pathless_PYTHON+y}
then :
printf %s "(cached) " >&6
Expand All @@ -4983,7 +4983,7 @@ else $as_nop
# split strings by '.' and convert to numeric. Append some zeros
# because we need at least 4 digits for the hex conversion.
# map returns an iterator in Python 3.0 and a list in 2.x
minver = list(map(int, '3.5'.split('.'))) + [0, 0, 0]
minver = list(map(int, '3.7'.split('.'))) + [0, 0, 0]
minverhex = 0
# xrange is not present in Python 3.0 and range returns an iterator
for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
Expand Down Expand Up @@ -7776,7 +7776,13 @@ else $as_nop
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
ifelse(main, main, , # Avoid conflicting decl of main.
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char main();
)
int
main (void)
{
Expand Down Expand Up @@ -7860,7 +7866,13 @@ else $as_nop
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
ifelse(main, main, , # Avoid conflicting decl of main.
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char main();
)
int
main (void)
{
Expand Down Expand Up @@ -14322,7 +14334,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by amuse $as_me 2023.3.1.dev41+gaa14f8bf8.d20230322, which was
This file was extended by amuse $as_me 2023.7.0, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -14377,7 +14389,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
amuse config.status 2023.3.1.dev41+gaa14f8bf8.d20230322
amuse config.status 2023.7.0
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ AC_ARG_VAR([PYTHON], [Python interpreter])

AC_SUBST(FC_ISO_C_BINDINGS)

AM_PATH_PYTHON([3.5])
AM_PATH_PYTHON([3.7])

AC_PATH_PROG([PYTHON], [$PYTHON], [])
AC_ARG_VAR([NVCC], [CUDA compiler command])
Expand Down
53 changes: 53 additions & 0 deletions doc/install/howto-install-AMUSE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,56 @@ individual codes can be build with:
make {code}.code
with {code} the name of the code in lower case.
Installation on HPC systems using modules (tested for Snellius)
***************************************************************
Note that the modules on your local HPC system may be differently named.
.. code-block:: sh
module load 2022
module load foss/2022a
Load python.
.. code-block:: sh
module load Python/3.10.4-GCCcore-11.3.0 # or another version of python, 3.7 or higher
Following AMUSE documentation (see above), download/upgrade the python package: (--user is required by Snellius)
.. code-block:: sh
mkdir MY_PROJECT_DIR
cd MY_PROJECT_DIR
python3 -m venv env # initialise a Python virtual environment, which will contain all the packages we install
source env/bin/activate # activate the virtual environment - this must be repeated every time you log in
pip install --upgrade pip
cd AMUSE_DIR # change to where you downloaded AMUSE
pip install -r requirements.txt --upgrade # install/upgrade all required packages
pip install matplotlib # not required but highly recommended
pip install -e .
Now you can build the AMUSE framework with
.. code-block:: sh
make framework
Finally, build AMUSE individual codes by running from the AMUSE directory:
.. code-block:: sh
make {code}.code
When you log in again (and in your SLURM scripts), you will need to load the same modules and activate the same environment:
.. code-block:: sh
module load 2022
module load foss/2022a
module load Python/3.10.4-GCCcore-11.3.0 # or another version of python, 3.7 or higher
cd MY_PROJECT_DIR
source env/bin/activate
8 changes: 4 additions & 4 deletions m4/ax_mpi.m4
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

AU_ALIAS([ACX_MPI], [AX_MPI])
AC_DEFUN([AX_MPI], [
AC_PREREQ(2.50) dnl for AC_LANG_CASE
AC_PREREQ([2.71]) dnl for AC_LANG_CASE
AC_LANG_CASE([C], [
AC_REQUIRE([AC_PROG_CC])
Expand Down Expand Up @@ -194,16 +194,16 @@ if test x = x"$MPILIBS"; then
AC_CHECK_LIB(mpich, MPI_Init, [MPILIBS="-lmpich"])
fi
dnl We have to use AC_TRY_COMPILE and not AC_CHECK_HEADER because the
dnl We have to use AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) and not AC_CHECK_HEADER because the
dnl latter uses $CPP, not $CC (which may be mpicc).
AC_LANG_CASE([C], [if test x != x"$MPILIBS"; then
AC_MSG_CHECKING([for mpi.h])
AC_TRY_COMPILE([#include <mpi.h>],[],[AC_MSG_RESULT(yes)], [MPILIBS=""
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mpi.h>]], [[]])],[AC_MSG_RESULT(yes)],[MPILIBS=""
AC_MSG_RESULT(no)])
fi],
[C++], [if test x != x"$MPILIBS"; then
AC_MSG_CHECKING([for mpi.h])
AC_TRY_COMPILE([#include <mpi.h>],[],[AC_MSG_RESULT(yes)], [MPILIBS=""
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mpi.h>]], [[]])],[AC_MSG_RESULT(yes)],[MPILIBS=""
AC_MSG_RESULT(no)])
fi],
[Fortran 77], [if test x != x"$MPILIBS"; then
Expand Down
2 changes: 1 addition & 1 deletion m4/ax_openmp.m4
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
#serial 8

AC_DEFUN([AX_OPENMP], [
AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
AC_PREREQ([2.71]) dnl for _AC_LANG_PREFIX
AC_CACHE_CHECK([for OpenMP flag of _AC_LANG compiler], ax_cv_[]_AC_LANG_ABBREV[]_openmp, [save[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
ax_cv_[]_AC_LANG_ABBREV[]_openmp=unknown
Expand Down
2 changes: 1 addition & 1 deletion m4/fftw.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
AC_DEFUN([AX_FFTW],[
AC_ARG_WITH(fftw,
AC_HELP_STRING([--with-fftw=PFX], [Prefix where FFTW has been installed] ),
AS_HELP_STRING([--with-fftw=PFX],[Prefix where FFTW has been installed ]),
[
test "$withval" = no && AC_MSG_WARN([fftw is a required package for some modules])
test "$withval" = yes || fftw_prefix="$withval"
Expand Down
2 changes: 1 addition & 1 deletion m4/gmp.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
AC_DEFUN([AX_GMP],[
AC_ARG_WITH(gmp,
AC_HELP_STRING([--with-gmp=PFX], [Prefix where GMP has been installed] ),
AS_HELP_STRING([--with-gmp=PFX],[Prefix where GMP has been installed ]),
[
test "$withval" = no && AC_MSG_WARN([gmp is a required package for some modules])
test "$withval" = yes || gmp_prefix="$withval"
Expand Down
8 changes: 3 additions & 5 deletions m4/gsl.m4
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,17 @@ AC_ARG_ENABLE(gsltest, [ --disable-gsltest Do not try to compile and run
echo "*** Could not run GSL test program, checking why..."
CFLAGS="$CFLAGS $GSL_FLAGS"
LIBS="$LIBS $GSL_LIBS"
AC_TRY_LINK([
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
]], [[ return 0; ]])],[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GSL or finding the wrong"
echo "*** version of GSL. If it is not finding GSL, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GSL was incorrectly installed"
echo "*** or that you have moved GSL since it was installed. In the latter case, you"
echo "*** may want to edit the gsl-config script: $GSL_CONFIG" ])
Expand Down
Loading

0 comments on commit cfde515

Please sign in to comment.