From cea31e463d54effc7687cabdaa2156652f7cb1c6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Mar 2025 10:20:31 -0400 Subject: [PATCH 1/4] remove references to -DLAMMPS_SMALLSMALL and trigger error when used --- cmake/CMakeLists.txt | 4 +- cmake/Modules/LAMMPSInterfacePlugin.cmake | 4 +- doc/src/Build_extras.rst | 9 ++-- doc/src/Build_settings.rst | 15 ++---- doc/src/Errors_messages.rst | 5 +- doc/src/Fortran.rst | 3 +- doc/src/Library_add.rst | 6 +-- fortran/lammps.f90 | 66 +++-------------------- src/info.cpp | 2 - src/lammps.cpp | 7 --- src/library.h | 2 +- src/lmptype.h | 42 +++------------ 12 files changed, 35 insertions(+), 130 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index c1a0875c15..f22fa401a2 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -431,8 +431,8 @@ else() target_link_libraries(lammps PUBLIC mpi_stubs) endif() -set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallsmall: all 32-bit, smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)") -set(LAMMPS_SIZES_VALUES smallbig bigbig smallsmall) +set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)") +set(LAMMPS_SIZES_VALUES smallbig bigbig) set_property(CACHE LAMMPS_SIZES PROPERTY STRINGS ${LAMMPS_SIZES_VALUES}) validate_option(LAMMPS_SIZES LAMMPS_SIZES_VALUES) string(TOUPPER ${LAMMPS_SIZES} LAMMPS_SIZES) diff --git a/cmake/Modules/LAMMPSInterfacePlugin.cmake b/cmake/Modules/LAMMPSInterfacePlugin.cmake index fcaf604778..5b7444f62c 100644 --- a/cmake/Modules/LAMMPSInterfacePlugin.cmake +++ b/cmake/Modules/LAMMPSInterfacePlugin.cmake @@ -260,8 +260,8 @@ endif() ################ # integer size selection -set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallsmall: all 32-bit, smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)") -set(LAMMPS_SIZES_VALUES smallbig bigbig smallsmall) +set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)") +set(LAMMPS_SIZES_VALUES smallbig bigbig) set_property(CACHE LAMMPS_SIZES PROPERTY STRINGS ${LAMMPS_SIZES_VALUES}) validate_option(LAMMPS_SIZES LAMMPS_SIZES_VALUES) string(TOUPPER ${LAMMPS_SIZES} LAMMPS_SIZES) diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index f57407f9c1..ca64ffbe2e 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -255,11 +255,10 @@ Traditional make Before building LAMMPS, you must build the GPU library in ``lib/gpu``\ . You can do this manually if you prefer; follow the instructions in -``lib/gpu/README``. Note that the GPU library uses MPI calls, so you must -use the same MPI library (or the STUBS library) settings as the main -LAMMPS code. This also applies to the ``-DLAMMPS_BIGBIG``\ , -``-DLAMMPS_SMALLBIG``\ , or ``-DLAMMPS_SMALLSMALL`` settings in whichever -Makefile you use. +``lib/gpu/README``. Note that the GPU library uses MPI calls, so you +must use the same MPI library (or the STUBS library) settings as the +main LAMMPS code. This also applies to the ``-DLAMMPS_BIGBIG`` or +``-DLAMMPS_SMALLBIG`` settings in whichever Makefile you use. You can also build the library in one step from the ``lammps/src`` dir, using a command like these, which simply invokes the ``lib/gpu/Install.py`` diff --git a/doc/src/Build_settings.rst b/doc/src/Build_settings.rst index fb3ebf4b48..7717618f12 100644 --- a/doc/src/Build_settings.rst +++ b/doc/src/Build_settings.rst @@ -315,7 +315,7 @@ large counters can become before "rolling over". The default setting of .. code-block:: bash - -D LAMMPS_SIZES=value # smallbig (default) or bigbig or smallsmall + -D LAMMPS_SIZES=value # smallbig (default) or bigbig If the variable is not set explicitly, "smallbig" is used. @@ -326,7 +326,7 @@ large counters can become before "rolling over". The default setting of .. code-block:: make - LMP_INC = -DLAMMPS_SMALLBIG # or -DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL + LMP_INC = -DLAMMPS_SMALLBIG # or -DLAMMPS_BIGBIG The default setting is ``-DLAMMPS_SMALLBIG`` if nothing is specified @@ -335,34 +335,27 @@ LAMMPS system size restrictions .. list-table:: :header-rows: 1 - :widths: 18 27 28 27 + :widths: 27 36 37 :align: center * - - smallbig - bigbig - - smallsmall * - Total atom count - :math:`2^{63}` atoms (= :math:`9.223 \cdot 10^{18}`) - :math:`2^{63}` atoms (= :math:`9.223 \cdot 10^{18}`) - - :math:`2^{31}` atoms (= :math:`2.147 \cdot 10^9`) * - Total timesteps - :math:`2^{63}` steps (= :math:`9.223 \cdot 10^{18}`) - :math:`2^{63}` steps (= :math:`9.223 \cdot 10^{18}`) - - :math:`2^{31}` steps (= :math:`2.147 \cdot 10^9`) * - Atom ID values - :math:`1 \le i \le 2^{31} (= 2.147 \cdot 10^9)` - :math:`1 \le i \le 2^{63} (= 9.223 \cdot 10^{18})` - - :math:`1 \le i \le 2^{31} (= 2.147 \cdot 10^9)` * - Image flag values - :math:`-512 \le i \le 511` - :math:`- 1\,048\,576 \le i \le 1\,048\,575` - - :math:`-512 \le i \le 511` The "bigbig" setting increases the size of image flags and atom IDs over -"smallbig" and the "smallsmall" setting is only needed if your machine -does not support 64-bit integers or incurs performance penalties when -using them. +the default "smallbig" setting. These are limits for the core of the LAMMPS code, specific features or some styles may impose additional limits. The :ref:`ATC diff --git a/doc/src/Errors_messages.rst b/doc/src/Errors_messages.rst index bfc395067a..7be94f6fb3 100644 --- a/doc/src/Errors_messages.rst +++ b/doc/src/Errors_messages.rst @@ -6233,8 +6233,9 @@ Doc page with :doc:`WARNING messages ` Atom IDs must be positive integers. *One or more atom IDs is too big* - The limit on atom IDs is set by the SMALLBIG, BIGBIG, SMALLSMALL - setting in your LAMMPS build. See the :doc:`Build settings ` page for more info. + The limit on atom IDs is set by the SMALLBIG, BIGBIG + setting in your LAMMPS build. See the + :doc:`Build settings ` page for more info. *One or more atom IDs is zero* Either all atoms IDs must be zero or none of them. diff --git a/doc/src/Fortran.rst b/doc/src/Fortran.rst index ea0ade5cf4..0a8434f63d 100644 --- a/doc/src/Fortran.rst +++ b/doc/src/Fortran.rst @@ -2773,8 +2773,7 @@ Procedures Bound to the :f:type:`lammps` Derived Type END SUBROUTINE external_callback END INTERFACE - where ``c_bigint`` is ``c_int`` if ``-DLAMMPS_SMALLSMALL`` was used and - ``c_int64_t`` otherwise; and ``c_tagint`` is ``c_int64_t`` if + where ``c_bigint`` is ``c_int64_t`` and ``c_tagint`` is ``c_int64_t`` if ``-DLAMMPS_BIGBIG`` was used and ``c_int`` otherwise. The argument *caller* to :f:subr:`set_fix_external_callback` is unlimited diff --git a/doc/src/Library_add.rst b/doc/src/Library_add.rst index 8777ebbcad..e955422984 100644 --- a/doc/src/Library_add.rst +++ b/doc/src/Library_add.rst @@ -19,9 +19,9 @@ there are now a few requirements for including new changes or extensions. be added. - New features should also be implemented and documented not just for the C interface, but also the Python and Fortran interfaces. - - All additions should work and be compatible with ``-DLAMMPS_BIGBIG``, - ``-DLAMMPS_SMALLBIG``, ``-DLAMMPS_SMALLSMALL`` as well as when - compiling with and without MPI support. + - All additions should work and be compatible with + ``-DLAMMPS_BIGBIG``, ``-DLAMMPS_SMALLBIG`` as well as when compiling + with and without MPI support. - The ``library.h`` file should be kept compatible to C code at a level similar to C89. Its interfaces may not reference any custom data types (e.g. ``bigint``, ``tagint``, and so on) that diff --git a/fortran/lammps.f90 b/fortran/lammps.f90 index 2cfd4422b0..9922fd1f2d 100644 --- a/fortran/lammps.f90 +++ b/fortran/lammps.f90 @@ -334,14 +334,6 @@ MODULE LIBLAMMPS ! Interface templates for fix external callbacks ABSTRACT INTERFACE - SUBROUTINE external_callback_smallsmall(caller, timestep, ids, x, fexternal) - IMPORT :: c_int, c_double - CLASS(*), INTENT(INOUT) :: caller - INTEGER(c_int), INTENT(IN) :: timestep - INTEGER(c_int), DIMENSION(:), INTENT(IN) :: ids - REAL(c_double), DIMENSION(:,:), INTENT(IN) :: x - REAL(c_double), DIMENSION(:,:), INTENT(OUT) :: fexternal - END SUBROUTINE external_callback_smallsmall SUBROUTINE external_callback_smallbig(caller, timestep, ids, x, fexternal) IMPORT :: c_int, c_double, c_int64_t CLASS(*), INTENT(INOUT) :: caller @@ -363,8 +355,6 @@ MODULE LIBLAMMPS ! Derived type for fix external callback data TYPE fix_external_data CHARACTER(LEN=:), ALLOCATABLE :: id - PROCEDURE(external_callback_smallsmall), NOPASS, POINTER :: & - callback_smallsmall => NULL() PROCEDURE(external_callback_smallbig), NOPASS, POINTER :: & callback_smallbig => NULL() PROCEDURE(external_callback_bigbig), NOPASS, POINTER :: & @@ -2262,7 +2252,7 @@ CONTAINS CALL lammps_free(Cname) END SUBROUTINE lmp_scatter_atoms_subset_double - ! equivalent function to lammps_gather_bonds (LAMMPS_SMALLSMALL or SMALLBIG) + ! equivalent function to lammps_gather_bonds (LAMMPS_SMALLBIG) SUBROUTINE lmp_gather_bonds_small(self, data) CLASS(lammps), INTENT(IN) :: self INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET, INTENT(OUT) :: data @@ -2304,7 +2294,7 @@ CONTAINS CALL lammps_gather_bonds(self%handle, Cdata) END SUBROUTINE lmp_gather_bonds_big - ! equivalent function to lammps_gather_angles (LAMMPS_SMALLSMALL or SMALLBIG) + ! equivalent function to lammps_gather_angles (LAMMPS_SMALLBIG) SUBROUTINE lmp_gather_angles_small(self, data) CLASS(lammps), INTENT(IN) :: self INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET, INTENT(OUT) :: data @@ -2346,7 +2336,7 @@ CONTAINS CALL lammps_gather_angles(self%handle, Cdata) END SUBROUTINE lmp_gather_angles_big - ! equivalent function to lammps_gather_dihedrals (LAMMPS_SMALLSMALL or SMALLBIG) + ! equivalent function to lammps_gather_dihedrals (LAMMPS_SMALLBIG) SUBROUTINE lmp_gather_dihedrals_small(self, data) CLASS(lammps), INTENT(IN) :: self INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET, INTENT(OUT) :: data @@ -2388,7 +2378,7 @@ CONTAINS CALL lammps_gather_dihedrals(self%handle, Cdata) END SUBROUTINE lmp_gather_dihedrals_big - ! equivalent function to lammps_gather_impropers (LAMMPS_SMALLSMALL or SMALLBIG) + ! equivalent function to lammps_gather_impropers (LAMMPS_SMALLBIG) SUBROUTINE lmp_gather_impropers_small(self, data) CLASS(lammps), INTENT(IN) :: self INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET, INTENT(OUT) :: data @@ -2763,7 +2753,7 @@ CONTAINS IF (tagint_size /= 4_c_int .AND. (PRESENT(id) .OR. PRESENT(image))) THEN CALL lmp_error(self, LMP_ERROR_ALL + LMP_ERROR_WORLD, & 'Unable to create_atoms; your id/image array types are incompatible& - & with LAMMPS_SMALLBIG and LAMMPS_SMALLSMALL [Fortran/create_atoms]') + & with LAMMPS_SMALLBIG [Fortran/create_atoms]') END IF n = SIZE(type, KIND=c_int) IF (PRESENT(bexpand)) THEN @@ -3360,7 +3350,7 @@ CONTAINS construct_fix_external_data%id = ' ' END FUNCTION construct_fix_external_data - ! equivalent function to lammps_set_fix_external_callback for -DSMALLSMALL + ! equivalent function to lammps_set_fix_external_callback ! note that "caller" is wrapped into a fix_external_data derived type along ! with the fix id and the Fortran calling function. SUBROUTINE lmp_set_fix_external_callback(self, id, callback, caller) @@ -3394,11 +3384,7 @@ CONTAINS ext_data(this_fix)%id = id ext_data(this_fix)%lammps_instance => self - IF (SIZE_TAGINT == 4_c_int .AND. SIZE_BIGINT == 4_c_int) THEN - ! -DSMALLSMALL - c_callback = C_FUNLOC(callback_wrapper_smallsmall) - CALL set_fix_external_callback_smallsmall(this_fix, callback) - ELSE IF (SIZE_TAGINT == 8_c_int .AND. SIZE_BIGINT == 8_c_int) THEN + IF (SIZE_TAGINT == 8_c_int .AND. SIZE_BIGINT == 8_c_int) THEN ! -DBIGBIG c_callback = C_FUNLOC(callback_wrapper_bigbig) CALL set_fix_external_callback_bigbig(this_fix, callback) @@ -3420,12 +3406,6 @@ CONTAINS END SUBROUTINE lmp_set_fix_external_callback ! Wrappers to assign callback pointers with explicit interfaces - SUBROUTINE set_fix_external_callback_smallsmall(id, callback) - INTEGER, INTENT(IN) :: id - PROCEDURE(external_callback_smallsmall) :: callback - - ext_data(id)%callback_smallsmall => callback - END SUBROUTINE set_fix_external_callback_smallsmall SUBROUTINE set_fix_external_callback_smallbig(id, callback) INTEGER, INTENT(IN) :: id @@ -3450,9 +3430,7 @@ CONTAINS DO i = 1, SIZE(ext_data) - 1 c_id = f2c_string(ext_data(i)%id) c_caller = C_LOC(ext_data(i)) - IF (SIZE_TAGINT == 4_c_int .AND. SIZE_BIGINT == 4_c_int) THEN - c_callback = C_FUNLOC(callback_wrapper_smallsmall) - ELSE IF (SIZE_TAGINT == 8_c_int .AND. SIZE_BIGINT == 8_c_int) THEN + IF (SIZE_TAGINT == 8_c_int .AND. SIZE_BIGINT == 8_c_int) THEN c_callback = C_FUNLOC(callback_wrapper_bigbig) ELSE c_callback = C_FUNLOC(callback_wrapper_smallbig) @@ -3464,34 +3442,6 @@ CONTAINS END SUBROUTINE rebind_external_callback_data ! companions to lmp_set_fix_external_callback to change interface - SUBROUTINE callback_wrapper_smallsmall(caller, timestep, nlocal, ids, x, & - fexternal) BIND(C) - TYPE(c_ptr), INTENT(IN), VALUE :: caller - INTEGER(c_int), INTENT(IN), VALUE :: timestep - INTEGER(c_int), INTENT(IN), VALUE :: nlocal - TYPE(c_ptr), INTENT(IN), VALUE :: ids, x, fexternal - TYPE(c_ptr), DIMENSION(:), POINTER :: x0, f0 - INTEGER(c_int), DIMENSION(:), POINTER :: f_ids => NULL() - REAL(c_double), DIMENSION(:,:), POINTER :: f_x => NULL(), & - f_fexternal => NULL() - TYPE(fix_external_data), POINTER :: f_caller => NULL() - - CALL C_F_POINTER(ids, f_ids, [nlocal]) - CALL C_F_POINTER(x, x0, [nlocal]) - CALL C_F_POINTER(x0(1), f_x, [3, nlocal]) - CALL C_F_POINTER(fexternal, f0, [nlocal]) - CALL C_F_POINTER(f0(1), f_fexternal, [3, nlocal]) - IF (C_ASSOCIATED(caller)) THEN - CALL C_F_POINTER(caller, f_caller) - CALL f_caller%callback_smallsmall(f_caller%caller, timestep, f_ids, & - f_x, f_fexternal) - ELSE - CALL lmp_error(f_caller%lammps_instance, & - LMP_ERROR_ALL + LMP_ERROR_WORLD, & - 'Got null pointer from "caller"; this should never happen;& - & please report a bug') - END IF - END SUBROUTINE callback_wrapper_smallsmall SUBROUTINE callback_wrapper_smallbig(caller, timestep, nlocal, ids, x, & fexternal) BIND(C) diff --git a/src/info.cpp b/src/info.cpp index 17b1f417ea..072ec97899 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -304,8 +304,6 @@ void Info::command(int narg, char **arg) fputs("-DLAMMPS_BIGBIG\n",out); #elif defined(LAMMPS_SMALLBIG) fputs("-DLAMMPS_SMALLBIG\n",out); -#else // defined(LAMMPS_SMALLSMALL) - fputs("-DLAMMPS_SMALLSMALL\n",out); #endif if (has_gzip_support()) utils::print(out,"\n{}\n",platform::compress_info()); diff --git a/src/lammps.cpp b/src/lammps.cpp index cecad6e870..9d2e755f77 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -688,11 +688,6 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) : sizeof(tagint) != 8 || sizeof(bigint) != 8) error->all(FLERR,"Small to big integers are not sized correctly"); #endif -#ifdef LAMMPS_SMALLSMALL - if (sizeof(smallint) != 4 || sizeof(imageint) != 4 || - sizeof(tagint) != 4 || sizeof(bigint) != 4) - error->all(FLERR,"Small to big integers are not sized correctly"); -#endif // create Kokkos class if KOKKOS installed, unless explicitly switched off // instantiation creates dummy Kokkos class if KOKKOS is not installed @@ -1481,8 +1476,6 @@ void LAMMPS::print_config(FILE *fp) fputs("-DLAMMPS_BIGBIG\n",fp); #elif defined(LAMMPS_SMALLBIG) fputs("-DLAMMPS_SMALLBIG\n",fp); -#else // defined(LAMMPS_SMALLSMALL) - fputs("-DLAMMPS_SMALLSMALL\n",fp); #endif utils::print(fp,"sizeof(smallint): {}-bit\n" diff --git a/src/library.h b/src/library.h index 99b251ee85..6f1c21d748 100644 --- a/src/library.h +++ b/src/library.h @@ -24,7 +24,7 @@ /* We follow the behavior of regular LAMMPS compilation and assume * -DLAMMPS_SMALLBIG when no define is set. */ -#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) && !defined(LAMMPS_SMALLSMALL) +#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) #define LAMMPS_SMALLBIG #endif diff --git a/src/lmptype.h b/src/lmptype.h index ec2cd3f7e9..8927de429c 100644 --- a/src/lmptype.h +++ b/src/lmptype.h @@ -80,10 +80,16 @@ static constexpr uint32_t MEMCPYMASK = (static_cast(1) << 31) - 1U; // default to 32-bit smallint and other ints, 64-bit bigint -#if !defined(LAMMPS_SMALLSMALL) && !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) +#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) #define LAMMPS_SMALLBIG #endif +// we no longer support LAMMPS_SMALLSMALL + +#if defined(LAMMPS_SMALLSMALL) +#error LAMMPS no longer supports -DLAMMPS_SMALLSMALL +#endif + // allow user override of LONGLONG to LONG, necessary for some machines/MPI #ifdef LAMMPS_LONGLONG_TO_LONG @@ -162,40 +168,6 @@ typedef int64_t bigint; #endif -// for machines that do not support 64-bit ints -// 32-bit smallint/imageint/tagint/bigint - -#ifdef LAMMPS_SMALLSMALL - -typedef int smallint; -typedef int imageint; -typedef int tagint; -typedef int bigint; - -#define MAXSMALLINT INT_MAX -#define MAXTAGINT INT_MAX -#define MAXBIGINT INT_MAX -#define MAXDOUBLEINT INT_MAX - -#define MPI_LMP_TAGINT MPI_INT -#define MPI_LMP_IMAGEINT MPI_INT -#define MPI_LMP_BIGINT MPI_INT - -#define TAGINT_FORMAT "%d" -#define BIGINT_FORMAT "%d" - -#define LAMMPS_TAGINT LAMMPS_INT -#define LAMMPS_TAGINT_2D LAMMPS_INT_2D -#define LAMMPS_BIGINT LAMMPS_INT -#define LAMMPS_BIGINT_2D LAMMPS_INT_2D - -#define IMGMASK 1023 -#define IMGMAX 512 -#define IMGBITS 10 -#define IMG2BITS 20 - -#endif - /** Data structure for packing 32-bit and 64-bit integers * into double (communication) buffers * From 557d279774a9f87eec6471b561adc3b42b48ac08 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Mar 2025 16:31:09 -0400 Subject: [PATCH 2/4] remove references to SMALLSMALL from examples --- examples/COUPLE/plugin/liblammpsplugin.h | 4 +--- examples/plugins/LAMMPSInterfaceCXX.cmake | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/COUPLE/plugin/liblammpsplugin.h b/examples/COUPLE/plugin/liblammpsplugin.h index c765b0adc3..c347dac4c1 100644 --- a/examples/COUPLE/plugin/liblammpsplugin.h +++ b/examples/COUPLE/plugin/liblammpsplugin.h @@ -24,7 +24,7 @@ * Follow the behavior of regular LAMMPS compilation and assume * -DLAMMPS_SMALLBIG when no define is set. */ -#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) && !defined(LAMMPS_SMALLSMALL) +#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) #define LAMMPS_SMALLBIG #endif @@ -100,8 +100,6 @@ extern "C" { #if defined(LAMMPS_BIGBIG) typedef void (*FixExternalFnPtr)(void *, int64_t, int, int64_t *, double **, double **); -#elif defined(LAMMPS_SMALLSMALL) -typedef void (*FixExternalFnPtr)(void *, int, int, int *, double **, double **); #else typedef void (*FixExternalFnPtr)(void *, int64_t, int, int *, double **, double **); #endif diff --git a/examples/plugins/LAMMPSInterfaceCXX.cmake b/examples/plugins/LAMMPSInterfaceCXX.cmake index d1f8faec22..4cd4510a61 100644 --- a/examples/plugins/LAMMPSInterfaceCXX.cmake +++ b/examples/plugins/LAMMPSInterfaceCXX.cmake @@ -131,8 +131,8 @@ endif() ################ # integer size selection -set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallsmall: all 32-bit, smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)") -set(LAMMPS_SIZES_VALUES smallbig bigbig smallsmall) +set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)") +set(LAMMPS_SIZES_VALUES smallbig bigbig) set_property(CACHE LAMMPS_SIZES PROPERTY STRINGS ${LAMMPS_SIZES_VALUES}) validate_option(LAMMPS_SIZES LAMMPS_SIZES_VALUES) string(TOUPPER ${LAMMPS_SIZES} LAMMPS_SIZES) From 361914f3f154b1d7f229020f6cdba7265e5e59e4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 14 Mar 2025 16:31:30 -0400 Subject: [PATCH 3/4] remove references to SMALLSMALL from GPU library --- lib/gpu/Makefile.aurora | 4 ++-- lib/gpu/Makefile.cuda | 4 ++-- lib/gpu/Makefile.cuda_mps | 4 ++-- lib/gpu/Makefile.hip | 4 ++-- lib/gpu/Makefile.linux | 4 ++-- lib/gpu/Makefile.linux_multi | 4 ++-- lib/gpu/Makefile.linux_opencl | 4 ++-- lib/gpu/Makefile.oneapi | 4 ++-- lib/gpu/Makefile.oneapi_prof | 4 ++-- lib/gpu/Makefile.serial | 4 ++-- lib/gpu/lal_amoeba.cu | 6 ------ lib/gpu/lal_hippo.cu | 6 ------ lib/gpu/lal_lj_tip4p_long.cu | 6 ------ lib/gpu/lal_neighbor_gpu.cu | 6 ------ lib/gpu/lal_precision.h | 7 +------ lib/gpu/lal_preprocessor.h | 3 +-- 16 files changed, 22 insertions(+), 52 deletions(-) diff --git a/lib/gpu/Makefile.aurora b/lib/gpu/Makefile.aurora index c343e061ee..1f6c9b646a 100644 --- a/lib/gpu/Makefile.aurora +++ b/lib/gpu/Makefile.aurora @@ -11,8 +11,8 @@ EXTRAMAKE = Makefile.lammps.opencl # OCL_TUNE = -DCYPRESS_OCL # -- Uncomment for AMD Cypress OCL_TUNE = -DGENERIC_OCL # -- Uncomment for generic device -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.cuda b/lib/gpu/Makefile.cuda index 75428c9513..d7552d267c 100644 --- a/lib/gpu/Makefile.cuda +++ b/lib/gpu/Makefile.cuda @@ -11,8 +11,8 @@ ifeq ($(CUDA_HOME),) CUDA_HOME = /usr/local/cuda endif -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.cuda_mps b/lib/gpu/Makefile.cuda_mps index 22a34c105c..4063de92e7 100644 --- a/lib/gpu/Makefile.cuda_mps +++ b/lib/gpu/Makefile.cuda_mps @@ -11,8 +11,8 @@ ifeq ($(CUDA_HOME),) CUDA_HOME = /usr/local/cuda endif -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.hip b/lib/gpu/Makefile.hip index 0350c841c4..54085523bf 100644 --- a/lib/gpu/Makefile.hip +++ b/lib/gpu/Makefile.hip @@ -7,8 +7,8 @@ # - change HIP_ARCH for your GPU # ------------------------------------------------------------------------- */ -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.linux b/lib/gpu/Makefile.linux index e02413f3ba..6b7122ea6b 100644 --- a/lib/gpu/Makefile.linux +++ b/lib/gpu/Makefile.linux @@ -51,8 +51,8 @@ CUDA_ARCH = -arch=sm_60 # Hopper hardware #CUDA_ARCH = -arch=sm_90 -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.linux_multi b/lib/gpu/Makefile.linux_multi index e3a76d9934..3fac7030ea 100644 --- a/lib/gpu/Makefile.linux_multi +++ b/lib/gpu/Makefile.linux_multi @@ -51,8 +51,8 @@ CUDA_CODE = -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compu CUDA_ARCH += $(CUDA_CODE) -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.linux_opencl b/lib/gpu/Makefile.linux_opencl index b4b25544ee..1ad4ceba96 100644 --- a/lib/gpu/Makefile.linux_opencl +++ b/lib/gpu/Makefile.linux_opencl @@ -6,8 +6,8 @@ EXTRAMAKE = Makefile.lammps.opencl -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.oneapi b/lib/gpu/Makefile.oneapi index e67f4bb082..79e52482c7 100644 --- a/lib/gpu/Makefile.oneapi +++ b/lib/gpu/Makefile.oneapi @@ -6,8 +6,8 @@ EXTRAMAKE = Makefile.lammps.opencl -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.oneapi_prof b/lib/gpu/Makefile.oneapi_prof index 58a03392e2..160b2f0d33 100644 --- a/lib/gpu/Makefile.oneapi_prof +++ b/lib/gpu/Makefile.oneapi_prof @@ -6,8 +6,8 @@ EXTRAMAKE = Makefile.lammps.opencl -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.serial b/lib/gpu/Makefile.serial index 67d2ce927d..43541ef019 100644 --- a/lib/gpu/Makefile.serial +++ b/lib/gpu/Makefile.serial @@ -45,8 +45,8 @@ CUDA_ARCH = -arch=sm_60 #CUDA_ARCH = -arch=sm_80 #CUDA_ARCH = -arch=sm_86 -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/lal_amoeba.cu b/lib/gpu/lal_amoeba.cu index a92509f06d..14d1d3e5de 100644 --- a/lib/gpu/lal_amoeba.cu +++ b/lib/gpu/lal_amoeba.cu @@ -23,9 +23,6 @@ #include "inttypes.h" #define tagint int64_t #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #ifndef _DOUBLE_DOUBLE _texture( pos_tex,float4); _texture( q_tex,float); @@ -43,9 +40,6 @@ _texture( q_tex,int2); #ifdef LAMMPS_BIGBIG #define tagint long #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #endif // defined(NV_KERNEL) || defined(USE_HIP) diff --git a/lib/gpu/lal_hippo.cu b/lib/gpu/lal_hippo.cu index 01ad8e753a..3ae1e5ff21 100644 --- a/lib/gpu/lal_hippo.cu +++ b/lib/gpu/lal_hippo.cu @@ -23,9 +23,6 @@ #include "inttypes.h" #define tagint int64_t #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #ifndef _DOUBLE_DOUBLE _texture( pos_tex,float4); _texture( q_tex,float); @@ -43,9 +40,6 @@ _texture( q_tex,int2); #ifdef LAMMPS_BIGBIG #define tagint long #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #endif // defined(NV_KERNEL) || defined(USE_HIP) diff --git a/lib/gpu/lal_lj_tip4p_long.cu b/lib/gpu/lal_lj_tip4p_long.cu index 26ceb38538..46a47d7710 100644 --- a/lib/gpu/lal_lj_tip4p_long.cu +++ b/lib/gpu/lal_lj_tip4p_long.cu @@ -27,9 +27,6 @@ #define tagint int64_t #endif #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #ifndef _DOUBLE_DOUBLE _texture( pos_tex,float4); _texture( q_tex,float); @@ -50,9 +47,6 @@ _texture( q_tex,int2); #define tagint int64_t #endif #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #define pos_tex x_ #define q_tex q_ #endif diff --git a/lib/gpu/lal_neighbor_gpu.cu b/lib/gpu/lal_neighbor_gpu.cu index 7d0941ccd5..a0fa26b7e4 100644 --- a/lib/gpu/lal_neighbor_gpu.cu +++ b/lib/gpu/lal_neighbor_gpu.cu @@ -28,9 +28,6 @@ #define tagint int64_t #endif #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #ifndef _DOUBLE_DOUBLE _texture( pos_tex,float4); #else @@ -140,9 +137,6 @@ __kernel void kernel_calc_cell_counts(const unsigned *restrict cell_id, #ifdef LAMMPS_BIGBIG #define tagint long #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #endif __kernel void transpose(__global tagint *restrict out, diff --git a/lib/gpu/lal_precision.h b/lib/gpu/lal_precision.h index 85e009e96b..f0df796b49 100644 --- a/lib/gpu/lal_precision.h +++ b/lib/gpu/lal_precision.h @@ -150,8 +150,7 @@ enum{SPHERE_SPHERE,SPHERE_ELLIPSE,ELLIPSE_SPHERE,ELLIPSE_ELLIPSE}; // default to 32-bit smallint and other ints, 64-bit bigint: // same as defined in src/lmptype.h -#if !defined(LAMMPS_SMALLSMALL) && !defined(LAMMPS_BIGBIG) && \ - !defined(LAMMPS_SMALLBIG) +#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) #define LAMMPS_SMALLBIG #endif @@ -164,9 +163,5 @@ typedef int tagint; typedef int64_t tagint; #define OCL_INT_TYPE "-DLAMMPS_BIGBIG" #endif -#ifdef LAMMPS_SMALLSMALL -typedef int tagint; -#define OCL_INT_TYPE "-DLAMMPS_SMALLSMALL" -#endif #endif // LAL_PRECISION_H diff --git a/lib/gpu/lal_preprocessor.h b/lib/gpu/lal_preprocessor.h index 93d6936f38..d7f7c700c5 100644 --- a/lib/gpu/lal_preprocessor.h +++ b/lib/gpu/lal_preprocessor.h @@ -406,7 +406,6 @@ ucl_inline int sbmask15(int j) { return j >> SBBITS15 & 7; }; // default to 32-bit smallint and other ints, 64-bit bigint: // same as defined in src/lmptype.h -#if !defined(LAMMPS_SMALLSMALL) && !defined(LAMMPS_BIGBIG) && \ - !defined(LAMMPS_SMALLBIG) +#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) #define LAMMPS_SMALLBIG #endif From 2c3824bdd0786a515a218b5fe07159bf4117d052 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 15 Mar 2025 02:11:50 -0400 Subject: [PATCH 4/4] update remaining places that used to support -DLAMMPS_SMALLSMALL --- lib/gpu/README | 8 ++++---- tools/binary2txt.cpp | 8 ++------ unittest/c-library/test_library_external.cpp | 5 +---- unittest/c-library/test_library_properties.cpp | 16 ---------------- unittest/fortran/wrap_extract_global.cpp | 18 ------------------ unittest/fortran/wrap_get_thermo.cpp | 4 ---- unittest/fortran/wrap_properties.cpp | 4 ---- unittest/utils/test_lmptype.cpp | 10 ---------- 8 files changed, 7 insertions(+), 66 deletions(-) diff --git a/lib/gpu/README b/lib/gpu/README index b720aa65cb..7cc1aea8fb 100644 --- a/lib/gpu/README +++ b/lib/gpu/README @@ -136,10 +136,10 @@ IMPORTANT: If you re-build the library, e.g. for a different precision Makefile.linux clean, to ensure all previous derived files are removed before the new build is done. -NOTE: The system-specific setting LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG, - or LAMMPS_SMALLSMALL if specified when building LAMMPS (i.e. in - src/MAKE/Makefile.foo) should be consistent with that specified - when building libgpu.a (i.e. by LMP_INC in the lib/gpu/Makefile.bar). +NOTE: The system-specific setting LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG + - if specified when building LAMMPS (i.e. in src/MAKE/Makefile.foo) - + should be consistent with that specified when building libgpu.a (i.e. + by LMP_INC in the lib/gpu/Makefile.bar). ------------------------------------------------------------------------------ diff --git a/tools/binary2txt.cpp b/tools/binary2txt.cpp index 2369057324..2f7eb1e222 100644 --- a/tools/binary2txt.cpp +++ b/tools/binary2txt.cpp @@ -23,7 +23,7 @@ #include // these must match settings in src/lmptype.h which builds LAMMPS with -// -DLAMMPS_SMALLBIG (the default), -DLAMMPS_BIGBIG, or -DLAMMPS_SMALLSMALL +// -DLAMMPS_SMALLBIG (the default) or -DLAMMPS_BIGBIG // you can edit the tools/Makefile to enforce the same setting // for the build of binary2txt, e.g. // g++ -g -DLAMMPS_BIGBIG binarytxt.o -o binary2txt @@ -36,7 +36,7 @@ #define PRId64 "ld" #endif -#if !defined(LAMMPS_SMALLSMALL) && !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) +#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) #define LAMMPS_SMALLBIG #endif @@ -44,10 +44,6 @@ typedef int tagint; typedef int64_t bigint; #define BIGINT_FORMAT "%" PRId64 -#elif defined(LAMMPS_SMALLSMALL) -typedef int tagint; -typedef int bigint; -#define BIGINT_FORMAT "%d" #else /* LAMMPS_BIGBIG */ typedef int64_t tagint; typedef int64_t bigint; diff --git a/unittest/c-library/test_library_external.cpp b/unittest/c-library/test_library_external.cpp index 63ef4eee32..7783893931 100644 --- a/unittest/c-library/test_library_external.cpp +++ b/unittest/c-library/test_library_external.cpp @@ -14,10 +14,7 @@ using ::testing::HasSubstr; using ::testing::StartsWith; extern "C" { -#ifdef LAMMPS_SMALLSMALL -typedef int32_t step_t; -typedef int32_t tag_t; -#elif LAMMPS_SMALLBIG +#if LAMMPS_SMALLBIG using step_t = int64_t; using tag_t = int32_t; #else diff --git a/unittest/c-library/test_library_properties.cpp b/unittest/c-library/test_library_properties.cpp index 1feccf5cb0..3878b13774 100644 --- a/unittest/c-library/test_library_properties.cpp +++ b/unittest/c-library/test_library_properties.cpp @@ -127,15 +127,9 @@ TEST_F(LibraryProperties, thermo) const char *key = (const char *)lammps_last_thermo(lmp, "keyword", 0); EXPECT_THAT(key, StrEq("Step")); ival = *(int *)lammps_last_thermo(lmp, "type", 0); -#if defined(LAMMPS_SMALLSMALL) - EXPECT_EQ(ival, LAMMPS_INT); - ival = *(int *)lammps_last_thermo(lmp, "data", 0); - EXPECT_EQ(ival, 2); -#else EXPECT_EQ(ival, LAMMPS_INT64); bval = *(bigint *)lammps_last_thermo(lmp, "data", 0); EXPECT_EQ(bval, 2); -#endif key = (const char *)lammps_last_thermo(lmp, "keyword", 1); EXPECT_THAT(key, StrEq("Temp")); @@ -253,11 +247,7 @@ TEST_F(LibraryProperties, box) TEST_F(LibraryProperties, setting) { -#if defined(LAMMPS_SMALLSMALL) - EXPECT_EQ(lammps_extract_setting(lmp, "bigint"), 4); -#else EXPECT_EQ(lammps_extract_setting(lmp, "bigint"), 8); -#endif #if defined(LAMMPS_BIGBIG) EXPECT_EQ(lammps_extract_setting(lmp, "tagint"), 8); EXPECT_EQ(lammps_extract_setting(lmp, "imageint"), 8); @@ -375,15 +365,9 @@ TEST_F(LibraryProperties, global) char *c_ptr = (char *)lammps_extract_global(lmp, "units"); EXPECT_THAT(c_ptr, StrEq("real")); -#if defined(LAMMPS_SMALLSMALL) - EXPECT_EQ(lammps_extract_global_datatype(lmp, "ntimestep"), LAMMPS_INT); - int *i_ptr = (int *)lammps_extract_global(lmp, "ntimestep"); - EXPECT_EQ((*i_ptr), 2); -#else EXPECT_EQ(lammps_extract_global_datatype(lmp, "ntimestep"), LAMMPS_INT64); auto *b_ptr = (int64_t *)lammps_extract_global(lmp, "ntimestep"); EXPECT_EQ((*b_ptr), 2); -#endif EXPECT_EQ(lammps_extract_global_datatype(lmp, "dt"), LAMMPS_DOUBLE); auto *d_ptr = (double *)lammps_extract_global(lmp, "dt"); diff --git a/unittest/fortran/wrap_extract_global.cpp b/unittest/fortran/wrap_extract_global.cpp index bf442279a1..eb47b00228 100644 --- a/unittest/fortran/wrap_extract_global.cpp +++ b/unittest/fortran/wrap_extract_global.cpp @@ -85,11 +85,7 @@ TEST_F(LAMMPS_extract_global, units) TEST_F(LAMMPS_extract_global, ntimestep) { f_lammps_setup_extract_global(); -#ifdef LAMMPS_SMALLSMALL - EXPECT_EQ(f_lammps_extract_global_ntimestep(), 0); -#else EXPECT_EQ(f_lammps_extract_global_ntimestep_big(), 0l); -#endif }; TEST_F(LAMMPS_extract_global, dt) @@ -134,17 +130,10 @@ TEST_F(LAMMPS_extract_global, boxprops) TEST_F(LAMMPS_extract_global, atomprops) { f_lammps_setup_extract_global(); -#ifdef LAMMPS_SMALLSMALL - EXPECT_EQ(f_lammps_extract_global_natoms(), 2); - EXPECT_EQ(f_lammps_extract_global_nbonds(), 0); - EXPECT_EQ(f_lammps_extract_global_nangles(), 0); - EXPECT_EQ(f_lammps_extract_global_ndihedrals(), 0); -#else EXPECT_EQ(f_lammps_extract_global_natoms_big(), 2l); EXPECT_EQ(f_lammps_extract_global_nbonds_big(), 0l); EXPECT_EQ(f_lammps_extract_global_nangles_big(), 0l); EXPECT_EQ(f_lammps_extract_global_ndihedrals_big(), 0l); -#endif EXPECT_EQ(f_lammps_extract_global_ntypes(), 1); EXPECT_EQ(f_lammps_extract_global_nlocal(), 2); @@ -163,15 +152,8 @@ TEST_F(LAMMPS_extract_global, fullprops) if (!lammps_has_style(lmp, "atom", "full")) GTEST_SKIP(); // This is not currently the world's most convincing test.... f_lammps_setup_full_extract_global(); -#ifdef LAMMPS_SMALLSMALL - EXPECT_EQ(f_lammps_extract_global_natoms(), 2); - EXPECT_EQ(f_lammps_extract_global_nbonds(), 0); - EXPECT_EQ(f_lammps_extract_global_nangles(), 0); - EXPECT_EQ(f_lammps_extract_global_ndihedrals(), 0); -#else EXPECT_EQ(f_lammps_extract_global_natoms_big(), 2l); EXPECT_EQ(f_lammps_extract_global_nbonds_big(), 0l); EXPECT_EQ(f_lammps_extract_global_nangles_big(), 0l); EXPECT_EQ(f_lammps_extract_global_ndihedrals_big(), 0l); -#endif } diff --git a/unittest/fortran/wrap_get_thermo.cpp b/unittest/fortran/wrap_get_thermo.cpp index 3a2b810858..7ad4319719 100644 --- a/unittest/fortran/wrap_get_thermo.cpp +++ b/unittest/fortran/wrap_get_thermo.cpp @@ -98,11 +98,7 @@ TEST_F(LAMMPS_thermo, last_thermo) thermostr = (char *)f_lammps_last_thermo_string(6); EXPECT_STREQ(thermostr, "Press"); free(thermostr); -#if defined(LAMMPS_SMALLSMALL) - EXPECT_EQ(f_lammps_last_thermo_type(1), multitype::LAMMPS_INT); -#else EXPECT_EQ(f_lammps_last_thermo_type(1), multitype::LAMMPS_INT64); -#endif EXPECT_EQ(f_lammps_last_thermo_int(1), 15); EXPECT_EQ(f_lammps_last_thermo_type(2), multitype::LAMMPS_DOUBLE); EXPECT_EQ(f_lammps_last_thermo_type(3), multitype::LAMMPS_DOUBLE); diff --git a/unittest/fortran/wrap_properties.cpp b/unittest/fortran/wrap_properties.cpp index 49ec134742..7478337fb1 100644 --- a/unittest/fortran/wrap_properties.cpp +++ b/unittest/fortran/wrap_properties.cpp @@ -77,11 +77,7 @@ TEST_F(LAMMPS_properties, get_mpi_comm) TEST_F(LAMMPS_properties, extract_setting) { -#if defined(LAMMPS_SMALLSMALL) - EXPECT_EQ(f_lammps_extract_setting("bigint"), 4); -#else EXPECT_EQ(f_lammps_extract_setting("bigint"), 8); -#endif #if defined(LAMMPS_BIGBIG) EXPECT_EQ(f_lammps_extract_setting("tagint"), 8); EXPECT_EQ(f_lammps_extract_setting("imageint"), 8); diff --git a/unittest/utils/test_lmptype.cpp b/unittest/utils/test_lmptype.cpp index a14f3a2cab..96b1c89c31 100644 --- a/unittest/utils/test_lmptype.cpp +++ b/unittest/utils/test_lmptype.cpp @@ -25,11 +25,7 @@ TEST(Types, ubuf) double buf[3]; double d1 = 0.1; int i1 = -10; -#if defined(LAMMPS_SMALLSMALL) - bigint b1 = 2048; -#else bigint b1 = (1L << 58) + (1L << 50); -#endif buf[0] = d1; buf[1] = ubuf(i1).d; buf[2] = ubuf(b1).d; @@ -58,11 +54,7 @@ TEST(Types, multitype) EXPECT_EQ(m[1].type, multitype::LAMMPS_INT); EXPECT_EQ(m[2].type, multitype::LAMMPS_DOUBLE); -#if defined(LAMMPS_SMALLSMALL) - EXPECT_EQ(m[3].type, multitype::LAMMPS_INT); -#else EXPECT_EQ(m[3].type, multitype::LAMMPS_INT64); -#endif EXPECT_EQ(m[4].type, multitype::LAMMPS_INT); EXPECT_EQ(m[5].type, multitype::LAMMPS_DOUBLE); EXPECT_EQ(m[6].type, multitype::LAMMPS_NONE); @@ -71,9 +63,7 @@ TEST(Types, multitype) EXPECT_EQ(m[1].data.i, i1); EXPECT_EQ(m[2].data.d, d1); -#if !defined(LAMMPS_SMALLSMALL) EXPECT_EQ(m[3].data.b, -((1L << 40) + (1L << 50))); -#endif EXPECT_EQ(m[4].data.i, -1023); EXPECT_EQ(m[5].data.d, -2.225); }