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); }