From 722f00c7f3f60761e9f0198a774a1a8aafa4131d Mon Sep 17 00:00:00 2001 From: khizmax Date: Mon, 30 May 2016 23:01:05 +0300 Subject: [PATCH] Removed old test directory Removed old Makefile-based build scripts --- .gitignore | 3 + build/Makefile | 175 - build/build.sh | 599 -- build/sample/build-freebsd-amd64.sh | 13 - build/sample/build-hpux1123.sh | 19 - build/sample/build-hpux1131.sh | 19 - build/sample/build-linux-amd64.sh | 18 - build/sample/build-linux-ia64.sh | 17 - build/sample/build-linux-ppc64.sh | 17 - build/sample/build-linux-sparc.sh | 14 - build/sample/build-linux-x86.sh | 17 - build/sample/build-mingw-amd64.bat | 14 - build/sample/build-osx-clang-libc++.sh | 16 - build/sample/build-osx-gcc.sh | 16 - build/sample/build-sun-sparc.sh | 21 - projects/source.libcds.mk | 11 - projects/source.test-common.mk | 9 - projects/source.unit.misc.mk | 8 - tests/CMakeLists.txt | 16 - tests/cppunit/cppunit_mini.h | 416 -- tests/cppunit/cppunit_proxy.h | 62 - tests/cppunit/file_reporter.h | 173 - tests/cppunit/test_beans.h | 63 - tests/cppunit/test_main.cpp | 513 -- tests/cppunit/thread.cpp | 153 - tests/cppunit/thread.h | 169 - tests/data/split.pl | 39 - tests/data/test-debug.conf | 296 - tests/data/test-express.conf | 290 - tests/data/test.conf | 288 - tests/data/text.txt | 6611 ----------------- tests/hashing/city.cpp | 630 -- tests/hashing/city.h | 116 - tests/hashing/citycrc.h | 43 - tests/hashing/hash_func.h | 108 - tests/unit/CMakeLists.txt | 17 - tests/unit/_template.cpp | 61 - tests/unit/alloc/hoard_threadtest.cpp | 206 - tests/unit/alloc/larson.cpp | 228 - tests/unit/alloc/linux_scale.cpp | 183 - tests/unit/alloc/michael_allocator.cpp | 36 - tests/unit/alloc/michael_allocator.h | 225 - tests/unit/alloc/random.cpp | 228 - tests/unit/alloc/random_gen.h | 72 - tests/unit/ellen_bintree_update_desc_pool.cpp | 40 - tests/unit/ellen_bintree_update_desc_pool.h | 131 - tests/unit/lock/nolock.h | 44 - tests/unit/lock/spinlock.cpp | 168 - tests/unit/lock/win32_lock.h | 71 - tests/unit/michael_alloc.cpp | 35 - tests/unit/michael_alloc.h | 95 - tests/unit/nonconcurrent_iterator_sequence.h | 166 - tests/unit/print_bronsonavltree_stat.h | 89 - tests/unit/print_cuckoo_stat.h | 117 - tests/unit/print_ellenbintree_stat.h | 78 - tests/unit/print_feldman_hashset_stat.h | 88 - tests/unit/print_mspriorityqueue_stat.h | 54 - tests/unit/print_segmentedqueue_stat.h | 59 - tests/unit/print_skip_list_stat.h | 91 - tests/unit/print_split_list_stat.h | 67 - tests/unit/print_sync_monitor_stat.h | 64 - 61 files changed, 3 insertions(+), 13702 deletions(-) delete mode 100644 build/Makefile delete mode 100644 build/build.sh delete mode 100755 build/sample/build-freebsd-amd64.sh delete mode 100755 build/sample/build-hpux1123.sh delete mode 100755 build/sample/build-hpux1131.sh delete mode 100755 build/sample/build-linux-amd64.sh delete mode 100755 build/sample/build-linux-ia64.sh delete mode 100755 build/sample/build-linux-ppc64.sh delete mode 100755 build/sample/build-linux-sparc.sh delete mode 100755 build/sample/build-linux-x86.sh delete mode 100644 build/sample/build-mingw-amd64.bat delete mode 100755 build/sample/build-osx-clang-libc++.sh delete mode 100755 build/sample/build-osx-gcc.sh delete mode 100755 build/sample/build-sun-sparc.sh delete mode 100644 projects/source.libcds.mk delete mode 100644 projects/source.test-common.mk delete mode 100644 projects/source.unit.misc.mk delete mode 100644 tests/CMakeLists.txt delete mode 100644 tests/cppunit/cppunit_mini.h delete mode 100644 tests/cppunit/cppunit_proxy.h delete mode 100644 tests/cppunit/file_reporter.h delete mode 100644 tests/cppunit/test_beans.h delete mode 100644 tests/cppunit/test_main.cpp delete mode 100644 tests/cppunit/thread.cpp delete mode 100644 tests/cppunit/thread.h delete mode 100644 tests/data/split.pl delete mode 100644 tests/data/test-debug.conf delete mode 100644 tests/data/test-express.conf delete mode 100644 tests/data/test.conf delete mode 100644 tests/data/text.txt delete mode 100644 tests/hashing/city.cpp delete mode 100644 tests/hashing/city.h delete mode 100644 tests/hashing/citycrc.h delete mode 100644 tests/hashing/hash_func.h delete mode 100644 tests/unit/CMakeLists.txt delete mode 100644 tests/unit/_template.cpp delete mode 100644 tests/unit/alloc/hoard_threadtest.cpp delete mode 100644 tests/unit/alloc/larson.cpp delete mode 100644 tests/unit/alloc/linux_scale.cpp delete mode 100644 tests/unit/alloc/michael_allocator.cpp delete mode 100644 tests/unit/alloc/michael_allocator.h delete mode 100644 tests/unit/alloc/random.cpp delete mode 100644 tests/unit/alloc/random_gen.h delete mode 100644 tests/unit/ellen_bintree_update_desc_pool.cpp delete mode 100644 tests/unit/ellen_bintree_update_desc_pool.h delete mode 100644 tests/unit/lock/nolock.h delete mode 100644 tests/unit/lock/spinlock.cpp delete mode 100644 tests/unit/lock/win32_lock.h delete mode 100644 tests/unit/michael_alloc.cpp delete mode 100644 tests/unit/michael_alloc.h delete mode 100644 tests/unit/nonconcurrent_iterator_sequence.h delete mode 100644 tests/unit/print_bronsonavltree_stat.h delete mode 100644 tests/unit/print_cuckoo_stat.h delete mode 100644 tests/unit/print_ellenbintree_stat.h delete mode 100644 tests/unit/print_feldman_hashset_stat.h delete mode 100644 tests/unit/print_mspriorityqueue_stat.h delete mode 100644 tests/unit/print_segmentedqueue_stat.h delete mode 100644 tests/unit/print_skip_list_stat.h delete mode 100644 tests/unit/print_split_list_stat.h delete mode 100644 tests/unit/print_sync_monitor_stat.h diff --git a/.gitignore b/.gitignore index 63d79f25..93cba786 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,6 @@ /test/stress/data/dictionary.txt /projects/Win/vc14/cds.VC.db /todo-2.2.txt +/build/Makefile +/build/build.sh +/build/sample diff --git a/build/Makefile b/build/Makefile deleted file mode 100644 index a0873c55..00000000 --- a/build/Makefile +++ /dev/null @@ -1,175 +0,0 @@ -# Makefile -# - -.PHONY: all -.SUFFIXES:.cpp .c .ro - -# make_distrib.pl substitutes the correct version -VERSION=2.2.0 - -# boost_thread lib used by test application. -# You may change the library name -LD_BOOST_THREAD_LIB=-lboost_thread -lboost_system - -ifeq ($(platform),mingw) - LD_TEST_COMMON_LIBS=-lcds -lrtm - LD_TEST_COMMON_DEBUG_LIBS=-lcds-debug -lrtm - BASE_OPT = -D_REENTRANT -D_FILE_OFFSET_BITS=64 -I.. - # -Wa,--hash-size=2048 - CPP_BUILD_CDS_OPT=-DCDS_BUILD_LIB -else -ifeq ($(platform),darwin) - LD_TEST_COMMON_LIBS=-lcds - LD_TEST_COMMON_DEBUG_LIBS=-lcds-debug -else - LD_TEST_COMMON_LIBS=-lcds -lpthread -lrt - LD_TEST_COMMON_DEBUG_LIBS=-lcds-debug -lpthread -lrt -endif - BASE_OPT = -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_FILE_OFFSET_BITS=64 -I.. - CPP_BUILD_CDS_OPT= -endif - -COMP_OPT = -c $(CFLAGS) $(BASE_OPT) -CPP_COMP_OPT = -MMD -std=c++11 -c $(CXXFLAGS) $(BASE_OPT) - -COMPILER_ROOT = $(shell dirname `dirname \`which $(CXX)\``) - -LD_OPTS = $(LDFLAGS) - - - -#################################### -# cds library - -include ../projects/source.libcds.mk -CDS_OBJS := $(addprefix $(OBJ_PATH)/,$(notdir $(CDS_SOURCES))) -CDS_OBJS := $(CDS_OBJS:%.cpp=%.o) -CDS_OBJS_DEPS := $(CDS_OBJS:%.o=%.d) -CDS_SOURCES := $(CDS_SOURCES:%.cpp=../%.cpp) - -ifeq ($(platform),mingw) - CDS_DEBUG_LIB=libcds-debug.dll - CDS_RELEASE_LIB=libcds.dll -else -ifeq ($(platform),darwin) - CDS_DEBUG_LIB=libcds-debug.dylib - CDS_RELEASE_LIB=libcds.dylib -else - CDS_DEBUG_LIB=libcds-debug.so - CDS_RELEASE_LIB=libcds.so -endif -endif - --include $(CDS_OBJS_DEPS) -$(CDS_OBJS): $(OBJ_PATH)/%.o: ../src/%.cpp - $(CXX) $(CPP_COMP_OPT) $(CPP_BUILD_CDS_OPT) -o $@ $< - -ifeq ($(platform),mingw) -$(CDS_DEBUG_LIB): $(BIN_PATH)/$(CDS_DEBUG_LIB) - -$(BIN_PATH)/$(CDS_DEBUG_LIB) : $(CDS_OBJS) - $(CXX) $(LD_OPTS) -Wl,--out-implib,$(BIN_PATH)/$(CDS_DEBUG_LIB).a $(CDS_OBJS) -o $@ $(LDLIBS) - -$(CDS_RELEASE_LIB) : $(BIN_PATH)/$(CDS_RELEASE_LIB) - -$(BIN_PATH)/$(CDS_RELEASE_LIB) : $(CDS_OBJS) - $(CXX) $(LD_OPTS) $(CDS_OBJS) -Wl,--out-implib,$(BIN_PATH)/$(CDS_RELEASE_LIB).a -o $@ $(LDLIBS) - -debug : $(CDS_DEBUG_LIB) -release : $(CDS_RELEASE_LIB) -else -$(CDS_DEBUG_LIB).$(VERSION) : $(CDS_OBJS) - $(CXX) $(LD_OPTS) $(CDS_PLATFORM_DEBUG_LDFLAGS) $(CDS_OBJS) -o $@ $(LDLIBS) - mv ./$(CDS_DEBUG_LIB).$(VERSION) $(BIN_PATH)/$(CDS_DEBUG_LIB).$(VERSION) - ln -sf $(CDS_DEBUG_LIB).$(VERSION) $(BIN_PATH)/$(CDS_DEBUG_LIB) - -$(CDS_RELEASE_LIB).$(VERSION) : $(CDS_OBJS) - $(CXX) $(LD_OPTS) $(CDS_OBJS) $(CDS_PLATFORM_RELEASE_LDFLAGS) -o $@ $(LDLIBS) - mv ./$(CDS_RELEASE_LIB).$(VERSION) $(BIN_PATH)/$(CDS_RELEASE_LIB).$(VERSION) - ln -sf $(CDS_RELEASE_LIB).$(VERSION) $(BIN_PATH)/$(CDS_RELEASE_LIB) - -debug : $(CDS_DEBUG_LIB).$(VERSION) -release : $(CDS_RELEASE_LIB).$(VERSION) - -endif - -all: debug release - -########################################## -# Make tests - -OBJ_TEST_PATH=$(OBJ_PATH) - -include ../projects/source.test-common.mk -CDS_TESTCOMMON_SOURCES := $(CDS_TESTCOMMON_SOURCES:%.cpp=../%.cpp) -TEST_COMMON_OBJS := $(CDS_TESTCOMMON_SOURCES:%.cpp=%.o) -TEST_COMMON_OBJS_DEPS := $(TEST_COMMON_OBJS:%.o=%.d) - -TEST_COMMONHDR_SRC_DIR=../tests --include $(TEST_COMMON_OBJS_DEPS) -$(TEST_COMMON_OBJS) : %.o : %.cpp - $(CXX) $(CPP_COMP_OPT) -I$(TEST_COMMONHDR_SRC_DIR) $< -o $@ - - -TEST_SRC_DIR=../tests/unit -TEST_DATA_DIR=`pwd`/../tests/data - -CDSUNIT_COMMON_FILE= - -include ../projects/source.unit.misc.mk -CDSUNIT_MISC_SOURCES := $(CDSUNIT_MISC_SOURCES:%.cpp=../%.cpp) -CDSUNIT_MISC_OBJS := $(CDSUNIT_MISC_SOURCES:%.cpp=%.o) - -TEST_OBJ_FILE := $(CDSUNIT_COMMON_FILE) $(CDSUNIT_MISC_OBJS) -TEST_OBJ_FILE_DEPS := $(TEST_OBJ_FILE:%.o=%.d) - --include $(TEST_OBJ_FILE_DEPS) -$(TEST_OBJ_FILE): %.o: %.cpp - $(CXX) $(CPP_COMP_OPT) -I$(TEST_SRC_DIR) -I$(TEST_COMMONHDR_SRC_DIR) $< -o $@ - -CDSUNIT_MISC_EXE=$(BIN_PATH)/cdsu-misc -CDSUNIT_EXE_FILES= $(CDSUNIT_MISC_EXE) - -ifeq ($(platform),mingw) -make_test : $(CDSUNIT_EXE_FILES) - cd $(TEST_DATA_DIR); perl -X split.pl - cp -f $(TEST_DATA_DIR)/test.conf $(TEST_DATA_DIR)/test-debug.conf $(TEST_DATA_DIR)/dictionary.txt $(BIN_PATH) -else -make_test : $(CDSUNIT_EXE_FILES) - cd $(TEST_DATA_DIR); perl -X split.pl - ln -sf $(TEST_DATA_DIR)/test.conf $(TEST_DATA_DIR)/test-debug.conf $(TEST_DATA_DIR)/dictionary.txt $(BIN_PATH) -endif - -$(CDSUNIT_MISC_EXE) : $(CDSUNIT_MISC_OBJS) $(CDSUNIT_COMMON_FILE) $(TEST_COMMON_OBJS) - $(CXX) $(LD_OPTS) -L$(BIN_PATH) $(CDSUNIT_MISC_OBJS) $(CDSUNIT_COMMON_FILE) $(TEST_COMMON_OBJS) -o $@ $(LD_BOOST_THREAD_LIB) $(LD_TEST_COMMON_LIBS) $(LDLIBS) - - -CDSUNIT_MISC_EXE_DBG=$(CDSUNIT_MISC_EXE)-d -CDSUNIT_EXE_DBG_FILES= $(CDSUNIT_MISC_EXE_DBG) - -ifeq ($(platform),mingw) -make_debug_test : $(CDSUNIT_EXE_DBG_FILES) - cd $(TEST_DATA_DIR); perl -X split.pl - cp -f $(TEST_DATA_DIR)/test.conf $(TEST_DATA_DIR)/test-debug.conf $(TEST_DATA_DIR)/dictionary.txt $(BIN_PATH) -else -make_debug_test : $(CDSUNIT_EXE_DBG_FILES) - cd $(TEST_DATA_DIR); perl -X split.pl - ln -sf $(TEST_DATA_DIR)/test.conf $(TEST_DATA_DIR)/test-debug.conf $(TEST_DATA_DIR)/dictionary.txt $(BIN_PATH) -endif - -$(CDSUNIT_MISC_EXE_DBG) : $(CDSUNIT_MISC_OBJS) $(CDSUNIT_COMMON_FILE) $(TEST_COMMON_OBJS) - $(CXX) $(LD_OPTS) -L$(BIN_PATH) $(CDSUNIT_MISC_OBJS) $(CDSUNIT_COMMON_FILE) $(TEST_COMMON_OBJS) -o $@ $(LD_BOOST_THREAD_LIB) $(LD_TEST_COMMON_DEBUG_LIBS) $(LDLIBS) - -test: make_test -test_debug: make_debug_test - -########################################## -# -clean: - rm -f $(OBJ_PATH)/debug/* - rm -f $(OBJ_PATH)/release/* - rm -f $(TEST_COMMON_OBJS) $(TESTHDR_OBJS) $(TESTHDR_OBJS_NO_OFFSETOF_WARN) $(TEST_OBJ_FILE) - rm -f $(TEST_COMMON_OBJS_DEPS) $(TESTHDR_OBJS_DEPS) $(TESTHDR_OBJS_NO_OFFSETOF_WARN_DEPS) $(TEST_OBJ_FILE_DEPS) - rm -f $(BIN_PATH)/libcds* - rm -f $(BIN_PATH)/cdsu-* - diff --git a/build/build.sh b/build/build.sh deleted file mode 100644 index c7e253f1..00000000 --- a/build/build.sh +++ /dev/null @@ -1,599 +0,0 @@ -#!/bin/sh - -# cds library build script -# Maxim Khiszinsky 04.01.2009 - -# The following variables are defined and exported at the end of this script. -# -# LDFLAGS -# CFLAGS -# CXXFLAGS -# CXX -# CC -# BITSTOBUILD - -usage() -{ - echo "Build helper script for one of the supported platforms" - echo "Usage: build.sh \"options\"" - echo " where options may be any of the following:" - echo " -t make target" - echo " -c Possible values are: gcc,clang,icc" - echo " -x (e.g. g++, CC)" - echo " -p Possible values are:" - echo " x86, amd64 (x86_64), sparc, ia64" - echo " -o Possible values are:" - echo " linux, sunos (solaris), hpux, darwin" - echo " -D define" - echo " -b (accepts '64', '32')" - echo " -l " - echo " -z " - echo " -j " - echo " -h (to get help on the above commands)" - echo " --with-boost " - echo " --debug-cxx-options " - echo " --debug-ld-options " - echo " --release-cxx-options " - echo " --release-ld-options " - echo " --clean clean all before building" - echo " --debug-test make unit test in debug mode" - echo " --amd64-use-128bit use 128bit (16byte) CAS on amd64" - echo " --arch-tune march flag (only for x86/amd64), default = native" - echo " --nodefaultlibs - no default libs (pthread, stdc++)" - echo " --optimize-flags - optimization level flags for release target, default -O3" -} - -ERROR_EXIT_CODE=1 - -MAKE=make - -# Set up the default values for each parameter -debug=off # by default debug is off -bitsToBuild=0 # unknown -makejobs=2 -cppcompiler=g++ -ccompiler=gcc -processor_arch=unknown -OS_FAMILY=unknown -ArchFlag=native -ld_nodefaultlibs=off - -BOOST_INCLUDE_PATH= -makeclean=off - -MAKE_DEBUG_TEST=0 -ld_libs="-lpthread -ldl -lstdc++" - -cxx_debug_options= -ld_debug_options= - -cxx_release_options= -ld_release_options= - -cxx_test_release_options= -ls_test_release_options= - -cxx_release_optimization="-fno-strict-aliasing" -cxx_release_optimization_level="-O3" - -amd64_cxx_options= - -OS_VERSION= -TOOLSET_SUFFIX= - -target=test - -while [ $# -gt 0 ] - do - case $1 in - -t) - target=$2 - shift 2 - ;; - -c) - ccompiler=$2 - shift 2 - ;; - -x) - cppcompiler=$2 - shift 2 - ;; - -o) - OS_FAMILY=$2 - shift 2 - ;; - -p) - processor_arch=$2; shift 2 - ;; - -b) - bitsToBuild=$2 - shift 2 - ;; - -l) - linkeroptions="$linkeroptions $2" - shift 2 - ;; - -z) - compileroptions="$compileroptions $2" - shift 2 - ;; - -j) - makejobs=$2 - shift 2 - ;; - -D) - EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -D$2" - shift 2 - ;; - -h) - usage - exit $ERROR_EXIT_CODE;; - - --clean) - makeclean=on - shift - ;; - --with-boost) - BOOST_INCLUDE_PATH=$2 - shift 2 - ;; - --debug-cxx-options) - cxx_debug_options=$2 - shift 2 - ;; - --debug-ld-options) - ld_debug_options=$2 - shift 2 - ;; - --release-cxx-options) - cxx_release_options=$2 - shift 2 - ;; - --optimize-flags) - cxx_release_optimization_level=$2 - shift 2 - ;; - --release-ld-options) - ld_release_options=$2 - shift 2 - ;; - --nodefaultlibs) - ld_libs=" " - shift - ;; - --with-make) - MAKE=$2 - shift 2 - ;; - --platform-suffix) - OS_VERSION=$2 - shift 2 - ;; - --toolset-suffix) - TOOLSET_SUFFIX=$2 - shift 2 - ;; - --debug-test) - MAKE_DEBUG_TEST=1 - if test $target = 'test'; then - target=test_debug - fi - shift 1 - ;; - --amd64-use-128bit) - amd64_cxx_options='-mcx16' - shift 1 - ;; - --arch-tune) - ArchFlag=$2 - shift 2 - ;; - --) - shift; break;; - - *) - echo "unknown option $1" - usage - exit $ERROR_EXIT_CODE;; - esac -done - -cxx_release_optimization="$cxx_release_optimization_level $cxx_release_optimization" - -# Determine compiler -case $ccompiler in - gcc) - if test $cppcompiler = ''; then - cppcompiler=g++ - fi - ;; - clang) - if test $cppcompiler = ''; then - cppcompiler=clang++ - fi - ;; - icc) - if test $cppcompiler = ''; then - cppcompiler=icc - fi - ;; - *) - echo "ERROR: Unknown compiler: $ccompiler" - exit $ERROR_EXIT_CODE - ;; -esac - -# Determine OS family -if test $OS_FAMILY = 'unknown'; then - OS_FAMILY=`uname |tr [A-Z] [a-z]|sed "s/-//"` -fi -case $OS_FAMILY in - hp-ux) - OS_FAMILY=hpux - ;; - solaris) - OS_FAMILY=sunos - ;; - mingw*) - OS_FAMILY=mingw - ;; - linux|sunos|hpux|aix|freebsd|mingw|darwin) - ;; - *) - echo "Warning: Unknown operation system: $OS_FAMILY" - #exit $ERROR_EXIT_CODE - ;; -esac - - -# Determine processor architecture -if test $processor_arch = 'unknown'; then - processor_arch=`uname -m|tr [A-Z] [a-z]` -fi -case $processor_arch in - x86_64) - if test $bitsToBuild = 64; then - processor_arch='amd64' - else - processor_arch='x86' - fi; - ;; - x86|i686) - if test $bitsToBuild = 64; then - processor_arch='amd64' - else - processor_arch='x86' - fi - ;; - sparc64) - processor_arch='sparc' - ;; - amd64|x86|ia64|sparc) - ;; - *) - processor_arch=`uname -p|tr [A-Z] [a-z]` - case $processor_arch in - sparc|powerpc) - ;; - *) - echo "Warning: Unknown processor architecture: $processor_arch" - #exit ${ERROR_EXIT_CODE} - ;; - esac - 1;; -esac - -# Determine compiler flags -case $ccompiler in - gcc|clang) - case $processor_arch in - amd64) - case $OS_FAMILY in - linux|freebsd|darwin) - buildCXXflags="-m64 -fPIC -march=$ArchFlag $amd64_cxx_options" - buildCflags="-m64 -fPIC -march=$ArchFlag $amd64_cxx_options" - buildLDflags="-m64 -fPIC" - buildTestLDflags="-m64 -fPIC" - ;; - mingw) - buildCXXflags="-m64 -march=$ArchFlag $amd64_cxx_options" - buildCflags="-m64 -march=$ArchFlag $amd64_cxx_options" - buildLDflags="-m64" - buildTestLDflags="-m64" - ld_libs="" - ;; - *) - echo "Warning: cannot determine compiler flags for processor $processor_arch, OS $OS_FAMILY, and compiler $ccompiler" - #exit ${ERROR_EXIT_CODE} - ;; - esac - ;; - x86) - case $OS_FAMILY in - linux|freebsd|darwin) - buildCXXflags="-m32 -fPIC -march=$ArchFlag" - buildCflags="-m32 -fPIC -march=$ArchFlag" - buildLDflags="-m32 -fPIC" - buildTestLDflags="-m32 -fPIC" - ;; - mingw) - buildCXXflags="-m32 -march=$ArchFlag" - buildCflags="-m32 -march=$ArchFlag" - buildLDflags="-m32" - buildTestLDflags="-m32" - ld_libs="" - ;; - *) - echo "Warning: cannot determine compiler flags for processor $processor_arch, OS $OS_FAMILY, and compiler $ccompiler" - #exit ${ERROR_EXIT_CODE} - ;; - esac - ;; - ia64) - bitsToBuild=64 - case $OS_FAMILY in - linux|freebsd) - buildCXXflags="-mtune=itanium2 -fPIC" - buildCflags="-mtune=itanium2 -fPIC" - buildLDflags="-mtune=itanium2 -fPIC" - buildTestLDflags="-mtune=itanium2 -fPIC" - ;; - hpux) - buildCXXflags="-mlp64 -mtune=itanium2 -fPIC" - buildCflags="-mlp64 -mtune=itanium2 -fPIC" - buildLDflags="-mlp64 -mtune=itanium2 -fPIC" - buildTestLDflags="-mlp64 -mtune=itanium2 -fPIC" - ;; - *) - echo "Warning: cannot determine compiler flags for processor $processor_arch, OS $OS_FAMILY, and compiler $ccompiler" - #exit ${ERROR_EXIT_CODE} - ;; - esac - ;; - sparc) - bitsToBuild=64 - case $OS_FAMILY in - sunos) - buildCXXflags="-mcpu=v9 -mtune=ultrasparc3 -m64 -fPIC -pthreads" - buildCflags="-mcpu=v9 -mtune=ultrasparc3 -m64 -fPIC -pthreads" - buildLDflags="-mcpu=v9 -mtune=ultrasparc3 -m64 -fPIC -pthreads" - buildTestLDflags="-mcpu=v9 -mtune=ultrasparc3 -m64 -fPIC -pthreads" - cxx_test_release_options="-fPIC" - ld_test_release_options="-fPIC" - ;; - linux) - buildCXXflags="-mcpu=v9 -mtune=ultrasparc3 -m64 -fPIC" - buildCflags="-mcpu=v9 -mtune=ultrasparc3 -m64 -fPIC" - buildLDflags="-mcpu=v9 -mtune=ultrasparc3 -m64 -fPIC" - buildTestLDflags="-mcpu=v9 -mtune=ultrasparc3 -m64 -fPIC" - cxx_test_release_options="-fPIC" - ld_test_release_options="-fPIC" - ;; - *) - echo "Warning: cannot determine compiler flags for processor $processor_arch, OS $OS_FAMILY, and compiler $ccompiler" - #exit ${ERROR_EXIT_CODE} - ;; - esac - ;; - powerpc) - bitsToBuild=64 - case $OS_FAMILY in - aix) - buildCXXflags="-maix64 -pthread -fPIC" - buildCflags="-maix64 -pthread -fPIC" - buildLDflags="-maix64 -pthread -fPIC" - buildTestLDflags="-maix64 -pthread -fPIC" - cxx_test_release_options="-fPIC" - ld_test_release_options="-fPIC" - ;; - *) - echo "Warning: cannot determine compiler flags for processor $processor_arch, OS $OS_FAMILY, and compiler $ccompiler" - #exit ${ERROR_EXIT_CODE} - ;; - esac - ;; - *) - echo "Warning: cannot determine compiler flags for processor $processor_arch and compiler $ccompiler" - #exit ${ERROR_EXIT_CODE} - ;; - esac - - #cppcompiler_version=`$cppcompiler -dumpversion` - #echo compiler version=$cppcompiler $cppcompiler_version - - # Setup target options - # buildCXXflags="-std=gnu++0x $buildCXXflags" - #cxx_debug_options="-D_DEBUG -O0 -g $cxx_debug_options" - #cxx_release_options="-DNDEBUG $cxx_release_optimization $cxx_release_options" - ;; - icc) - case $processor_arch in - amd64) - case $OS_FAMILY in - linux) - buildCXXflags="-fPIC -march=$ArchFlag $amd64_cxx_options" - buildCflags="-fPIC -march=$ArchFlag $amd64_cxx_options" - buildLDflags="-fPIC" - buildTestLDflags="-fPIC" - ;; - *) - echo "Warning: cannot determine compiler flags for processor $processor_arch, OS $OS_FAMILY, and compiler $ccompiler" - #exit ${ERROR_EXIT_CODE} - ;; - esac - ;; - x86) - case $OS_FAMILY in - linux) - buildCXXflags="-fPIC -march=$ArchFlag" - buildCflags="-fPIC -march=$ArchFlag" - buildLDflags="-fPIC" - buildTestLDflags="-fPIC" - ;; - *) - echo "Warning: cannot determine compiler flags for processor $processor_arch, OS $OS_FAMILY, and compiler $ccompiler" - #exit ${ERROR_EXIT_CODE} - ;; - esac - ;; - *) - echo "Warning: cannot determine compiler flags for processor $processor_arch and compiler $ccompiler" - #exit ${ERROR_EXIT_CODE} - ;; - esac - ;; - *) - echo "ERROR: Unknown compiler: $ccompiler" - exit ${ERROR_EXIT_CODE} - ;; -esac - -cppcompiler_version=`$cppcompiler -dumpversion` -echo compiler version=$cppcompiler $cppcompiler_version - -# Setup target options -# buildCXXflags="-std=gnu++0x $buildCXXflags" -cxx_debug_options="-D_DEBUG -O0 -g $cxx_debug_options" -cxx_release_options="-DNDEBUG $cxx_release_optimization $cxx_release_options" - - -if test "x$BOOST_INCLUDE_PATH" != "x"; then - buildCXXflags="$buildCXXflags -I$BOOST_INCLUDE_PATH" -fi - -if test "x$buildTestLDflags" = "x"; then - buildTestLDflags=$buildLDflags -fi - - -EXTRA_CXXFLAGS="$buildCXXflags $EXTRA_CXXFLAGS" -EXTRA_CFLAGS="$buildCflags $EXTRA_CFLAGS" -EXTRA_LDFLAGS="$buildLDflags $EXTRA_LDFLAGS" - -EXTRA_TEST_LDFLAGS="$buildTestLDflags $EXTRA_TEST_LDFLAGS" - - -echo "Building with the following options ..." -echo "Processor: $processor_arch" -echo "Platform: $OS_FAMILY" -echo "C Compiler: $ccompiler" -echo "C++ Compiler: $cppcompiler" -echo "C++ Compiler version: $cppcompiler_version" -echo "Bits to build: $bitsToBuild" -echo "Compile options: $compileroptions $EXTRA_CXXFLAGS" -echo "Link options: $linkeroptions $EXTRA_LDFLAGS" -echo "Link options (for test cds-unit app): $linkeroptions $EXTRA_TEST_LDFLAGS" - -BITSTOBUILD=$bitsToBuild -export BITSTOBUILD - -# -# Set the C compiler and C++ compiler environment variables -# - -CC="$ccompiler" -export CC - -CXX="$cppcompiler" -export CXX - -ROOT_DIR=.. - -GOAL_DIR=$ccompiler$TOOLSET_SUFFIX-$processor_arch-$OS_FAMILY$OS_VERSION-$bitsToBuild -BIN_PATH=$ROOT_DIR/bin/$GOAL_DIR -mkdir -p $BIN_PATH - -OBJ_PATH=$ROOT_DIR/obj/$GOAL_DIR -mkdir -p $OBJ_PATH - -echo PATH=$PATH -echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH -echo BIN_PATH=$BIN_PATH -echo OBJ_PATH=$OBJ_PATH -echo `${CXX} --version | head -1` -echo Build started - -makegoals= -if test $makeclean = 'on'; then - echo Clean all - $MAKE -f Makefile clean platform=$OS_FAMILY BIN_PATH=$BIN_PATH OBJ_PATH=$OBJ_PATH -fi - -echo --------------------------------- -echo Make debug library -#CXXFLAGS="$compileroptions $cxx_debug_options $EXTRA_CXXFLAGS" -#export CXXFLAGS -#CFLAGS="$compileroptions $cxx_debug_options $EXTRA_CFLAGS $debugflag " -#export CFLAGS -#LDFLAGS="$linkeroptions -shared $ld_debug_options $EXTRA_LDFLAGS " -#export LDFLAGS - -mkdir -p $OBJ_PATH/debug - -CXXFLAGS="$compileroptions $cxx_debug_options $EXTRA_CXXFLAGS" \ -CFLAGS="$compileroptions $cxx_debug_options $EXTRA_CFLAGS $debugflag " \ -LDLIBS="$LDLIBS $ld_libs" \ -LDFLAGS="$linkeroptions -shared $ld_debug_options $EXTRA_LDFLAGS " \ -$MAKE -f Makefile \ - platform=$OS_FAMILY \ - BIN_PATH=$BIN_PATH \ - OBJ_PATH=$OBJ_PATH/debug \ - debug \ - || exit $? - -echo --------------------------------- -echo Make release library - -#CXXFLAGS="$compileroptions $cxx_release_options $EXTRA_CXXFLAGS " -#export CXXFLAGS -#CFLAGS="$compileroptions $cxx_release_options $EXTRA_CFLAGS " -#export CFLAGS -#LDFLAGS="$linkeroptions -shared $ld_resease_options $ld_libs $EXTRA_LDFLAGS " -#export LDFLAGS - -mkdir -p $OBJ_PATH/release - -CXXFLAGS="$compileroptions $cxx_release_options $EXTRA_CXXFLAGS " \ -CFLAGS="$compileroptions $cxx_release_options $EXTRA_CFLAGS " \ -LDFLAGS="$linkeroptions -shared $ld_resease_options $EXTRA_LDFLAGS " \ -LDLIBS="$LDLIBS $ld_libs" \ -$MAKE -f Makefile \ - platform=$OS_FAMILY \ - BIN_PATH=$BIN_PATH \ - OBJ_PATH=$OBJ_PATH/release \ - release \ - || exit $? - - -echo --------------------------------- -echo Make tests - -if test $MAKE_DEBUG_TEST = '0'; then - CXXFLAGS="$compileroptions $cxx_release_options $cxx_test_release_options $EXTRA_CXXFLAGS " \ - CFLAGS="$compileroptions $cxx_release_options $EXTRA_CFLAGS " \ - LDFLAGS="$linkeroptions $ld_release_options $ld_test_release_options $EXTRA_TEST_LDFLAGS " \ - LDLIBS="$LDLIBS $ld_libs" \ - $MAKE -f Makefile -j $makejobs \ - platform=$OS_FAMILY \ - BIN_PATH=$BIN_PATH \ - OBJ_PATH=$OBJ_PATH/test \ - $target \ - || exit $? -fi - -echo --------------------------------- -echo Make tests debug - -if test $MAKE_DEBUG_TEST = '1'; then - CXXFLAGS="$compileroptions $cxx_debug_options $cxx_test_release_options $EXTRA_CXXFLAGS " \ - CFLAGS="$compileroptions $cxx_debug_options $EXTRA_CFLAGS " \ - LDFLAGS="$linkeroptions $ld_debug_options $ld_test_release_options $EXTRA_TEST_LDFLAGS " \ - LDLIBS="$LDLIBS $ld_libs" \ - $MAKE -f Makefile -j $makejobs \ - platform=$OS_FAMILY \ - BIN_PATH=$BIN_PATH \ - OBJ_PATH=$OBJ_PATH/test-debug \ - $target \ - || exit $? -fi - diff --git a/build/sample/build-freebsd-amd64.sh b/build/sample/build-freebsd-amd64.sh deleted file mode 100755 index 4fd2c7ee..00000000 --- a/build/sample/build-freebsd-amd64.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -PATH=/usr/local/bin:$PATH -export PATH - -./build.sh \ ---clean \ ---with-make gmake \ ---with-boost /usr/local/include \ --x g++43 \ --z '-std=c++0x -Wall -pedantic' \ --l "-L/usr/local/lib" \ -2>&1 | tee build-freebsd-amd64.log diff --git a/build/sample/build-hpux1123.sh b/build/sample/build-hpux1123.sh deleted file mode 100755 index dde0165c..00000000 --- a/build/sample/build-hpux1123.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -clear - -export BOOST_ROOT=~/boost - -GCC_ROOT=/usr/local/gcc-433 -export PATH=${GCC_ROOT}/bin:${PATH} -export LD_LIBRARY_PATH=${GCC_ROOT}/lib:${LD_LIBRARY_PATH} - -./build.sh -b 64 \ ---clean \ --x 'g++' \ --z '-std=c++0x -Wall -pedantic' \ --l '-L${BOOST_ROOT}/bin/hpux1123-ia64' \ ---with-boost ${BOOST_ROOT} \ ---with-make gmake \ ---platform-suffix 11.23 \ -2>&1 | tee build-hpux11.23-ia64.log - diff --git a/build/sample/build-hpux1131.sh b/build/sample/build-hpux1131.sh deleted file mode 100755 index 386387a5..00000000 --- a/build/sample/build-hpux1131.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -clear - -export BOOST_ROOT=~/boost - -GCC_ROOT=/usr/local/gcc-433 -export PATH=${GCC_ROOT}/bin:${PATH} -export LD_LIBRARY_PATH=${GCC_ROOT}/lib:${LD_LIBRARY_PATH} - -./build.sh -b 64 \ ---clean \ --x 'g++' \ --z '-std=c++0x -Wall -pedantic' \ --l '-L${BOOST_ROOT}/bin/hpux1131-ia64' \ ---with-boost ${BOOST_ROOT} \ ---with-make gmake \ ---platform-suffix 11.31 \ -2>&1 | tee build-hpux11.31-ia64.log - diff --git a/build/sample/build-linux-amd64.sh b/build/sample/build-linux-amd64.sh deleted file mode 100755 index 3d832469..00000000 --- a/build/sample/build-linux-amd64.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -clear - -export BOOST_ROOT=~/boost - -GCC_ROOT=/usr/local/gcc-4.3.3 -export PATH=${GCC_ROOT}/bin:${PATH} -export LD_LIBRARY_PATH=${GCC_ROOT}/lib:${LD_LIBRARY_PATH} - -./build.sh -b 64 \ ---clean \ --x 'g++' \ --z '-std=c++0x -Wall -pedantic' \ --l '-L${BOOST_ROOT}/bin/linux-amd64' \ ---with-boost ${BOOST_ROOT} \ ---amd64-use-128bit \ -2>&1 | tee build-linux-amd64.log - diff --git a/build/sample/build-linux-ia64.sh b/build/sample/build-linux-ia64.sh deleted file mode 100755 index 7ca441ec..00000000 --- a/build/sample/build-linux-ia64.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -clear - -export BOOST_ROOT=~/boost - -GCC_ROOT=/usr/local/gcc-4.3.3 -export PATH=${GCC_ROOT}/bin:${PATH} -export LD_LIBRARY_PATH=${GCC_ROOT}/lib:${LD_LIBRARY_PATH} - -./build.sh -b 64 \ ---clean \ --x 'g++' \ --z '-std=c++0x -Wall -pedantic' \ --l '-L${BOOST_ROOT}/bin/linux-ia64' \ ---with-boost ${BOOST_ROOT} \ -2>&1 | tee build-linux-ia64.log - diff --git a/build/sample/build-linux-ppc64.sh b/build/sample/build-linux-ppc64.sh deleted file mode 100755 index 8e550736..00000000 --- a/build/sample/build-linux-ppc64.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -clear - -export BOOST_ROOT=~/boost/boost_1_57_0 - -GCC_ROOT=/opt/cfarm/release/4.9.2 -export PATH=${GCC_ROOT}/bin:${PATH} -export LD_LIBRARY_PATH=${GCC_ROOT}/lib:${LD_LIBRARY_PATH} - -./build.sh -b 64 -j 8 \ ---clean \ --x 'g++' \ --z '-std=c++0x -Wall -Wextra -pedantic -m64' \ --l '-L${BOOST_ROOT}/stage64/lib' \ ---with-boost ${BOOST_ROOT} \ -2>&1 | tee build-linux-ppc64.log - diff --git a/build/sample/build-linux-sparc.sh b/build/sample/build-linux-sparc.sh deleted file mode 100755 index 084b675d..00000000 --- a/build/sample/build-linux-sparc.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -clear - -BOOST_ROOT=~/boost/boost_1_49_0 -export BOOST_ROOT - -./build.sh -b 64 -j 2 \ --x 'g++' \ --z '-std=c++0x -Wall -pedantic' \ --l '-L/opt/cfarm/release/4.4.1-64/lib64 -L${BOOST_ROOT}/stage64/lib' \ ---with-boost ${BOOST_ROOT} \ -2>&1 | tee build-linux-sparc.log - - diff --git a/build/sample/build-linux-x86.sh b/build/sample/build-linux-x86.sh deleted file mode 100755 index a2e638e6..00000000 --- a/build/sample/build-linux-x86.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -clear - -export BOOST_ROOT=~/boost - -GCC_ROOT=/usr/local/gcc-4.3.3 -export PATH=${GCC_ROOT}/bin:${PATH} -export LD_LIBRARY_PATH=${GCC_ROOT}/lib:${LD_LIBRARY_PATH} - -./build.sh -b 32 \ ---clean \ --x 'g++' \ --z '-std=c++0x -Wall -pedantic' \ --l '-L${BOOST_ROOT}/bin/linux-x86' \ ---with-boost ${BOOST_ROOT} \ -2>&1 | tee build-linux-x86.log - diff --git a/build/sample/build-mingw-amd64.bat b/build/sample/build-mingw-amd64.bat deleted file mode 100644 index 8b11b20e..00000000 --- a/build/sample/build-mingw-amd64.bat +++ /dev/null @@ -1,14 +0,0 @@ - -:: This sample demonstrates how to build libcds in MinGW (http://tdm-gcc.tdragon.net/). -:: Run TDM-GCC console, change dir to libcds build directory and run this batch file -:: -:: BOOST_PATH - environment variable that contains full path to boost root directory -:: for example: set BOOST_PATH=d:\libs\boost_1_56_0 -:: - -set BOOST_PATH=c:/works/libs/boost/boost_1_56_0 - -:: We use -DBOOST_THREAD_USE_LIB flag since static libboost_thread is used - -build.sh -b 64 -x 'g++' -z '-std=c++0x -Wall -Wextra -pedantic -Wno-unused-local-typedefs -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0500' -l "-L%BOOST_PATH%/stage-mingw64/lib" --with-boost "%BOOST_PATH%" --with-make mingw32-make 2>&1 | tee build-mingw-amd64.log - diff --git a/build/sample/build-osx-clang-libc++.sh b/build/sample/build-osx-clang-libc++.sh deleted file mode 100755 index 8c2aad29..00000000 --- a/build/sample/build-osx-clang-libc++.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh - -BOOST_ROOT=~/works/libs/boost_1_55_0 -./build.sh \ - --clean \ - -c clang \ - -x clang \ - -b 64 \ - -z "--std=c++11 -DCDS_USE_LIBCDS_ATOMIC -I/usr/lib/c++/v1 -I$BOOST_ROOT" \ - -l "-L$BOOST_ROOT/stage64-clang/lib -lc++ -lc++abi -lpthread -ldl" \ - --nodefaultlibs \ - --with-boost $BOOST_ROOT \ - --arch-tune core2 \ - 2>&1 |tee build.log - -# -z "--std=c++11 -DCDS_USE_LIBCDS_ATOMIC -I/usr/lib/c++/v1 -I/usr/include -I$BOOST_ROOT" diff --git a/build/sample/build-osx-gcc.sh b/build/sample/build-osx-gcc.sh deleted file mode 100755 index ee0d73d5..00000000 --- a/build/sample/build-osx-gcc.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh - -BOOST_ROOT=~/works/libs/boost_1_55_0 -MACOS_SDK_INCLUDE=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include - -./build.sh \ - --clean \ - -c gcc \ - -x gcc-4.8 \ - -b 64 \ - -z "--std=c++11 -I$BOOST_ROOT -I$MACOS_SDK_INCLUDE" \ - -l "-L$BOOST_ROOT/stage64/lib" \ - --with-boost $BOOST_ROOT \ - --arch-tune core2 \ - 2>&1 |tee build.log - diff --git a/build/sample/build-sun-sparc.sh b/build/sample/build-sun-sparc.sh deleted file mode 100755 index 7fa3f455..00000000 --- a/build/sample/build-sun-sparc.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -clear - -BOOST_ROOT=~/boost -export BOOST_ROOT - -GCC_ROOT=/usr/local/gcc433 -PATH=${GCC_ROOT}/bin:${PATH} -export PATH -LD_LIBRARY_PATH=${GCC_ROOT}/lib:/usr/local/lib/mpfr-2.4.1/lib:/usr/local/lib/gmp-4.2.4/lib:${LD_LIBRARY_PATH} -export LD_LIBRARY_PATH - -./build.sh -b 64 \ ---clean \ --x 'g++' \ --z '-std=c++0x -Wall -pedantic' \ --l '-L${BOOST_ROOT}/bin/sun-sparc64' \ ---with-boost ${BOOST_ROOT} \ -2>&1 | tee build-sun-sparc.log - - diff --git a/projects/source.libcds.mk b/projects/source.libcds.mk deleted file mode 100644 index ba2b1b1f..00000000 --- a/projects/source.libcds.mk +++ /dev/null @@ -1,11 +0,0 @@ -CDS_SOURCES= \ - src/hp_gc.cpp \ - src/init.cpp \ - src/dhp_gc.cpp \ - src/urcu_gp.cpp \ - src/urcu_sh.cpp \ - src/michael_heap.cpp \ - src/topology_hpux.cpp \ - src/topology_linux.cpp \ - src/topology_osx.cpp \ - src/dllmain.cpp diff --git a/projects/source.test-common.mk b/projects/source.test-common.mk deleted file mode 100644 index 5b845ae0..00000000 --- a/projects/source.test-common.mk +++ /dev/null @@ -1,9 +0,0 @@ - -CDS_TESTCOMMON_SOURCES := \ - tests/cppunit/test_main.cpp \ - tests/cppunit/thread.cpp \ - tests/unit/michael_alloc.cpp \ - tests/unit/ellen_bintree_update_desc_pool.cpp \ - tests/hashing/city.cpp - - diff --git a/projects/source.unit.misc.mk b/projects/source.unit.misc.mk deleted file mode 100644 index 7a1508f4..00000000 --- a/projects/source.unit.misc.mk +++ /dev/null @@ -1,8 +0,0 @@ - -CDSUNIT_MISC_SOURCES := \ - tests/unit/alloc/hoard_threadtest.cpp \ - tests/unit/alloc/larson.cpp \ - tests/unit/alloc/linux_scale.cpp \ - tests/unit/alloc/michael_allocator.cpp \ - tests/unit/alloc/random.cpp \ - tests/unit/lock/spinlock.cpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt deleted file mode 100644 index 1a9516e7..00000000 --- a/tests/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -set(TEST_COMMON test-common) - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - -set(SOURCES cppunit/test_main.cpp - cppunit/thread.cpp - unit/michael_alloc.cpp - unit/ellen_bintree_update_desc_pool.cpp - hashing/city.cpp) - -add_library(${TEST_COMMON} OBJECT ${SOURCES}) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/unit) - -#file(GLOB CONF_FILES ${PROJECT_SOURCE_DIR}/tests/data/*.conf) -#file(COPY ${CONF_FILES} DESTINATION ${EXECUTABLE_OUTPUT_PATH}) \ No newline at end of file diff --git a/tests/cppunit/cppunit_mini.h b/tests/cppunit/cppunit_mini.h deleted file mode 100644 index 091a25af..00000000 --- a/tests/cppunit/cppunit_mini.h +++ /dev/null @@ -1,416 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * Copyright (c) 2003, 2004 - * Zdenek Nemec - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* - Partially changed and expanded by Maxim Khiszinsky (cds), 2009 -*/ - -/* $Id$ */ - -#ifndef CDS_CPPUNIT_MPFR_H_ -#define CDS_CPPUNIT_MPFR_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -namespace CppUnitMini -{ - class Reporter { - public: - virtual ~Reporter() {} - virtual void error(const char * /*macroName*/, const char * /*in_macro*/, const char * /*in_file*/, int /*in_line*/) {} - virtual void message( const char * /*msg*/ ) {} - virtual void progress( const char * /*in_className*/, const char * /*in_testName*/, bool /*ignored*/, bool /* explicit */) {} - virtual void end() {} - virtual void printSummary() {} - }; - - struct TestCfg - { - typedef std::map< std::string, std::string > cfg_map; - cfg_map m_Cfg ; // map param_name => value - - template - T get( const std::string& strParamName, T defVal ) const - { - cfg_map::const_iterator it = m_Cfg.find( strParamName ); - if ( it == m_Cfg.end() ) - return defVal ; // param not found -> returns default value - try { - return boost::lexical_cast< T >( it->second ); - } - catch ( boost::bad_lexical_cast& ex ) - { - std::cerr << "bad_lexical_cast encountered while getting parameter " - << strParamName << "=" << it->second - << ": " << ex.what() - << std::endl -; - } - return defVal; - } - - template - T get( const char * pszParamName, T defVal ) const - { - return get( std::string( pszParamName ), defVal ); - } - - int getInt( const char * pszParamName, int nDefVal = 0 ) const { return get( pszParamName, nDefVal ) ; } - unsigned int getUInt( const char * pszParamName, unsigned int nDefVal = 0 ) const { return get( pszParamName, nDefVal ) ; } - long getLong( const char * pszParamName, long nDefVal = 0 ) const { return get( pszParamName, nDefVal ) ; } - unsigned long getULong( const char * pszParamName, unsigned long nDefVal = 0 ) const { return get( pszParamName, nDefVal ) ; } - size_t getSizeT( const char * pszParamName, size_t nDefVal = 0 ) const - { - return static_cast( getULong( pszParamName, static_cast(nDefVal))); - } - - bool getBool( const char * pszParamName, bool bDefVal = false ) const - { - std::string strParamName( pszParamName ); - cfg_map::const_iterator it = m_Cfg.find( strParamName ); - if ( it == m_Cfg.end() ) - return bDefVal ; // param not found -> returns default value - try { - return boost::lexical_cast< int >( it->second ) != 0; - } - catch ( boost::bad_lexical_cast& ex ) - { - std::cerr << "bad_lexical_cast encountered while getting parameter " - << strParamName << "=" << it->second - << ": " << ex.what() - << std::endl; - } - return bDefVal; - } - - }; - - class Config { - std::map< std::string, TestCfg> m_Cfg; - - public: - Config() {} - - void load( const char * fileName ); - - TestCfg& get( const std::string& strTestName ) - { - return m_Cfg[ strTestName ]; - } - }; - - class TestFixture { - public: - virtual ~TestFixture() {} - - //! \brief Set up context before running a test. - virtual void setUp() {} - - //! Clean up after the test run. - virtual void tearDown() {} - }; - - class TestCase : public TestFixture { - public: - TestCase() - { - registerTestCase(this); - } - - void setUp() { m_failed = false; } - static int run(Reporter *in_reporter = 0, const char *in_testName = "", bool invert = false); - int numErrors() { return m_numErrors; } - static void registerTestCase(TestCase *in_testCase); - - static TestCase * current_test() - { - assert( m_pCurTestCase ); - return m_pCurTestCase; - } - - virtual void setUpParams( const TestCfg& /*cfg*/ ) {} - virtual void endTestCase() {} - virtual void myRun(const char * /*in_name*/, bool /*invert*/ = false) {} - - virtual void error(const char *in_macroName, const char *in_macro, const char *in_file, int in_line) { - m_failed = true; - if (m_reporter) { - m_reporter->error(in_macroName, in_macro, in_file, in_line); - } - } - virtual char const * test_name() const = 0; - - static void message(const char *msg) { - if (m_reporter) { - m_reporter->message(msg); - } - } - - bool equalDoubles(double in_expected, double in_real, double in_maxErr) { - double diff = in_expected - in_real; - if (diff < 0.) { - diff = -diff; - } - return diff < in_maxErr; - } - - virtual void progress(const char *in_className, const char *in_functionName, bool ignored, bool explicitTest) { - ++m_numTests; - if (m_reporter) { - m_reporter->progress(in_className, in_functionName, ignored, explicitTest); - } - } - - bool shouldRunThis( const char *in_desiredTest, const char *in_className, const char *in_functionName, - bool invert, bool explicit_test, bool &do_progress ); - - void tearDown() { - print_gc_state(); - if (m_failed) - ++m_numErrors; - m_reporter->end(); - } - - static void print_gc_state(); - - static std::vector const& getTestStrings(); - - template - static void shuffle( RandomIt first, RandomIt last ) - { - std::shuffle( first, last, m_RandomGen ); - } - - static void print_test_list(); - - protected: - static std::vector m_arrStrings ; // array of test strings - - public: - static bool m_bPrintGCState ; // print GC state after each test - static Config m_Cfg; - static std::string m_strTestDataDir; - static bool m_bExactMatch; - - // random shuffle support - static std::random_device m_RandomDevice; - static std::mt19937 m_RandomGen; - - protected: - static int m_numErrors; - static int m_numTests; - - static TestCase * m_pCurTestCase; - - private: - static TestCase *m_root; - TestCase *m_next; - bool m_failed; - - static Reporter *m_reporter; - }; - -} - -#if !defined (CPPUNIT_MINI_HIDE_UNUSED_VARIABLE) -# if defined (_MSC_VER) -# define CPPUNIT_MINI_HIDE_UNUSED_VARIABLE(v) (v); -# else -# define CPPUNIT_MINI_HIDE_UNUSED_VARIABLE(v) -# endif -#endif - -#define CPPUNIT_TEST_SUITE_(X, cfgBranchName) \ - typedef CppUnitMini::TestCase Base; \ - virtual char const * test_name() const { return #X; } \ - virtual void myRun(const char *in_name, bool invert = false) { \ - const char *className = #X; CPPUNIT_MINI_HIDE_UNUSED_VARIABLE(className) \ - bool ignoring = false; CPPUNIT_MINI_HIDE_UNUSED_VARIABLE(ignoring) \ - setUpParams( m_Cfg.get( cfgBranchName )); - -#define CPPUNIT_TEST_SUITE(X) CPPUNIT_TEST_SUITE_(X, #X) - -#if defined CPPUNIT_MINI_USE_EXCEPTIONS -# define CPPUNIT_TEST_BASE(X, Y) \ - { \ - bool do_progress; \ - bool shouldRun = shouldRunThis(in_name, className, #X, invert, Y, do_progress); \ - if (shouldRun || do_progress) { \ - setUp(); \ - progress(className, #X, ignoring || !shouldRun, !ignoring && Y); \ - if (shouldRun && !ignoring) { \ - try { \ - X(); \ - } \ - catch(...) { \ - Base::error("Test Failed: An exception was thrown.", #X, __FILE__, __LINE__); \ - } \ - } \ - tearDown(); \ - } \ - } -#else -# define CPPUNIT_TEST_BASE(X, Y) \ - { \ - bool do_progress; \ - bool shouldRun = shouldRunThis(in_name, className, #X, invert, Y, do_progress); \ - if (shouldRun || do_progress) { \ - setUp(); \ - progress(className, #X, ignoring || !shouldRun, !ignoring && Y); \ - if (shouldRun && !ignoring) \ - X(); \ - tearDown(); \ - } \ - } -#endif - -#define CPPUNIT_TEST(X) CPPUNIT_TEST_BASE(X, false) -#define CPPUNIT_EXPLICIT_TEST(X) CPPUNIT_TEST_BASE(X, true) - -#define CDSUNIT_DECLARE_TEST(X) void X(); - -#define CPPUNIT_IGNORE \ - ignoring = true - -#define CPPUNIT_STOP_IGNORE \ - ignoring = false - -#define CPPUNIT_TEST_SUITE_END() endTestCase(); } -#define CPPUNIT_TEST_SUITE_END_PART() } - -#define CPPUNIT_TEST_SUITE_REGISTRATION_(X, NAME) static X NAME -#define CPPUNIT_TEST_SUITE_REGISTRATION(X) CPPUNIT_TEST_SUITE_REGISTRATION_(X, local) - -#define CPPUNIT_CHECK(X) \ - if (!(X)) { \ - Base::error("CPPUNIT_CHECK", #X, __FILE__, __LINE__); \ - } - -#define CPPUNIT_CHECK_CURRENT(X) \ - if (!(X)) { \ - CppUnitMini::TestCase::current_test()->error("CPPUNIT_CHECK", #X, __FILE__, __LINE__); \ - } - -#define CPPUNIT_CHECK_EX(X, Y) \ - if (!(X)) { \ - std::stringstream st ; \ - st << #X << ": " << Y ; \ - Base::error("CPPUNIT_CHECK", st.str().c_str(), __FILE__, __LINE__); \ - } - -#define CPPUNIT_CHECK_CURRENT_EX(X, Y) \ - if (!(X)) { \ - std::stringstream st ; \ - st << #X << ": " << Y ; \ - CppUnitMini::TestCase::current_test()->error("CPPUNIT_CHECK", st.str().c_str(), __FILE__, __LINE__); \ - } - -#define CPPUNIT_ASSERT(X) \ - if (!(X)) { \ - Base::error("CPPUNIT_ASSERT", #X, __FILE__, __LINE__); \ - return; \ - } - -#define CPPUNIT_ASSERT_CURRENT(X) \ - if (!(X)) { \ - CppUnitMini::TestCase::current_test()->error("CPPUNIT_ASSERT", #X, __FILE__, __LINE__); \ - return; \ - } - - -#define CPPUNIT_ASSERT_EX(A, X) \ - if (!(A)) { \ - std::stringstream st ; \ - st << #A << ": " << X ; \ - Base::error("CPPUNIT_ASSERT", st.str().c_str(), __FILE__, __LINE__); \ - return; \ - } - -#define CPPUNIT_FAIL { \ - Base::error("CPPUNIT_FAIL", "", __FILE__, __LINE__); \ - return; \ - } - -#define CPPUNIT_ASSERT_EQUAL(X, Y) \ - if ((X) != (Y)) { \ - Base::error("CPPUNIT_ASSERT_EQUAL", #X","#Y, __FILE__, __LINE__); \ - return; \ - } - -#define CPPUNIT_ASSERT_DOUBLES_EQUAL(X, Y, Z) \ - if (!equalDoubles((X), (Y), (Z))) { \ - Base::error("CPPUNIT_ASSERT_DOUBLES_EQUAL", #X","#Y","#Z, __FILE__, __LINE__); \ - return; \ - } - -// added by cds -#define CPPUNIT_MSG( X ) \ - { \ - std::stringstream st ; \ - st << X ; \ - if ( !st.str().empty() ) \ - CppUnitMini::TestCase::message( st.str().c_str() ); \ - } - -#define CPPUNIT_MESSAGE(m) CppUnitMini::TestCase::message(m) - -#define CPPUNIT_ASSERT_MSG( A, X ) \ - if ( !(A) ){ \ - std::stringstream st ; \ - st << #A << ": " << X ; \ - error( "CPPUNIT_ASSERT_MSG", st.str().c_str(), __FILE__, __LINE__ ) ; \ - } - -#endif // #ifndef CDS_CPPUNIT_MPFR_H_ diff --git a/tests/cppunit/cppunit_proxy.h b/tests/cppunit/cppunit_proxy.h deleted file mode 100644 index efade93b..00000000 --- a/tests/cppunit/cppunit_proxy.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * Copyright (c) 2003, 2004 - * Zdenek Nemec - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* $Id$ */ - -#ifndef CDS_CPPUNIT_PROXYINTERFACE_H_ -#define CDS_CPPUNIT_PROXYINTERFACE_H_ - -/* - * STLport specific - */ -#if !defined (CPPUNIT_MINI_USE_EXCEPTIONS) && \ - (!defined (STLPORT) || defined (_STLP_USE_EXCEPTIONS)) -# define CPPUNIT_MINI_USE_EXCEPTIONS -#endif - -#include "cppunit/cppunit_mini.h" -#include // for cds::atomicity::empty_item_counter - -#endif // #ifndef CDS_CPPUNIT_PROXYINTERFACE_H_ diff --git a/tests/cppunit/file_reporter.h b/tests/cppunit/file_reporter.h deleted file mode 100644 index c5551c03..00000000 --- a/tests/cppunit/file_reporter.h +++ /dev/null @@ -1,173 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * Copyright (c) 2003, 2004 - * Zdenek Nemec - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* $Id$ */ - -#ifndef CDS_CPPUNIT_MINIFILEREPORTERINTERFACE_H_ -#define CDS_CPPUNIT_MINIFILEREPORTERINTERFACE_H_ - -#include - -#include - -namespace CppUnitMini { - typedef cds::OS::Timer Timer; - // - // CppUnit mini file(stream) reporter - // - class FileReporter : public CppUnitMini::Reporter { - private: - FileReporter(const FileReporter&); - FileReporter& operator=(const FileReporter&); - public: - // reporting to stderr - explicit FileReporter(bool doMonitor = false): - m_numErrors(0), m_numIgnored(0), m_numExplicit(0), m_numTests(0), _myStream(false), - m_failed(false), m_doMonitor(doMonitor) - { _file = stderr; } - - // reporting to the file with the given name - explicit FileReporter(const char* file, bool doMonitor = false): - m_numErrors(0), m_numIgnored(0), m_numExplicit(0), m_numTests(0), _myStream(true), - m_failed(false), m_doMonitor(doMonitor) - { - #ifndef _STLP_USE_SAFE_STRING_FUNCTIONS - _file = fopen(file, "w"); - #else - fopen_s(&_file, file, "w"); - #endif - } - - // reporting to the given file - explicit FileReporter(FILE* stream, bool doMonitor = false): - m_numErrors(0), m_numIgnored(0), m_numExplicit(0), m_numTests(0), _myStream(false), - m_failed(false), m_doMonitor(doMonitor) - { _file = stream; } - - virtual ~FileReporter() { - if (_myStream) - fclose(_file); - else - fflush(_file); - } - - virtual void error(const char *in_macroName, const char *in_macro, const char *in_file, int in_line) { - // Error might be called several times between 2 progress calls, we shouldn't however consider - // that a test failed twice so we simply keep the info that test failed, number of failed tests - // is computed later in end method. - m_failed = true; - fprintf(_file, "\n\n%s(%d) : %s(%s);", in_file, in_line, in_macroName, in_macro); - fflush(_file); - } - - virtual void message( const char *msg ) - { fprintf(_file, "\n\t%s", msg ); fflush(_file); } - - virtual void progress(const char *in_className, const char *in_shortTestName, bool ignored, bool explicitTest) { - if (m_doMonitor) - m_testTimer.reset(); - - ++m_numTests; - m_failed = false; - if (ignored) - ++m_numIgnored; - fprintf(_file, "%s::%s", in_className, in_shortTestName); - if (ignored) { - const char *ignoredReason; - if (explicitTest) { - ++m_numExplicit; - ignoredReason = " EXPLICIT"; - } - else - ignoredReason = " IGNORED"; - - fprintf(_file, "%s", ignoredReason); - } - } - - virtual void end() { - if (m_doMonitor) { - fprintf(_file, " %f msec", m_testTimer.duration()); - } - if (m_failed) { - ++m_numErrors; - } - fprintf(_file, "\n"); - fflush(_file); - } - - virtual void printSummary() { - if (m_numErrors > 0) { - fprintf(_file, "\nThere were errors! %d of %d tests", m_numErrors, m_numTests); - } - else { - fprintf(_file, "\nOK %d tests", m_numTests); - } - - if (m_numIgnored > 0) { - fprintf(_file, ", %d ignored", m_numIgnored); - } - - if (m_numExplicit > 0) { - fprintf(_file, " (%d explicit)", m_numExplicit); - } - - fprintf(_file, "\n\n"); - fflush(_file); - } - private: - int m_numErrors; - int m_numIgnored; - int m_numExplicit; - int m_numTests; - // flag whether we own '_file' and are thus responsible for releasing it in the destructor - bool _myStream; - bool m_failed; - bool m_doMonitor; - Timer m_testTimer; - FILE* _file; - }; -} -#endif // #ifndef CDS_CPPUNIT_MINIFILEREPORTERINTERFACE_H_ diff --git a/tests/cppunit/test_beans.h b/tests/cppunit/test_beans.h deleted file mode 100644 index b326fee9..00000000 --- a/tests/cppunit/test_beans.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDS_CPPUNIT_TEST_BEANS_H -#define CDS_CPPUNIT_TEST_BEANS_H - - -// Forward declarations -namespace cds { - namespace intrusive {} - namespace opt {} -} - -// Including this header is a bad thing for header testing. How to avoid it?.. -#include // for cds::atomicity::empty_item_counter - -namespace test_beans { - template - struct check_item_counter { - bool operator()( size_t nReal, size_t nExpected ) - { - return nReal == nExpected; - } - }; - - template <> - struct check_item_counter - { - bool operator()( size_t nReal, size_t /*nExpected*/ ) - { - return nReal == 0; - } - }; -} // namespace beans - -#endif // #ifndef CDS_CPPUNIT_TEST_BEANS_H diff --git a/tests/cppunit/test_main.cpp b/tests/cppunit/test_main.cpp deleted file mode 100644 index a460a3cb..00000000 --- a/tests/cppunit/test_main.cpp +++ /dev/null @@ -1,513 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * Copyright (c) 2003, 2004 - * Zdenek Nemec - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* -#if defined(_DEBUG) && _MSC_VER == 1500 -# define _CRTDBG_MAP_ALLOC -# include -# include -#endif -*/ - -#include "cppunit/cppunit_proxy.h" -#include "cppunit/file_reporter.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "stdio.h" -#include -#include -#include -#include -#include - -// Visual leak detector (see http://vld.codeplex.com/) -#if defined(CDS_USE_VLD) && CDS_COMPILER == CDS_COMPILER_MSVC -# ifdef _DEBUG -# include -# endif -#endif - - -std::ostream& operator << (std::ostream& s, const cds::gc::hp::GarbageCollector::InternalState& stat) -{ - s << "\nHZP GC internal state:" - << "\n\t HP record allocated=" << stat.nHPRecAllocated - << "\n\t HP records used=" << stat.nHPRecUsed - << "\n\t Total retired ptr count=" << stat.nTotalRetiredPtrCount - << "\n\t Retired ptr in free HP records=" << stat.nRetiredPtrInFreeHPRecs - << "\n\tEvents:" - << "\n\t HPRec allocations=" << stat.evcAllocHPRec - << "\n\t HPRec retire events=" << stat.evcRetireHPRec - << "\n\tnew HPRec allocations from heap=" << stat.evcAllocNewHPRec - << "\n\t HPRec deletions=" << stat.evcDeleteHPRec - << "\n\t Scan call count=" << stat.evcScanCall - << "\n\t HelpScan call count=" << stat.evcHelpScanCall - << "\n\t Scan calls from HelpScan=" << stat.evcScanFromHelpScan - << "\n\t retired object deleting=" << stat.evcDeletedNode - << "\n\t guarded object on Scan=" << stat.evcDeferredNode - << std::endl; - - return s; -} - -namespace CppUnitMini -{ - int TestCase::m_numErrors = 0; - int TestCase::m_numTests = 0; - std::vector TestCase::m_arrStrings; - bool TestCase::m_bPrintGCState = false; - std::string TestCase::m_strTestDataDir("."); - Config TestCase::m_Cfg; - bool TestCase::m_bExactMatch = false; - - // random shuffle support - /*static*/ std::random_device TestCase::m_RandomDevice; - /*static*/ std::mt19937 TestCase::m_RandomGen( TestCase::m_RandomDevice() ); - - TestCase * TestCase::m_pCurTestCase = nullptr; - - TestCase *TestCase::m_root = 0; - Reporter *TestCase::m_reporter = 0; - - void TestCase::registerTestCase(TestCase *in_testCase) { - in_testCase->m_next = m_root; - m_root = in_testCase; - } - - int TestCase::run(Reporter *in_reporter, const char *in_testName, bool invert) - { - TestCase::m_reporter = in_reporter; - - m_numErrors = 0; - m_numTests = 0; - - TestCase *tmp = m_root; - while (tmp != 0) { - m_pCurTestCase = tmp; - try { - tmp->myRun(in_testName, invert); - } catch ( std::exception& ex ) { - in_reporter->message( "EXCEPTION: "); - in_reporter->message( ex.what() ); - } - tmp = tmp->m_next; - } - - return m_numErrors; - } - - bool TestCase::shouldRunThis(const char *in_desiredTest, const char *in_className, const char *in_functionName, - bool invert, bool explicit_test, bool &do_progress) - { - if ((in_desiredTest) && (in_desiredTest[0] != '\0')) { - do_progress = false; - const char *ptr = strstr(in_desiredTest, "::"); - if (ptr) { - bool match; - if ( m_bExactMatch ) { - match = (strncmp( in_desiredTest, in_className, strlen( in_className )) == 0 && in_desiredTest[strlen( in_className )] == ':') - && (strcmp( ptr + 2, in_functionName ) == 0); - } - else { - match = (strncmp( in_desiredTest, in_className, strlen( in_className )) == 0 && in_desiredTest[strlen( in_className )] == ':') - && (strncmp( ptr + 2, in_functionName, strlen( ptr + 2 ) ) == 0); - } - // Invert shall not make explicit test run: - return invert ? (match ? !match : !explicit_test) - : match; - } - bool match = (strcmp(in_desiredTest, in_className) == 0); - do_progress = match; - return !explicit_test && (match == !invert); - } - do_progress = true; - - return !explicit_test; - } - - - void TestCase::print_gc_state() - { - if ( m_bPrintGCState ) { - { - cds::gc::hp::GarbageCollector::InternalState stat; - std::cout << cds::gc::hp::GarbageCollector::instance().getInternalState( stat ) << std::endl; - } - } - } - - void TestCase::print_test_list() - { - TestCase *tmp = m_root; - std::cout << "Test list:\n"; - while (tmp != 0) { - std::cout << "\t" << tmp->test_name() << "\n"; - tmp = tmp->m_next; - } - } - - void Config::load( const char * fileName ) - { - std::ifstream s; - s.open( fileName ); - if ( !s.is_open() ) { - std::cerr << "WARNING: Cannot open test cfg file " << fileName - << "\n\tUse default settings" - << std::endl; - return; - } - - std::cout << "Using test config file: " << fileName << std::endl; - - char buf[ 4096 ]; - - TestCfg * pMap = nullptr; - while ( !s.eof() ) { - s.getline( buf, sizeof(buf)/sizeof(buf[0]) ); - char * pszStr = buf; - // trim left - while ( *pszStr != 0 && (*pszStr == ' ' || *pszStr == '\t' )) ++pszStr; - // trim right - char * pszEnd = strchr( pszStr, 0 ); - if ( pszEnd == pszStr ) // empty srtring - continue; - --pszEnd; - while ( pszEnd != pszStr && (*pszEnd ==' ' || *pszEnd=='\t' || *pszEnd=='\n' || *pszEnd=='\r' )) --pszEnd; - - if ( pszStr == pszEnd ) // empty string - continue; - - pszEnd[1] = 0; - - if ( *pszStr == '#' ) // comment - continue; - - if ( *pszStr == '[' && *pszEnd == ']' ) { // chapter header - *pszEnd = 0; - pMap = &( m_Cfg[ pszStr + 1 ] ); - continue; - } - - if ( !pMap ) - continue; - - char * pszEq = strchr( pszStr, '=' ); - if ( !pszEq ) - continue; - if ( pszEq == pszStr ) - continue; - - pszEnd = pszEq; - while ( pszStr <= --pszEnd && (*pszEnd ==' ' || *pszEnd=='\t' || *pszEnd=='\n' || *pszEnd=='\r') ); - - if ( pszEnd <= pszStr ) - continue; - pszEnd[1] = 0; - pMap->m_Cfg[ pszStr ] = pszEq + 1; - } - s.close(); - } - - std::vector const & TestCase::getTestStrings() - { - if ( m_arrStrings.empty() ) { - std::string strTestDir = m_strTestDataDir; - - std::ifstream fDict; - char bufLine[1024]; - std::cout << "Loading test data " << strTestDir << "/dictionary.txt..." << std::endl; - fDict.open( (strTestDir + "/dictionary.txt").c_str() ); - if ( fDict.is_open() ) { - cds::OS::Timer timer; - std::string str; - fDict >> str ; // number of lines in file - - // Assume that dictionary.txt does not contain doubles. - CppUnitMini::TestCase::m_arrStrings.reserve( atol(str.c_str()) ); - while ( !fDict.eof() ) { - fDict.getline( bufLine, sizeof(bufLine)/sizeof(bufLine[0]) ); - if ( bufLine[0] ) - m_arrStrings.push_back( bufLine ); - } - fDict.close(); - - std::cout << " Duration=" << timer.duration() << " String count " << CppUnitMini::TestCase::m_arrStrings.size() << std::endl; - } - else - std::cout << " Failed, file not found" << std::endl; - - } - return m_arrStrings; - } -} - -static void usage(const char* name) -{ - std::cout << "Usage: " << name << " [options] [-t=[::]] [-x=[::]] [-f=]\n" - "\t[-t=[::]] : test class or class::test to execute\n" - "\t[-d=dir] : test data directory (default is .)\n" - "\t[-f=] : output file\n" - "Options:\n" - "\t-exact-match - class::test should be exactly matched to existing test\n" - "\t-gc_state - print gc state after each test\n" - "\t-cfg= - config file name for tests\n" - "\t-list - list all tests\n" - "\t" - << std::endl; -} - -int main(int argc, char** argv) -{ - -#ifdef CDS_MSVC_MEMORY_LEAKS_DETECTING_ENABLED - _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); -#endif - - // CppUnit(mini) test launcher - // command line option syntax: - // test [Options] - // where Options are - // -t=CLASS[::TEST] run the test class CLASS or member test CLASS::TEST - // -x=CLASS[::TEST] run all except the test class CLASS or member test CLASS::TEST - // -d=dir test data directory (default is .) - // -f=FILE save output in file FILE instead of stdout - // -m monitor test(s) execution - // -gc_state print GC state after test - const char *fileName = 0; - const char *testName = ""; - const char *xtestName = ""; - const char *testDataDir = "."; - const char *cfgFileName = -#ifdef _DEBUG - "test-debug.conf" -#else - "test.conf" -#endif -; - bool doMonitoring = false; - - for (int i = 1; i < argc; ++i) { - if (argv[i][0] == '-') { - if ( strncmp(argv[i], "-t=", 3) == 0 ) { - testName = argv[i]+3; - continue; - } - else if ( strncmp(argv[i], "-f=", 3) == 0 ) { - fileName = argv[i]+3; - continue; - } - else if ( strncmp(argv[i], "-x=", 3) == 0 ) { - xtestName = argv[i]+3; - continue; - } - else if ( strncmp(argv[i], "-d=", 3) == 0 ) { - testDataDir = argv[i] + 3; - continue; - } - else if ( strncmp( argv[i], "-m", 2 ) == 0 ) { - doMonitoring = true; - continue; - } - else if ( strncmp( argv[i], "-exact-match", 12 ) == 0 ) { - CppUnitMini::TestCase::m_bExactMatch = true; - continue; - } - else if (strncmp(argv[i], "-list", 5) == 0) { - CppUnitMini::TestCase::print_test_list(); - return 0; - } - else if ( strncmp(argv[i], "-gc_state", 9) == 0 ) { - CppUnitMini::TestCase::m_bPrintGCState = true; - continue; - } - else if( strncmp(argv[i], "-cfg=", 5) == 0 ) { - cfgFileName = argv[i] + 5; - continue; - } - } - - // invalid option, we display normal usage. - usage(argv[0]); - return 1; - - } - - { - boost::posix_time::ptime cur( boost::posix_time::second_clock::local_time()); - - std::cout << "libcds version " << CDS_VERSION_STRING << "\n"; - std::cout << "Test started " << cur << std::endl; - } - - - CppUnitMini::TestCase::m_strTestDataDir = testDataDir; - - CppUnitMini::Reporter* reporter; - if (fileName != 0) - reporter = new CppUnitMini::FileReporter(fileName, doMonitoring); - else - reporter = new CppUnitMini::FileReporter(stdout, doMonitoring); - - // Load config params - CppUnitMini::TestCase::m_Cfg.load( cfgFileName ); - - // Init CDS runtime - cds::Initialize(); - - int num_errors; - { - size_t nHazardPtrCount = 0; - size_t dhp_liberateThreshold; - size_t dhp_initialThreadGuardCount; - size_t dhp_epochCount; - { - CppUnitMini::TestCfg& cfg = CppUnitMini::TestCase::m_Cfg.get( "General" ); - nHazardPtrCount = cfg.getULong( "hazard_pointer_count", 0 ); - - dhp_liberateThreshold = cfg.getSizeT( "dhp_liberate_threshold", 1024 ); - dhp_initialThreadGuardCount = cfg.getSizeT( "dhp_init_guard_count", 8 ); - dhp_epochCount = cfg.getSizeT( "dhp_epoch_count", 16 ); - } - - // Safe reclamation schemes - cds::gc::HP hzpGC( nHazardPtrCount ); - cds::gc::DHP dhpGC( dhp_liberateThreshold, dhp_initialThreadGuardCount, dhp_epochCount ); - - // RCU varieties - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_gpi; - rcu_gpi gpiRCU; - - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_gpb; - rcu_gpb gpbRCU; - - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_gpt; - rcu_gpt gptRCU; - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_shb; - rcu_shb shbRCU( 256, SIGUSR1 ); - - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_sht; - rcu_sht shtRCU( 256, SIGUSR2 ); -#endif - - // System topology - { - std::cout - << "System topology:\n" - << " Logical processor count: " << std::thread::hardware_concurrency() << "\n"; - std::cout << std::endl; - } - - { - CppUnitMini::TestCfg& cfg = CppUnitMini::TestCase::m_Cfg.get( "General" ); - std::string strHZPScanStrategy = cfg.get( "HZP_scan_strategy", std::string("classic") ); - if ( strHZPScanStrategy == "inplace" ) - hzpGC.setScanType( cds::gc::HP::scan_type::inplace ); - else if ( strHZPScanStrategy == "classic" ) - hzpGC.setScanType( cds::gc::HP::scan_type::classic ); - else { - std::cout << "Error value of HZP_scan_strategy in General section of test config\n"; - } - - switch (hzpGC.getScanType()) { - case cds::gc::HP::scan_type::inplace: - std::cout << "Use in-place scan strategy for Hazard Pointer memory reclamation algorithm\n"; - break; - case cds::gc::HP::scan_type::classic: - std::cout << "Use classic scan strategy for Hazard Pointer memory reclamation algorithm\n"; - break; - default: - std::cout << "ERROR: use unknown scan strategy for Hazard Pointer memory reclamation algorithm\n"; - break; - } - - std::cout << " Hazard Pointer count: " << hzpGC.max_hazard_count() << "\n" - << " Max thread count for HP: " << hzpGC.max_thread_count() << "\n" - << "Retired HP array capacity: " << hzpGC.retired_array_capacity() << "\n"; - } - - if ( CppUnitMini::TestCase::m_bPrintGCState ) { - cds::gc::hp::GarbageCollector::InternalState stat; - cds::gc::hp::GarbageCollector::instance().getInternalState( stat ); - - std::cout << "HP constants:" - << "\n\tHP count per thread=" << stat.nHPCount - << "\n\tMax thread count=" << stat.nMaxThreadCount - << "\n\tMax retired pointer count per thread=" << stat.nMaxRetiredPtrCount - << "\n\tHP record size in bytes=" << stat.nHPRecSize - << "\n" << std::endl; - } - - // Attach main thread to CDS GC - cds::threading::Manager::attachThread(); - - if (xtestName[0] != 0) - num_errors = CppUnitMini::TestCase::run(reporter, xtestName, true); - else - num_errors = CppUnitMini::TestCase::run(reporter, testName); - - // Detach main thread from CDS GC - cds::threading::Manager::detachThread(); - - } - - // Finalize CDS runtime - cds::Terminate(); - - reporter->printSummary(); - delete reporter; - - return num_errors; -} diff --git a/tests/cppunit/thread.cpp b/tests/cppunit/thread.cpp deleted file mode 100644 index 01bc5b67..00000000 --- a/tests/cppunit/thread.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include -#include // TSan annotations -#include "cppunit/thread.h" - -namespace CppUnitMini { - - void TestThread::threadEntryPoint( TestThread * pInst ) - { - pInst->run(); - } - - void TestThread::create() - { - m_pThread = new boost::thread( threadEntryPoint, this ); - } - - void TestThread::run() - { - try { - init(); - m_Pool.onThreadInitDone( this ); - - test(); - m_Pool.onThreadTestDone( this ); - - fini(); - m_Pool.onThreadFiniDone( this ); - } - catch ( std::exception& ex ) - { - m_Pool.m_Test.message( "EXCEPTION in working thread: "); - m_Pool.m_Test.message( ex.what() ); - } - } - - void TestThread::error(const char *in_macroName, const char *in_macro, const char *in_file, int in_line) - { - m_Pool.m_Test.error( in_macroName, in_macro, in_file, in_line ); - } - - - ThreadPool::~ThreadPool() - { - delete m_pBarrierStart; - delete m_pBarrierDone; - - for ( size_t i = 0; i < m_arrThreads.size(); ++i ) - delete m_arrThreads[i]; - m_arrThreads.resize( 0 ); - } - - void ThreadPool::add( TestThread * pThread, size_t nCount ) - { - pThread->m_nThreadNo = m_arrThreads.size(); - m_arrThreads.push_back( pThread ); - while ( --nCount ) { - TestThread * p = pThread->clone(); - if ( p ) { - p->m_nThreadNo = m_arrThreads.size(); - m_arrThreads.push_back( p ); - } - } - } - - void ThreadPool::run() - { - const size_t nThreadCount = m_arrThreads.size(); - m_pBarrierStart = new boost::barrier( (unsigned int) nThreadCount ); - // nThreadCount threads + current thread - m_pBarrierDone = new boost::barrier( (unsigned int) (nThreadCount + 1) ); - - for ( size_t i = 0; i < nThreadCount; ++i ) - m_arrThreads[i]->create(); - - // Wait while all threads is done - m_pBarrierDone->wait(); - std::this_thread::sleep_for(std::chrono::milliseconds(500)); - } - - void ThreadPool::run( unsigned int nDuration ) - { - const size_t nThreadCount = m_arrThreads.size(); - m_pBarrierStart = new boost::barrier( (unsigned int) nThreadCount ); - m_pBarrierDone = new boost::barrier( (unsigned int) (nThreadCount + 1) ); - - for ( size_t i = 0; i < nThreadCount; ++i ) - m_arrThreads[i]->create(); - - auto stEnd(std::chrono::steady_clock::now() + std::chrono::seconds( nDuration )); - do { - std::this_thread::sleep_until( stEnd ); - } while ( std::chrono::steady_clock::now() < stEnd ); - - for ( size_t i = 0; i < nThreadCount; ++i ) - m_arrThreads[i]->stop(); - - // Wait while all threads is done - m_pBarrierDone->wait(); - std::this_thread::sleep_for(std::chrono::milliseconds(500)); - } - - void ThreadPool::onThreadInitDone( TestThread * pThread ) - { - // Calls in context of caller thread - // Wait while all threads started - m_pBarrierStart->wait(); - - pThread->m_Timer.reset(); - } - - void ThreadPool::onThreadTestDone( TestThread * pThread ) - { - // Calls in context of caller thread - pThread->m_nDuration = pThread->m_Timer.duration(); - } - - void ThreadPool::onThreadFiniDone( TestThread * /*pThread*/ ) - { - // Calls in context of caller thread - // Wait while all threads done - m_pBarrierDone->wait(); - } -} diff --git a/tests/cppunit/thread.h b/tests/cppunit/thread.h deleted file mode 100644 index 76fd62e0..00000000 --- a/tests/cppunit/thread.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDS_CPPUNIT_THREAD_H -#define CDS_CPPUNIT_THREAD_H - -#include -#include "cppunit/cppunit_mini.h" -#include -#include -#include // for attach/detach thread -#include - -// Visual leak detector (see http://vld.codeplex.com/) -#if defined(CDS_USE_VLD) && CDS_COMPILER == CDS_COMPILER_MSVC -# ifdef _DEBUG -# include -# endif -#endif - -namespace CppUnitMini { - static inline unsigned int Rand( unsigned int nMax ) - { - double rnd = double( rand() ) / double( RAND_MAX ); - unsigned int n = (unsigned int) (rnd * nMax); - return n < nMax ? n : (n-1); - } - - class ThreadPool; - class TestThread - { - protected: - typedef TestThread Base; - friend class ThreadPool; - - ThreadPool& m_Pool; - boost::thread * m_pThread; - cds::OS::Timer m_Timer; - atomics::atomic m_bTimeElapsed; - - public: - double m_nDuration; - size_t m_nThreadNo; - - protected: - static void threadEntryPoint( TestThread * pThread ); - - TestThread( TestThread& src ) - : m_Pool( src.m_Pool ) - , m_pThread( nullptr ) - , m_bTimeElapsed( false ) - , m_nDuration( 0 ) - , m_nThreadNo( 0 ) - {} - - virtual ~TestThread() - { - if ( m_pThread ) - delete m_pThread; - } - - virtual TestThread * clone() = 0; - - void create(); - void run(); - - virtual void init() {} - virtual void test() = 0; - virtual void fini() {} - void stop() - { - m_bTimeElapsed.store( true, atomics::memory_order_release ); - } - bool time_elapsed() const - { - return m_bTimeElapsed.load( atomics::memory_order_acquire ); - } - - bool check_timeout( size_t nMaxDuration ) - { - return m_Timer.duration() > nMaxDuration; - } - - void error(const char *in_macroName, const char *in_macro, const char *in_file, int in_line); - - public: - TestThread( ThreadPool& pool ) - : m_Pool( pool ) - , m_pThread( nullptr ) - , m_nDuration( 0 ) - , m_nThreadNo( 0 ) - {} - }; - - class ThreadPool - { - public: - TestCase& m_Test; - - private: - typedef std::vector< TestThread * > thread_vector; - - boost::thread_group m_Pool; - thread_vector m_arrThreads; - - boost::barrier * volatile m_pBarrierStart; - boost::barrier * volatile m_pBarrierDone; - - public: - typedef thread_vector::iterator iterator; - - public: - ThreadPool( TestCase& tc ) - : m_Test( tc ) - , m_pBarrierStart( nullptr ) - , m_pBarrierDone( nullptr ) - {} - ~ThreadPool(); - - void add( TestThread * pThread, size_t nCount ); - - void run(); - void run( unsigned int nDuration ); - - void onThreadInitDone( TestThread * pThread ); - void onThreadTestDone( TestThread * pThread ); - void onThreadFiniDone( TestThread * pThread ); - - iterator begin() { return m_arrThreads.begin(); } - iterator end() { return m_arrThreads.end() ; } - - double avgDuration() const - { - double nDur = 0; - for ( size_t i = 0; i < m_arrThreads.size(); ++i ) - nDur += m_arrThreads[i]->m_nDuration; - return nDur / m_arrThreads.size(); - } - }; -} - -#endif // #ifndef CDS_CPPUNIT_THREAD_H diff --git a/tests/data/split.pl b/tests/data/split.pl deleted file mode 100644 index 3d0f4c75..00000000 --- a/tests/data/split.pl +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/perl - -my %words ; - -open( my $f, "text.txt" ) ; -binmode $f ; - -my $text = '' ; -$text .= $_ while (<$f>) ; -close $f ; - -my @a = split /[^\w'-]/, $text ; -foreach my $w (@a) { - $words{$w} += 1 if $w ; -} -for (my $j = 1; $j < 30; ++$j ) { - for ( my $i = 0; $i + $j - 1 < @a; $i += 1 ) { - my $s = ''; - for ( my $k = 0; $k < $j; ++$k ) { - $s .= ' '.$a[$i+$k]; - } - $s =~ /\s*(\S.+\S)\s*/; - $s = $1 ; - $s =~ s/\s\s+/ /g ; - $words{$s} += 1 ; - } -} - -open (my $dst, ">dictionary.txt") ; -binmode $dst ; - -my $nCount = 0 ; -$nCount++ foreach (keys %words) ; -print $dst $nCount, "\n" ; - -print "Generate test dictionary...\n" ; -print $dst $_, "\n" foreach (keys %words) ; - -close $dst ; diff --git a/tests/data/test-debug.conf b/tests/data/test-debug.conf deleted file mode 100644 index 3052e041..00000000 --- a/tests/data/test-debug.conf +++ /dev/null @@ -1,296 +0,0 @@ -[General] -# HZP scan strategy, possible values are "classic", "inplace". Default is "classic" -HZP_scan_strategy=inplace -hazard_pointer_count=72 - -# cds::gc::DHP initialization parameters -dhp_liberate_threshold=1024 -dhp_init_guard_count=8 -dhp_epoch_count=16 - -[Atomic_ST] -iterCount=10000 - -[thread_init_fini] -ThreadCount=4 -PassCount=100000 - -[Allocator_ST] -PassCount=10 -# Total allocation per pass, Megabytes -AllocPerPass=1024 - -[Linux_Scale] -# Allocation count per test -PassCount=1000000 -# Max allocated block size in bytes -MaxBlockSize=65000 -# Max thread count. 0 is processor_count * 2 -MaxThreadCount=0 - -[Hoard_ThreadTest] -MinBlockSize=16 -MaxBlockSize=64 -BlockCount=5000 -PassCount=25 -# Max thread count. 0 is processor_count * 2 -MaxThreadCount=0 - -[Larson] -MinBlockSize=8 -MaxBlockSize=1024 -PassCount=100000 -# Max thread count. 0 is processor_count * 2 -MaxThreadCount=0 - -[Random_Alloc] -DataSize=1000 -MinBlockSize=8 -MaxBlockSize=100000 -PassCount=100000 -# Max thread count. 0 is processor_count * 2 -MaxThreadCount=0 - - -[Spinlock_MT] -ThreadCount=4 -LoopCount=100000 - -[Stack_Push] -ThreadCount=8 -StackSize=100000 -EliminationSize=4 - -[Stack_PushPop] -PushThreadCount=16 -PopThreadCount=16 -StackSize=1600000 -EliminationSize=4 - -[IntrusiveStack_PushPop] -PushThreadCount=16 -PopThreadCount=16 -StackSize=1600000 -EliminationSize=4 -# Flat combining stack parameters -# FCIterate=1 - the test will be run iteratively -# for combine pass count from 1 to FCCombinePassCount -# and compact factor from 1 to FCCompactFactor -# FCIterate=0 - the test runs only once for giving -# FCCombinePassCount and FCCompactFactor -FCIterate=0 -FCCombinePassCount=4 -FCCompactFactor=64 - -[Queue_Push] -ThreadCount=8 -QueueSize=100000 - -[Queue_Pop] -ThreadCount=8 -QueueSize=100000 - -[Queue_ReaderWriter] -ReaderCount=3 -WriterCount=3 -QueueSize=100000 - -[IntrusiveQueue_ReaderWriter] -ReaderCount=3 -WriterCount=3 -QueueSize=100000 - -[Queue_Random] -ThreadCount=4 -QueueSize=500000 - -[BoundedQueue_Fullness] -ThreadCount=4 -QueueSize=1024 -PassCount=100000 - -[PQueue_Push] -ThreadCount=4 -QueueSize=10000 - -[PQueue_PushPop] -PushThreadCount=4 -PopThreadCount=4 -QueueSize=10000 - -[Map_Nonconcurrent_iterator] -MapSize=1000000 - -[Map_Nonconcurrent_iterator_MT] -ThreadCount=4 -MapSize=1000000 - -[Map_find_int] -ThreadCount=2 -MapSize=10000 -PercentExists=50 -PassCount=2 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=256 -CuckooProbesetSize=8 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_find_string] -ThreadCount=2 -MapSize=10000 -PercentExists=50 -PassCount=2 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=256 -CuckooProbesetSize=8 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_InsDel_int] -InsertThreadCount=4 -DeleteThreadCount=4 -ThreadPassCount=8 -MapSize=50000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=256 -CuckooProbesetSize=8 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_InsDel_func] -InsertThreadCount=4 -DeleteThreadCount=4 -UpdateThreadCount=4 -ThreadPassCount=8 -MapSize=5000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=256 -CuckooProbesetSize=8 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_InsDel_Item_int] -ThreadCount=4 -MapSize=10000 -GoalItem=5000 -AttemptCount=1000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=256 -CuckooProbesetSize=8 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_InsDel_string] -InsertThreadCount=4 -DeleteThreadCount=4 -ThreadPassCount=8 -MapSize=10000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=256 -CuckooProbesetSize=8 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_InsDel_Item_string] -ThreadCount=4 -MapSize=10000 -GoalItemIndex=5000 -AttemptCount=1000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=256 -CuckooProbesetSize=8 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_InsFind_int] -ThreadCount=0 -MapSize=1000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=256 -CuckooProbesetSize=8 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_InsDelFind] -InitialMapSize=50000 -ThreadCount=4 -MaxLoadFactor=8 -InsertPercentage=5 -DeletePercentage=5 -Duration=7 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=256 -CuckooProbesetSize=8 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_DelOdd] -MapSize=50000 -InsThreadCount=2 -DelThreadCount=2 -ExtractThreadCount=2 -MaxLoadFactor=4 -PrintGCStateFlag=1 -#Cuckoo map properties -CuckooInitialSize=256 -CuckooProbesetSize=8 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 diff --git a/tests/data/test-express.conf b/tests/data/test-express.conf deleted file mode 100644 index fa9b8ee9..00000000 --- a/tests/data/test-express.conf +++ /dev/null @@ -1,290 +0,0 @@ -[General] -# HZP scan strategy, possible values are "classic", "inplace". Default is "classic" -HZP_scan_strategy=inplace -# Hazard pointer count per thread, for gc::HP -hazard_pointer_count=72 - -# cds::gc::DHP initialization parameters -dhp_liberate_threshold=1024 -dhp_init_guard_count=16 -dhp_epoch_count=16 - -[Atomic_ST] -iterCount=1000000 - -[thread_init_fini] -ThreadCount=8 -PassCount=100000 - -[Allocator_ST] -PassCount=5 -# Total allocation per pass, Megabytes -AllocPerPass=256 - -[Linux_Scale] -# Allocation count per test -PassCount=100000 -# Max allocated block size in bytes -MaxBlockSize=10000 -# Max thread count. 0 is processor_count * 2 -MaxThreadCount=4 - -[Hoard_ThreadTest] -MinBlockSize=16 -MaxBlockSize=64 -BlockCount=10000 -PassCount=10 -# Max thread count. 0 is processor_count * 2 -MaxThreadCount=4 - -[Larson] -MinBlockSize=8 -MaxBlockSize=1024 -BlocksPerThread=1000 -PassCount=1000000 -# Max thread count. 0 is processor_count * 2 -MaxThreadCount=4 - -[Random_Alloc] -DataSize=1000 -MinBlockSize=8 -MaxBlockSize=65000 -PassCount=100000 -# Max thread count. 0 is processor_count * 2 -MaxThreadCount=4 - -[Spinlock_MT] -ThreadCount=8 -LoopCount=1000000 - -[Stack_Push] -ThreadCount=8 -StackSize=500000 -EliminationSize=4 - -[Stack_PushPop] -PushThreadCount=4 -PopThreadCount=4 -StackSize=4000000 -EliminationSize=4 - -[IntrusiveStack_PushPop] -PushThreadCount=4 -PopThreadCount=4 -StackSize=4000000 -EliminationSize=4 -# Flat combining stack parameters -# FCIterate=1 - the test will be run iteratively -# for combine pass count from 1 to FCCombinePassCount -# and compact factor from 1 to FCCompactFactor -# FCIterate=0 - the test runs only once for giving -# FCCombinePassCount and FCCompactFactor -FCIterate=0 -FCCombinePassCount=4 -FCCompactFactor=64 - -[Queue_Push] -ThreadCount=8 -QueueSize=500000 - -[Queue_Pop] -ThreadCount=8 -QueueSize=500000 - -[Queue_ReaderWriter] -ReaderCount=4 -WriterCount=4 -QueueSize=500000 - -[IntrusiveQueue_ReaderWriter] -ReaderCount=4 -WriterCount=4 -QueueSize=500000 - -[Queue_Random] -ThreadCount=8 -QueueSize=500000 - -[BoundedQueue_Fullness] -ThreadCount=4 -QueueSize=1024 -PassCount=100000 - -[PQueue_Push] -ThreadCount=8 -QueueSize=1000000 - -[PQueue_PushPop] -PushThreadCount=4 -PopThreadCount=4 -QueueSize=500000 - -[Map_find_int] -ThreadCount=8 -MapSize=100000 -PercentExists=50 -PassCount=2 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_find_string] -ThreadCount=8 -MapSize=100000 -PercentExists=50 -PassCount=2 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_InsDel_int] -InsertThreadCount=4 -DeleteThreadCount=4 -ThreadPassCount=2 -MapSize=100000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_InsDel_func] -InsertThreadCount=4 -DeleteThreadCount=4 -UpdateThreadCount=4 -ThreadPassCount=4 -MapSize=100000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_InsDel_Item_int] -ThreadCount=8 -MapSize=100000 -GoalItem=50000 -AttemptCount=100 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_InsDel_string] -InsertThreadCount=4 -DeleteThreadCount=4 -ThreadPassCount=2 -MapSize=100000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_InsDel_Item_string] -ThreadCount=8 -MapSize=100000 -GoalItemIndex=50000 -AttemptCount=100 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_InsFind_int] -ThreadCount=0 -MapSize=1000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_InsDelFind] -InitialMapSize=500000 -ThreadCount=8 -MaxLoadFactor=4 -InsertPercentage=5 -DeletePercentage=5 -Duration=15 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 - -[Map_DelOdd] -MapSize=500000 -InsThreadCount=4 -DelThreadCount=3 -ExtractThreadCount=3 -MaxLoadFactor=4 -PrintGCStateFlag=1 -#Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=8 -FeldmanMapArrayBits=4 diff --git a/tests/data/test.conf b/tests/data/test.conf deleted file mode 100644 index a74aaa1e..00000000 --- a/tests/data/test.conf +++ /dev/null @@ -1,288 +0,0 @@ -[General] -# HZP scan strategy, possible values are "classic", "inplace". Default is "classic" -HZP_scan_strategy=inplace -hazard_pointer_count=72 - -# cds::gc::DHP initialization parameters -dhp_liberate_threshold=1024 -dhp_init_guard_count=16 -dhp_epoch_count=16 - -[Atomic_ST] -iterCount=1000000 - -[thread_init_fini] -ThreadCount=8 -PassCount=100000 - -[Allocator_ST] -PassCount=10 -# Total allocation per pass, Megabytes -AllocPerPass=1024 - -[Linux_Scale] -# Allocation count per test -PassCount=10000000 -# Max allocated block size in bytes -MaxBlockSize=66000 -# Max thread count. 0 is processor_count * 2 -MaxThreadCount=0 - -[Hoard_ThreadTest] -MinBlockSize=16 -MaxBlockSize=1024 -BlockCount=10000 -PassCount=500 -# Max thread count. 0 is processor_count * 2 -MaxThreadCount=0 - -[Larson] -MinBlockSize=8 -MaxBlockSize=1024 -BlocksPerThread=1000 -PassCount=5000000 -# Max thread count. 0 is processor_count * 2 -MaxThreadCount=0 - -[Random_Alloc] -DataSize=1000 -MinBlockSize=8 -MaxBlockSize=100000 -PassCount=500000 -# Max thread count. 0 is processor_count * 2 -MaxThreadCount=0 - -[Spinlock_MT] -ThreadCount=8 -LoopCount=1000000 - -[Stack_Push] -ThreadCount=8 -StackSize=2000000 -EliminationSize=4 - -[Stack_PushPop] -PushThreadCount=16 -PopThreadCount=16 -StackSize=16000000 -EliminationSize=4 - -[IntrusiveStack_PushPop] -PushThreadCount=16 -PopThreadCount=16 -StackSize=32000000 -EliminationSize=4 -# Flat combining stack parameters -# FCIterate=1 - the test will be run iteratively -# for combine pass count from 1 to FCCombinePassCount -# and compact factor from 1 to FCCompactFactor -# FCIterate=0 - the test runs only once for giving -# FCCombinePassCount and FCCompactFactor -FCIterate=0 -FCCombinePassCount=8 -FCCompactFactor=64 - -[Queue_Push] -ThreadCount=8 -QueueSize=5000000 - -[Queue_Pop] -ThreadCount=8 -QueueSize=5000000 - -[Queue_ReaderWriter] -ReaderCount=4 -WriterCount=4 -QueueSize=5000000 - -[IntrusiveQueue_ReaderWriter] -ReaderCount=4 -WriterCount=4 -QueueSize=5000000 - -[Queue_Random] -ThreadCount=8 -QueueSize=5000000 - -[BoundedQueue_Fullness] -ThreadCount=8 -QueueSize=1024 -PassCount=1000000 - -[PQueue_Push] -ThreadCount=8 -QueueSize=10000000 - -[PQueue_PushPop] -PushThreadCount=4 -PopThreadCount=4 -QueueSize=10000000 - -[Map_find_int] -ThreadCount=8 -MapSize=2000000 -PercentExists=50 -PassCount=1 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=10 -FeldmanMapArrayBits=4 - -[Map_find_string] -ThreadCount=8 -MapSize=2000000 -PercentExists=50 -PassCount=1 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=10 -FeldmanMapArrayBits=4 - -[Map_InsDel_int] -InsertThreadCount=4 -DeleteThreadCount=4 -ThreadPassCount=2 -MapSize=1000000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=10 -FeldmanMapArrayBits=4 - -[Map_InsDel_func] -InsertThreadCount=4 -DeleteThreadCount=4 -UpdateThreadCount=4 -ThreadPassCount=2 -MapSize=1000000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=10 -FeldmanMapArrayBits=4 - -[Map_InsDel_Item_int] -ThreadCount=8 -MapSize=10000 -GoalItem=5000 -AttemptCount=10000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 -# *** FeldmanHashMap properties -FeldmanMapHeadBits=10 -FeldmanMapArrayBits=4 - -[Map_InsDel_string] -InsertThreadCount=4 -DeleteThreadCount=4 -ThreadPassCount=2 -MapSize=500000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=10 -FeldmanMapArrayBits=4 - -[Map_InsDel_Item_string] -ThreadCount=8 -MapSize=10000 -GoalItemIndex=5000 -AttemptCount=10000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 -# *** FeldmanHashMap properties -FeldmanMapHeadBits=10 -FeldmanMapArrayBits=4 - -[Map_InsFind_int] -ThreadCount=0 -MapSize=5000 -MaxLoadFactor=4 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=10 -FeldmanMapArrayBits=4 - -[Map_InsDelFind] -InitialMapSize=500000 -ThreadCount=8 -MaxLoadFactor=4 -InsertPercentage=20 -DeletePercentage=20 -Duration=15 -PrintGCStateFlag=1 -# *** Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=10 -FeldmanMapArrayBits=4 - - -[Map_DelOdd] -MapSize=1000000 -InsThreadCount=4 -DelThreadCount=3 -ExtractThreadCount=3 -MaxLoadFactor=4 -PrintGCStateFlag=1 -#Cuckoo map properties -CuckooInitialSize=1024 -CuckooProbesetSize=16 -# 0 - use default -CuckooProbesetThreshold=0 - -# *** FeldmanHashMap properties -FeldmanMapHeadBits=10 -FeldmanMapArrayBits=4 diff --git a/tests/data/text.txt b/tests/data/text.txt deleted file mode 100644 index 8b800cfe..00000000 --- a/tests/data/text.txt +++ /dev/null @@ -1,6611 +0,0 @@ - - There is but one problem -- - the only one in the world -- - to restore to men a spiritual - content, spiritual concerns.... - -- A de St. Exupery - - - The customs inspector had a round smooth face which -registered the most benevolent of attitudes. He was -respectfully cordial and solicitous. - "Welcome," he murmured. "How do you like our sunshine?" He -glanced at the passport in my hand. "Beautiful morning, isn't -it?" - I proffered him my passport and stood the suitcase on the -white counter. The inspector rapidly leafed through it with his -long careful fingers. He was dressed in a white uniform with -silver buttons and silver braid on the shoulders. He laid the -passport aside and touched the suitcase with the tips of his -fingers. - "Curious," he said. "The case has not yet dried. It is -difficult to imagine that somewhere the weather can be bad." - "Yes," I said with a sigh, "we are already well into the -autumn," and opened the suitcase. - The inspector smiled sympathetically and glanced at it -absent-mindedly. "It's impossible amid our sunshine to -visualize an autumn. Thank you, that will be quite all -right.... Rain, wet roofs, wind... - "And what if I have something hidden under the linen?" I -asked -- I don't appreciate conversations about the weather. He -laughed heartily. - "Just an empty formality," he said. "Tradition. A -conditioned reflex of all customs inspectors, if you will." He -handed me a sheet of heavy paper. "And here is another -conditioned reflex. Please read it -- it's rather unusual. And -sign it if you don't mind." - I read. It was a law concerning immigration, printed in -elegant type on heavy paper and in four languages. Immigration -was absolutely forbidden. The customs man regarded me steadily. - "Curious, isn't it?" he asked. - "In any case it's intriguing," I replied, drawing my -fountain pen. "Where do I sign?" - "Where and how you please," said the customs man. "Just -across will do." - I signed under the Russian text over the line "I have been -informed on the immigration laws." - 'Thank you," said the customs man, filing the paper away -in his desk, 'Now you know practically all our laws. And during -your entire stay -- How long will you be staying with us?" - I shrugged my shoulders. - "It's difficult to say in advance. Depends on how the work -will go." - "Shall we say a month?" - 'That would be about it. Let's say a month." - "And during this whole month," he bent over the passport -making some notation, "during this entire month you won't need -any other laws." He handed me my passport. "I shouldn't even -have to mention that you can prolong your stay with us to any -reasonable extent. But in the meantime, let it be thirty days. -If you find it desirable to stay longer, visit the police -station on the 16th of May and pay one dollar... You have -dollars?" - "Yes." - "That's fine. By the way, it is not at all necessary to -have exclusively a dollar. We accept any currency. Rubles, -pounds, cruzeiros." - "I don't have cruzeiros," I said. 'I have only dollars, -rubles, and some English pounds. Will that suit you?" - "Undoubtedly. By the way, so as not to forget, would you -please deposit ninety dollars and seventy-two cents." - "With pleasure," I said, "but why?" - "It's customary. To guarantee the minimum needs. We have -never had anyone with us who did not have some needs." - I counted out ninety-one dollars, and without sitting -down, he proceeded to write out a receipt. His neck grew red -from the awkward position. I looked around. The white counter -stretched along the entire pavilion. On the other side of the -barrier, customs inspectors in white smiled cordially, laughed, -explained things in a confidential manner. On this side, -brightly clad tourists shuffled impatiently, snapped suitcase -locks, and gaped excitedly. While they waited they feverishly -thumbed through advertising brochures, loudly devised all kinds -of plans, secretly and openly anticipated happy days ahead, and -now thirsted to surmount the white counter as quickly as -possible. Sedate London clerks and their athletic-looking -brides, pushy Oklahoma farmers in bright shirts hanging outside -Bermuda shorts and sandals over bare feet, Turin workers with -their well-rouged wives and numerous children, small-time -Catholic bosses from Spain, Finnish lumbermen with their pipes -considerately banked, Hungarian basketball players, Iranian -students, union organizers from Zambia... - The customs man gave me my receipt and counted out -twenty-eight cents change. - "Well -- there is all the formality. I hope I haven't -detained you too long. May I wish you a pleasant stay!" - "Thank you," I said and took my suitcase. - He regarded me with his head slightly bent sideways, -smiling out of his bland, smooth face. - "Through this turnstile, please. Au revoir. May I -once more wish you the best." - I went out on the plaza following an Italian pair with -four kids and two robot redcaps. - The sun stood high over mauve mountains. Everything in the -plaza was bright and shiny and colorful. A bit too bright and -colorful, as it usually is in resort towns. Gleaming -orange-and-red buses surrounded by tourist crowds, shiny and -polished green of the vegetation in the squares with white, -blue, yellow, and gold pavilions, kiosks, and tents. Mirrorlike -surfaces, vertical, horizontal, and inclined, which flared with -sunbursts. Smooth matte hexagons underfoot and under the wheels --- red, black, and gray, just slightly springy and smothering -the sound of footsteps. I put down the suitcase and donned -sunglasses. - Out of all the sunny towns it has been my luck to visit, -this was without a doubt the sunniest. And that was all wrong. -It would have been much easier if the day had been gray, if -there had been dirt and mud, if the pavilion had also been gray -with concrete walls, and if on that wet concrete was scratched -something obscene, tired, and pointless, born of boredom. Then -I would probably feel like working at once. I am positive of -this because such things are irritating and demand action. It's -still hard to get used to the idea that poverty can be wealthy. -And so the urge is lacking and there is no desire to begin -immediately, but rather to take one of these buses, like the -red-and-blue one, and take off to the beach, do a little scuba -diving, get a tan, play some ball, or find Peck, stretch out on -the floor in some cool room and reminisce on all the good stuff -so that he could ask about Bykov, about the Trans-Pluto -expedition, about the new ships on which I too am behind the -times, but still know better than he, and so that he could -recollect the uprising and boast of his scars and his high -social position.... It would be most convenient if Peck did -have a high social position. It would be well if he were, for -example, a mayor.... - A small darkish rotund individual in a white suit and a -round white hat set at a rakish angle approached deliberately, -wiping his lips with a dainty handkerchief. The hat was -equipped with a transparent green shade and a green ribbon on -which was stamped "Welcome." On his right earlobe glistened a -pendant radio. - "Welcome aboard," said the man. - "Hello," said I. - "A pleasure to have you with us. My name is Ahmad." - "And my name is Ivan," said I. "Pleased to make your -acquaintance." - We nodded to each other and regarded the tourists entering -the buses. They were happily noisy and the warm wind rolled -their discarded butts and crumpled candy wrappers along the -square. Ahmad's face bore a green tint from the light filtering -through his cap visor. - "Vacationers," he said. "Carefree and loud. Now they will -be taken to their hotels and will immediately rush off to the -beaches." - "I wouldn't mind a run on water skis," I observed. - "Really? I never would have guessed. There's nothing you -look less like than a vacationer." - "So be it," I said. "In fact I did come to work" - "To work? Well, that happens too, some do come to work -here. Two years back Jonathan Kreis came here to paint a -picture." He laughed. "Later there was an assault-and-battery -case in Rome, some papal nuncio was involved, can't remember -his name." - "Because of the picture?" - "No, hardly. He didn't paint a thing here. The casino was -where you could find him day or night. Shall we go have a -drink?" - "Let's. You can give me a few pointers." - "It's my pleasurable duty -- to give advice," said Ahmad. - We bent down simultaneously and both of us took hold of -the suitcase handle. - "It's okay -- I'll manage." - "No," countered Ahmad, "you are the guest and I the host. -Let's go to yonder bar. It's quiet there at this time." - We went in under a blue awning. Ahmad seated me at a -table, put my suitcase on a vacant chair, and went to the -counter. It was cool and an air conditioner sighed in the -background. Ahmad returned with a tray. There were tall glasses -and flat plates with butter-gold tidbits. - "Not very strong," said Ahmad, "but really cold to make up -for that." - "I don't like it strong in the morning either," I said. - I quaffed the glass. The stuff was good. - "A swallow -- a bite," counseled Ahmad, "Like this: a -swallow, a bite." - The tidbits crunched and melted in the mouth. In my view, -they were unnecessary. We were silent for some time, watching -the square from under the marquee. gently purring, the buses -pulled out one after another into their respective tree-lined -avenues. They looked ponderous yet strangely elegant in their -clumsiness. - "It would be too noisy there," said Ahmad. "Fine cottages, -lots of women -- to suit any taste -- and right on the water, -but no privacy. I don't think it's for you." - "Yes," I agreed. "The noise would bother me. Anyway, I -don't like vacationers, Ahmad. Can't stand it when people work -at having fun." - Ahmad nodded and carefully placed the next tidbit in his -mouth. I watched him chew. There was something professional and -concentrated in the movement of his lower jaw. Having -swallowed, he said, "No, the synthetic will never compare with -the natural product. Not the same bouquet." He flexed his lips, -smacked them gently, and continued, "There are two excellent -hotels in the center of town, but, in my view..." - "Yes, that won't do either," I said. "A hotel places -certain obligations on you. I never heard that anything -worthwhile has ever been written in a hotel." - "Well, that's not quite true," retorted Ahmad, critically -studying the last tidbit. "I read one book and in it they said -that it was in fact written in a hotel -- the Hotel Florida." - "Aah," I said, "you are correct. But then your city is not -being shelled by cannons." - "Cannons? Of course not. Not as a rule, anyway." - "Just as I thought. But, as a matter of fact, it has been -noted that something worthwhile can be written only in a hotel -which is under bombardment." - Ahmad took the last tidbit after all. - 'That would be difficult to arrange," he said. "In our -times it's hard to obtain a cannon. Besides, it's very -expensive; the hotel could lose its clientele." - "Hotel Florida also lost its clients in its time. -Hemingway lived in it alone." - "Who?" - "Hemingway." - "Ah... but that was so long ago, in the fascist times. But -times have changed, Ivan." - "Yes," said I, "and therefore in our times there is no -point in writing in hotels." - "To blazes with hotels then," said Ahmad. "I know what you -need. You need a boarding house." He took out a notebook. -"State your requirements and we'll try to match them up." - "Boarding house," I said. "I don't know. I don't think so, -Ahmad. Do understand that I don't want to meet people whom I -don't want to know. That's to begin with. And in the second -place, who lives in private boarding houses? These same -vacationers who don't have enough money for a cottage. They too -work hard at having fun. They concoct picnics, meets, and song -fests. At night they play the banjo. On top of which they grab -anyone they can get hold of and make them participate in -contests for the longest uninterrupted kiss. Most important of -all, they are all transients. But I am interested in your -country, Ahmad. In your townspeople. I'll tell you what I need: -I need a quiet house with a garden. Not too far from downtown. -A relaxed family, with a respectable housewife. An attractive -young daughter. You get the picture, Ahmad?" - Ahmad took the empty glasses, went over to the counter, -and returned with full ones. Now they contained a colorless -transparent liquid and the small plates were stacked with tiny -multistoried sandwiches. - "I know of such a cozy house," declared Ahmad. "The widow -is forty-five and the daughter twenty. The son is eleven. Let's -finish the drinks and we'll be on our way. I think you'll like -it. The rent is standard, but of course it's more than in a -hoarding house. You have come to stay for a long time?" - "For a month." - "Good Lord! Just a month?" - "I don't know how my affairs will go. Perhaps I may tarry -awhile." - "By all means, you will," said Ahmad. "I can see that you -have totally failed to grasp just where you have arrived. You -simply don't understand what a good time you can have here and -how you don't have to think about a thing." - We finished our drinks, got up, and went across the square -under the hot sun to the parking area. Ahmad walked with a -rapid, slightly rolling gait, with the green visor of his cap -set low over his eyes, swinging the suitcase in a debonair -manner. The next batch of tourists was being discharged -broadcast from the customs house. - "Would you like me to... Frankly?" said Ahmad suddenly. - "Yes, I would like you to," said I. What else could I say? -Forty years I have lived in this world and have yet to learn to -deflect this unpleasant question. - "You won't write a thing here," said Ahmad. "It's mighty -hard to write in our town." - "It's always hard to write anything. However, fortunately -I am not a writer." - "I accept this gladly. But in that case, it is slightly -impossible here. At least for a transient." - "You frighten me." - "It's not a case of being frightened. You simply won't -want to work. You won't be able to stay at the typewriter. -You'll feel annoyed by the typewriter. Do you know what the joy -of living is?" - "How shall I say?" - "You don't know anything, Ivan. So far you still don't -know anything about it. You are bound to traverse the twelve -circles of paradise. It's funny, of course, but I envy you." - We stopped by a long open car. Ahmad threw the suitcase -into the back seat and flung the door open for me. - "Please," he said. - "Presumably you have already passed through them?" I -asked, sliding into the seat. - He got in behind the wheel and started the engine. - "What exactly do you mean?" - "The twelve circles of paradise." - "As for me, Ivan, a long time ago I selected my favorite -circle," said Ahmad. The car began to roll noiselessly through -the square. "The others haven't existed for me for quite a -while. Unfortunately. It's like old age, with all its -privileges and deficiencies." - The car rushed through a park and sped along a shaded, -straight thoroughfare. I kept looking around with great -interest but couldn't recognize a thing. It was stupid to -expect to. We had been landed at night, in a torrential rain; -seven thousand exhausted tourists stood on the pier looking at -the burning liner. We hadn't seen the city -- in its place was -a black, wet emptiness dotted with red flashes. It had rattled, -boomed, and screeched as though being rent asunder. "We'll be -slaughtered in the dark, like rabbits," Robert had said, and I -immediately had sent him back to the barge to unload the -armored car. The gangway had collapsed and the car had fallen -into the water, and when Peck had pulled Robert out, all blue -from the cold, he had come over to me and said through -chattering teeth, "Didn't I tell you it was dark?" - Ahmad said suddenly, "When I was a boy, we lived near the -port and we used to come out here to beat up the factory kids. -Many of them had brass knuckles, and that got me a broken nose. -Half of my life I put up with a crooked nose until I had it -fixed last year. I sure loved to scrap when I was young. I used -to have a hunk of lead pipe, and once I had to sit in jail for -six months, but that didn't help." - He stopped, grinning. I waited awhile, then said, "You -can't find a good lead pipe these days. Now rubber truncheons -are in fashion: you buy them used from the police." - "Exactly," said Ahmad. "Or else you buy a dumbbell, cut -off one ball and there you are, ready to go. But the guys are -not what they used to be. Now you get deported for such stuff." - "Yes. And what else did you occupy yourself with in your -youth?" - "And you?" - "I planned on joining the interplanetary force and trained -to withstand overstress. We also played at who could dive the -deepest." - "We too," said Ahmad. "We went down ten meters for -automatics and whiskey. Over by the piers they lay on the -seabed by the case. I used to get nosebleeds. But when the fire -fights started, we began to find corpses with weights around -their necks, so we quit that game." - "It's a very unpleasant sight, a corpse under water -- -especially if there is a current," said I. - Ahmad chuckled "I've seen worse. I had occasion to work -with the police." - "This was after the fracas?" - "Much later. When the anti-gangster laws were passed." - 'They were called gangsters here too?" - "What else would you call them? Not brigands, certainly. -'A group of brigands, armed with flame throwers and gas bombs, -have laid siege to the municipal buildings,' " he pronounced -expressively. "It doesn't sound right, you can feel that. A -brigand is an ax, a bludgeon, a mustache up to the ears, a -cleaver --" - "A lead pipe," I offered. - Ahmad gurgled. - "What are you doing tonight?" he asked. - "Going for a walk." - "You have friends here?" - "Yes. Why?" - "Well... then it's different." - "How come?" - "Well, I was going to suggest something to you, but since -you have friends..." - "By the way, " I said, "who is your mayor?" - "Mayor? The devil knows, I don't remember. Somebody was -elected." - "Not Peck Xenai, by any chance?" - "I don't know." He sounded regretful. "I wouldn't want to -mislead you." - "Would you know the man anyway?" - "Xenai... Peck Xenai... No, I don't knew him; haven't -heard of him. What is he to you -- a friend?" - "Yes, an old friend. I have some others here, but they are -all visitors." - "Well," said Ahmad, "if you should get bored and all kinds -of thoughts begin to enter your head, come on over for a visit. -Every single day from seven o'clock on I am at the Chez -Gourmet. Do you like good eating?" - "Quite," said I. - "Stomach in good shape?" - "Like an ostrich's." - "Well, then, why don't you come by? We'll have a fine -time, and it won't be necessary to think about a thing." - Ahmad braked and turned cautiously into a driveway with an -iron gate, which silently swung open before us. The car rolled -into the yard. - "We have arrived," announced Ahmad. "Here is your home." - The house was two-storied, white with blue trim. The -windows were draped on the inside. A clean, deserted patio with -multi-colored flagstones was surrounded by a fruit-tree garden, -with apple branches touching the walls. - "And where is the widow?" I said. - "Let's go inside," said Ahmad. - He went up the steps, leafing through his notebook I was -following him while looking around. I liked the mini-orchard. -Ahmad found the right page and set up the combination on the -small disc by the doorbell. The door opened. Cool, fresh air -flowed out of the house. It was dark inside, but as soon as we -stepped into the hall, it lit up with concealed illumination. -Putting away his notebook, Ahmad said, "To the right is the -landlord's half, to the left is yours. Please come in. Here is -the living room, and there is the bar. In a minute we'll have a -drink. And now here is your study. Do you have a phonor?" - "No." - "It's just as well. You have everything you need right -here. Come on over here. This is the bedroom. There is the -control board for acoustic defense. You know how to use it?" - "I'll figure it out." - "Good. The defense is triple, you can have it quiet as a -tomb or turn the place into a bordello, whatever you like... -Here's the air-conditioning control, which, incidentally, is -not too convenient, as you can only operate it from the -bedroom." - "I'll manage," I said. - "What? Well, okay. Here is the bathroom and powder room." - "I am interested in the widow," I said, "and the -daughter." - "All in good time. Shall I open the drapes?" - "What for?" - "Right you are, for no reason. Let's go have a drink." - We returned to the living room and Ahmad disappeared up to -his waist in the bar. - "You want it on the strong side?" he asked. - "You have it backwards." - "Would you like an omelette? Sandwiches?" - "How about nothing?" - "No," said Ahmad, "an omelette it shall be -- with -tomatoes." He rummaged in the bar. "I don't know what does it, -but this autocooker makes an altogether astonishingly good -omelette with tomatoes. While we are at it, I will also have a -bite." - He extracted a tray from the bar and placed it on a low -table by a semicircular couch. We sat down. - "Now about the widow," I reminded him. "I would like to . -present myself." - "You like the rooms?" - "They'll do." - "Well, the widow is quite all right, too. And the daughter -is not bad either." - He extracted a flat case from an inside pocket. Like a -cartridge clip it was stacked with a row of ampoules filled -with colored liquids. Ahmad ran his index finger over them, -smelled the omelette, hesitated, and finally selected one with -a green fluid, broke it carefully, and dripped a few drops on -the tomatoes. An aroma pervaded the room. The smell was not -unpleasant, but, to my taste, bore no particular relation to -the food. - "Right now," continued Ahmad, "they are still asleep." His -gaze turned abstracted. "They sleep and see dreams." - I looked at my watch. - "Well, well!" - Ahmad was enjoying his food. - "Ten-thirty!" I said. - Ahmad was enjoying his food. His cap was pushed back on -his head, and the green visor stuck up vertically like the -crest of an aroused mimicrodon. His eyes were half-closed. I -regarded him with interest. - Having swallowed the last bit of tomato, he broke off a -piece of the crust of white bread and carefully wiped the pan -with it. His gaze cleared. - "What were you saying?" he asked. "Ten-thirty? Tomorrow -you too will get up at ten-thirty or maybe even at twelve. I, -for one, will get up at twelve." - He got up and stretched luxuriously, cracking his joints. - "Well," he said, "it's time to go home, finally. Here's my -card, Ivan. Put it in your desk, and don't throw it out until -your very last day here." He went over to the flat box and -inserted another card into its slot. There was a loud click. - "Now this one," he said, examining the card against the -light. "Please pass on to the widow with my very best -compliments." - "And then what will happen?" said I. - "Money will happen. I trust you are not a devotee of -haggling, Ivan? The widow will name a figure, Ivan, and you -shouldn't haggle over it. It's not done." - "I will try not to haggle," I said, "although it would be -amusing to try it." - Ahmad raised his eyebrows. - "Well, if you really want to so much, then why not try it? -Always do what you want to do. Then you will have excellent -digestion. I will get your suitcase now." - "I need prospects," I said. "I need guidebooks. I am a -writer, Ahmad. I will require brochures on the economic -situation of the masses, statistical references. Where can I -get all that? And when?" - "I will give you a guidebook," said Ahmad. "It has -statistics, addresses, telephone numbers, and so on. As far as -the masses are concerned, I don't think we publish any such -nonsense. Of course, you can send an inquiry to UNESCO, but -what would you want with it? You'll see everything for -yourself. Just hold on a minute. I'll get the suitcase and the -guidebook." - He went out and quickly returned with my suitcase in one -hand and a fat bluish-looking little tome in the other. - I stood up. - "Judging by the look on your face," he announced, smiling, -"you are debating whether it's proper to tip me or not." - "I confess," I said. - "Well then, would you like to do it or not?" - "No, I must admit." - "You have a healthy, strong character," Ahmad approved. -"Don't do it. Don't tip anybody. You could collect one in the -face, especially from the girls. But, on the other hand, don't -haggle either. You could walk into one that way too. Anyway, -that's all a lot of rot. For all I know you may like to have -your face slapped, like that Jonathan Kreis. Farewell, Ivan, -have fun, and come to Chez Gourmet. Any evening at seven. But -most important of all, don't think about a thing." - He waved his hand and left. I picked up the mixture in the -dewy glass and sat down with the guidebook. - - -

    Chapter TWO

- - The guidebook was printed on bond paper with a gilt edge. -Interspersed with gorgeous photographs, it contained some -curious information. In the city there were fifty thousand -people, fifteen hundred cats, twenty thousand pigeons, and two -thousand dogs (including seven hundred winners of medals). The -city had fifteen thousand passenger cars, five thousand helis, -a thousand taxis (with and without chauffeurs), nine hundred -automatic garbage collectors, four hundred permanent bars, -cafes, and snack bars, eleven restaurants, and four first-class -hotels, and was a tourist establishment which served over one -hundred thousand visitors every year. The city had sixty -thousand TV sets, fifty movie theaters, eight amusement parks, -two Happy Mood salons, sixteen beauty parlors, forty libraries, -and one hundred and eighty automated barber shops. Eighty -percent of the population were engaged in services, and the -rest worked in two syntho-bakeries and one government shipyard. -There were six schools and one university housed in an old -castle once the home of crusader Ulrich da Casa. In the city -there were also eight active civilian societies, among them the -Society of Diligent Tasters, the Society of Connoisseurs and -Appraisers, and the Society for the Good Old Country Against -Evil Influences. In addition, fifteen hundred citizens were -members of seven hundred and one groups where they sang, -learned to act, to arrange furniture, to breast-feed, and to -medicate cats. As to per-capita consumption of alcoholic -beverages, natural meat, and liquid oxygen, the city was sixth, -twelfth, and thirteenth highest in Europe respectively. The -city had seven men's clubs and five women's clubs, as well as -sport clubs named the Bulls and Rhinos. By a majority of -forty-six votes, someone by the name of Flim Gao had been -elected mayor. Peck was not among the municipal officials. - I put the guidebook aside, took off my jacket, and made a -thorough examination of my domain. I approved of the living -room. It was done in blue, and I like that color. The bar was -full of bottled and refrigerated victuals so that I could at a -moment's notice entertain a dozen starving guests. - I went into the study. There was a large table in front of -the window and a comfortable chair. The walls were lined with -shelves tightly filled with collected works. The clean bright -bindings were arranged with great skill so that they formed a -colorful and appealing layout. The top shelf was occupied by -the fifty-volume encyclopedia of UNESCO. Lower shelves were -kaleidoscopic with the shiny wrappers of detective novels. - As soon as I saw the telephone on the table, I dialed -Rimeyer's number, perching on the chair arm. The receiver -sounded with prolonged honkings and I waited, twirling a small -dictaphone which someone had left on the table. Rimeyer did not -answer. I hung up and inspected the dictaphone. The tape was -half-used-up, and after rewinding, I punched the playback -button. - "Greetings and more greetings," said a merry male voice. -"I clasp your hand heartily or kiss you on the cheek, depending -on your sex and age. I have lived here two months and bear -witness that it was most enjoyable. Allow me a few points of -advice. The best institution in town is the Hoity Toity in the -Park of Dreams. The best girl in town is Basi in the House of -Models. The best guy in town is me, but I have already left. On -television just watch Program Nine; everything else is chaff. -Don't get involved with Intels, and give the Rhinos a wide -berth. Don't buy anything on credit -- there'll be no end to -the runaround. The widow is a good woman but loves to talk and -in general... As for Vousi, I didn't get to meet her, as she -had left the country to visit her grandmother. In my opinion -she is sweet, and there was a photograph of her in the widow's -album, but I took it. There's more: I expect to come back next -March, so be a pal, if you decide to return, pick another time. -Have a --" - Music followed abruptly. I listened awhile and turned off -the machine. - There wasn't a single tome I could extract from the -shelves, so well were they stuck in, or maybe even glued on, -and as there was nothing else of interest in the study, I went -into the bedroom. - Here it was especially cool and cozy. I have always wanted -just such a bedroom, but somehow never had the time to get -around to setting one up. The bed was big and low. On the night -table stood an elegant phonor and a tiny remote-control box for -the TV. The screen stood at the foot of the bed, while at the -head the widow had hung a very natural-looking picture of field -flowers in a crystal vase. The picture was painted with -luminous paints and the dewdrops glistened in the darkened -room. - I punched the TV control at random and stretched out on -the bed. It was soft yet somehow firm. The TV roared loudly. An -inebriated-looking man launched himself out of the screen, -crashed through some sort of railing, and fell from a great -height into a colossal fuming vat. There was a loud splash and -the phonor exuded a smell. The man disappeared in the bubbling -liquid and then reappeared, holding in his teeth something -reminiscent of a well-boiled boot. The unseen audience broke -out in a storm of horse laughs. Fade out... soft lyrical music. -A white horse pulling a phaeton appeared out of green woods and -advanced toward me. A pretty girl in a bathing suit sat in the -carriage. I turned off the TV, got up, and went to look at the -bathroom. - There was a piny smell and flickering of germicidal lamps. -I undressed, threw the underwear into the hopper, and climbed -into the shower. Taking my time, I dressed in front of the -mirror, combed my hair, and shaved. The shelves were loaded -with rows of vials, hygienic devices, antiseptics, and tubes -with pastes and greases. At the edge of one shelf there was a -pile of flat colorful boxes with the logo "Devon." I switched -off the razor and took one of the boxes. A germicidal lamp -flickered in the mirror, just as it did that day in Vienna, -when I stood just like this studiously regarding just such a -little box, because I did not want to go out to the bedroom, -where Raffy Reisman loudly argued about something with the -doctor; while the green oily liquid still oscillated in the -bath, over which hung the steamy vapor and a screeching radio -receiver, attached to a porcelain hook for towels, howled, -hooted, and snorted until Raffy turned it off in irritation. -That was in Vienna, and just as here, it was very strange to -see in a bathroom a box of Devon -- a popular repellent which -did an excellent job of chasing mosquitoes, chiggers, gnats, -and other bloodsucking insects which were long forgotten in -Vienna and here in a seaside resort town. Only in Vienna there -had been an overlay of fear. - The box which I held in my hand was almost empty, with -only one tablet remaining. The rest of the boxes were still -scaled. I finished shaving and returned to the bedroom. I felt -like calling Rimeyer again, but abruptly the house came to -life. The pleated drapes flew open with a soft whine, the -windowpanes slid away in their frames, and the bedroom was -flooded with warm air, laden with the scent of apples. Someone -was talking somewhere, light footsteps sounded overhead, and a -severe-sounding female voice said, "Vousi -- at least eat some -cake, do you hear?" - Thereupon I imparted a certain air of disorder to my -clothes (in accordance with the current style), smoothed my -temples, and went into the hall, taking one of Ahmad's cards -from the living room. - The widow turned out to be a youthful plump woman, -somewhat languid, with a pleasant fresh face. - "How nice!" she said, seeing me. "You are up already? -Hello, my name is Vaina Tuur, but you can call me Vaina." - "My pleasure," I said, shuddering fashionably. "My name is -Ivan." - "How nice," said Aunt Vaina. "What an original -soft-sounding name! Have you had breakfast, Ivan?" - "With your permission, I intended to have breakfast in -town," I said, and proffered her the card. - "Ah," said Aunt Vaina, looking through the card at the -light. "That nice Ahmad, if you only knew what a nice -responsible fellow he is. But I see you did not have breakfast. -Lunch you can have in town, but now I will treat you to some of -my croutons. The major general always said that nowhere else in -the world could you have such wonderful croutons." - "With pleasure," said I, shuddering for the second time. - The door behind Aunt Vaina was flung open and a very -pretty young girl in a short blue skirt and an open white -blouse flew in on clicking high heels. In her hand she held a -piece of cake, which she munched while humming a currently -popular song. Seeing me, she stopped, flung her pocketbook on -its long strap over her shoulder with a show of abandon, and -swallowed, bending down her head. - "Vousi!" said Aunt Vaina, compressing her lips. "Vousi, -this is Ivan." - "Not bad!" said Vousi. "Greetings." - "Vousi," reproached Aunt Vaina. - "You came with your wife?" said Vousi, extending her hand. - "No," said I. Her fingers were soft and cool. "I am -alone." - In that case, I'll show you all there is to see," she -said. "Till tonight. I must run now, but we'll go out this -evening." - "Vousi!" reproached Aunt Vaina. - Vousi pushed the rest of the cake into her mouth, bussed -her mother on the cheek, and ran toward the door. She had -smooth sunburned legs, long and slender, and a close-cropped -back of the head. - "Ach, Ivan," said Aunt Vaina, who was also looking at the -retreating girl, "in our times it is so difficult to deal with -young girls. They develop so early and leave us so soon. Ever -since she started working in that salon..." - "She is a dressmaker?" I inquired. - "Oh no! She works in the Happy Mood Salon, in the old -ladies' department. And do you know, they value her highly. But -last year she was late once and now she has to be very careful. -As you can see she could not even have a decent conversation -with you, but it's possible that a client is even now waiting -for her. You might not believe this, but she already has a -permanent clientele. Anyway, why are we standing here? The -croutons will get cold." - We entered the landlord's side. I tried with all my might -to conduct myself correctly, although I was a bit foggy as to -what exactly was correct. Aunt Vaina sat me down at a table, -excused herself, and left. I looked around. The room was an -exact copy of mine, except that the walls were rose instead of -blue, and beyond the window, in place of the sea was a small -yard with a low fence dividing it from the street. Aunt Vaina -came back with a tray bearing boiled cream and a plate of -croutons.. - "You know," she said, "I think I will have some breakfast -too. My doctor does not recommend breakfast, especially with -boiled cream. But we became so accustomed... it was the -general's favorite breakfast. Do you know, I try to have only -men boarders. That nice Ahmad understands me very well. He -understands how much I need to sit just like this, now and -then, just as we are sitting, and have a cup of boiled cream." - "Your cream is wonderfully good," said I, not insincerely. - "Ach, Ivan." Aunt Vaina put down her cup and fluttered her -hands. "But you said that almost exactly like the major -general... Strange, you even look like him. Except that his -face was a bit narrower and he always had breakfast in his -uniform." - "Yes," I said with regret, "I don't have a uniform." - "But there was one once," said she coyly, shaking a finger -at me. "Of course! I can see it. It's so senseless! People -nowadays have to be ashamed of their military past. Isn't that -silly? But they are always betrayed by their bearing, that very -special manly carriage. You cannot hide it, Ivan!" - I made a very elaborate non-committal gesture, said, "Mm --- yes," and took another crouton. - "It's all so out of place, isn't that right?" continued -Aunt Vaina with great animation. "How can you confuse such two -opposite concepts -- war and the army? We all detest war. War -is awful. My mother described it to me, she was only a girl, -but she remembers everything. Suddenly, without warning, there -they are -- the soldiers, crude, alien, speaking a foreign -tongue, belching; and the officers, without any manners, -laughing loudly, annoying the chambermaids, and smelling -- -forgive me; and that senseless commander's meeting hour... that -is war and it deserves every condemnation! But the army! That's -an altogether different affair! Surely you remember, Ivan, the -troops lined up by battalion, the perfection of the line, the -manliness of the faces under the helmets, shiny arms, sparkling -decorations, and then the commanding officer riding in a -special staff car and addressing the battalions, which respond -willingly and briefly like one man." - "No doubt," said I, "this has impressed many people." - "Yes! Very much indeed. We have always said that it is -necessary to disarm, but did we really need to destroy the -army? It is the last refuge of manhood in our time of -widespread moral collapse. It's weird and ridiculous -- a -government without an army...." - "It is funny," I agreed. "You may not believe it, but I -have been smiling ever since they signed the Pact." - "Yes, I can understand that," said Aunt Vaina. "There was -nothing else for us to do, but to smile sarcastically. The -Major General Tuur" -- she extricated a handkerchief -- "passed -away with just such a sarcastic smile on his face." She applied -the handkerchief to her eyes. "He said to us: 'My friends, I -still hope to live to the day when everything will fall apart.' -A broken man, who has lost the meaning of life... he could not -stand the emptiness in his heart." Suddenly she perked up. -"Here, let me show you, Ivan." - She bustled into the next room and returned with a heavy -old-fashioned photo album. - I looked at my watch at once, but Aunt Vaina did not take -any notice, and sitting herself down at my side, opened the -album at the very first page. - "Here is the major general." - The major general looked quite the eagle. He had a narrow -bony face and translucent eyes. His long body was spangled with -medals. The biggest, a multi-pointed starburst framed in a -laurel wreath, sparkled in the region of the appendix. In his -left hand the general tightly pressed a pair of gloves, and his -right hand rested on the hilt of a ceremonial poniard. A high -collar with gold embroidery propped up his lower jaw. - "And here is the major general on maneuvers." - Here again the general looked the eagle. He was issuing -instructions to his officers, who were bent over a map spread -on the frontal armor of a gigantic tank. By the shape of the -treads and the streamlined appearance of the turret, I -recognized it as one of the Mammoth heavy storm vehicles, which -were designed for pushing through nuclear strike zones and now -are successfully employed by deep-sea exploration teams. - "And here is the general on his fiftieth birthday." - Here too, the general looked the eagle. He stood by a -well-set table with a wineglass in his hand, listening to a -toast in his honor. The lower left corner was occupied by a -halo of light from a shiny pate; and to his side, gazing up at -him with admiration, sat a very young and very pretty Aunt -Vaina. I tried surreptitiously to gauge the thickness of the -album by feel. - "Ah, here is the general on vacation." - Even on vacation, the general remained an eagle. With his -feet planted well apart, he stood an the beach sporting -tiger-stripe trunks, as he scanned the misty horizon through a -pair of binoculars. At his feet a child of three or four was -digging in the sand. The general was wiry and muscular. -Croutons and cream did not spoil his figure. I started to wind -my watch noisily. - "And here..." began Aunt Vaina, turning the page, but at -this point, a short portly man entered the room without -knocking. His face and in particular his dress seemed strangely -familiar. - "Good morning," he enunciated, bending his smooth smiling -face slightly sideways. - It was my erstwhile customs man, still in the same white -uniform with the silver buttons and the silver braid on the -shoulders. - "Ah! Pete!" said Aunt Vaina. "Here you are already. -Please, let me introduce you. Ivan, this is Pete, a friend of -the family." - The customs man turned toward me without recognition, -briefly inclined his head, and clicked his heels. Aunt Vaina -laid the album in my lap and got up. - "Have a seat, Pete," she said. "I will bring some cream." - Pete clicked his heels once more and sat down by me. - "This should interest you," I said, transferring the album -to his lap. "Here is Major General Tuur. In mufti." A strange -expression appeared on the face of the customs man. "And here -is the major general on maneuvers. You see? And here --" - "Thank you," said the customs man raggedly. "Don't exert -yourself, because --" - Aunt Vaina returned with cream and croutons. From as far -back as the doorway, she said, "How nice to see a man in -uniform! Isn't that right, Ivan?" - The cream for Pete was in a special cup with the monogram -"T" surrounded by four stars. - "It rained last night, so it must have been cloudy. I -know, because I woke up, and now there is not a cloud in the -sky. Another cup, Ivan?" - I got up. - 'Thank you, I'm quite full. If you'll excuse me, I must -take my leave. I have a business appointment," - Carefully closing the door behind me, I heard the widow -say, "Don't you find an extraordinary resemblance between him -and Staff Major Polom?" - In the bedroom, I unpacked the suitcase and transferred -the clothing to the wall closet, and again rang Rimeyer. Again -no one answered. So I sat down at the desk and set to exploring -the drawers. One contained a portable typewriter, another a set -of writing paper and an empty bottle of grease for arrhythmic -motors. The rest was empty, if you didn't count bundles of -crumpled receipts, a broken fountain pen, and a carelessly -folded sheet of paper, decorated with doodled faces. I unfolded -the sheet. Apparently it was the draft of a telegram. - "Green died while with the Fishers receive body Sunday -with condolences Hugger Martha boys." I read the writing twice, -turned the sheet over and studied the faces, and read for the -third time. Obviously Hugger and Martha were not informed that -normal people notifying of death first of all tell how and why -a person died and not whom he was with when he died. I would -have written, "Green drowned while fishing." Probably in a -drunken stupor. By the way, what address did I have now? - I returned to the hall. A small boy in short pants -squatted in the doorway to the landlord's half. Clamping a long -silvery tube under an armpit, he was panting and wheezing and -hurriedly unwinding a tangle of string. I went up to him and -said, "Hi." - My reflexes are not what they used to be, but still I -managed to duck a long black stream which whizzed by my ear and -splashed against the wall. I regarded the boy with astonishment -while he stared at me, lying on his side and holding the tube -in front of him. His face was damp and his mouth twisted and -open. I turned to look at the wall. The stuff was oozing down. -I looked at the boy again. He was getting up slowly, without -lowering the tube. - "Well, well, brother, you are nervous!" said I. - "Stand where you are," said the boy in a hoarse voice." I -did not say your name." - "To say the least," said I. "You did not even mention -yours, and you fire at me like I was a dummy." - "Stand where you are," repeated the boy, "and don't move." -He backed and suddenly blurted in rapid fire, "Hence from my -hair, hence from my bones, hence from my flesh." - "I cannot," I said. I was still trying to understand -whether he was playing or was really afraid of me. - "Why not?" said the boy. "I am saying everything right." - "I can't go without moving," I said. "I am standing where -I am." - His mouth fell open again. - "Hugger: I say to you -- Hugger -- begone!" he said -uncertainly. - "Why Hugger?" I said. "My name is Ivan; you confuse me -with somebody else." - The boy closed his eyes and advanced upon me, holding the -tube in front of him. - "I surrender," I warned. "Be careful not to fire." - When the tube dented my midriff he stopped and, dropping -it, suddenly went limp, letting his hands fall. I bent over and -looked him in the face. Now he was brick-red. I picked up the -tube. It was something like a toy rifle, with a convenient -checkered grip and a flat rectangular flask which was inserted -from below, like a clip. - "What kind of gadget is this?" I asked. - "A splotcher," he said gloomily. "Give it back." - I gave him back the toy. - "A splotcher," I said, "with which you splotch. And what -if you had hit me?" I looked at the wall. "Fine thing. Now you -won't get it off inside of a year. You'll have to get the wall -changed." - The boy looked up at me suspiciously. "But it's Splotchy," -he said. - "Really -- and I thought it was lemonade." - His face finally acquired a normal hue and demonstrated an -obvious resemblance to the manly features of Major General -Tuur. - "No, no, it's Splotchy." - "So?" - "It will dry up." - "And then it's really hopeless?" - "Of course not. There will simply be nothing left." - "Hmm," said I, with reservation. "However, you know best. -Let us hope so. But I am still glad that there will be nothing -left on the wall instead of on my face. What's your name?" - "Siegfried." - "And after you give it some thought?" - He gave me a long look. - "Lucifer." - "What?" - "Lucifer." - "Lucifer," said I. "Belial, Ahriman, Beelzebub, and -Azrael. How about something a little shorter? It's very -inconvenient to call for help to someone with a name like -Lucifer." - "But the doors are closed," he said and backed one step. -His face paled again. - "So what?" - He did not respond but continued to back until he reached -the wall and began to sidle along it without taking his eyes -off me. It finally dawned on me that he took me for a murderer -or a thief and. that he wanted to escape. But for some reason -he did not call for help and went by his mother's door, -continuing toward the house exit. - "Siegfried," said I, "Siegfried, Lucifer, you are a -terrible coward. Who do you think I am?" I didn't move but only -Turned to keep facing him. "I am your new boarder; your mother -has just fed me croutons and cream and you go and fire at me -and almost splotched me, and now you are afraid of me. It is I -who should be afraid of you." - All this was very much reminiscent of a scene in the -boarding school in Anyudinsk, when they brought me a boy just -like this one, the son of a sect member. Hell's bells, do I -really look so much the gangster? - "You remind me of Chuchundra the Muskrat," I said, "who -spent his life crying because he could not come out into the -middle of the room. Your nose is blue from fear, your ears are -freezing, and your pants are wet so that you are trailing a -small stream...." - In such cases it makes absolutely no difference what is -said. It is important to speak calmly and not to make sudden -movements. The expression on his face did not change, but when -I spoke about the stream, he moved his eyes momentarily to take -a look. But only for a second. Then he jumped toward the door, -fluttering for a second at the latch, and flew outside, dirty -bottoms of his sandals flying. I went out after him. - He stood in the lilac bush, so that all I could see was -his pale face. Like a fleeing cat looking momentarily over its -shoulder. - "Okay, okay," said I. "Would you please explain to me what -I must do? I have to send home my new address. The address of -this house where I am now living." He regarded me in silence. -"I don't feel right going to your mother -- in the first place, -she has guests, and in the second--" - "Seventy-eight, Second Waterway," he said. - Slowly I sat down on the steps. There was a distance of -some ten meters between us. - 'That's quite a voice you have," I said confidentially. -"Just like my friend the barman's at Mirza-Charles." - "When did you arrive?" said he. - "Well, let's see." I looked at my watch, "About an hour -and a half ago." - "Before you there was another one," he said, looking -sideways. "He was a rat-fink. He gave me striped swimming -trunks, and when I went in the water, they melted away." - "Ouch!" I said. "That is really a monster of some sort and -not a human -- he should have been drowned in Splotchy." - "Didn't have time -- I was going to, but he went away." - "Was it that same Hugger with Martha and the boys?" - "No -- where did you get that idea? Hugger came later." - "Also a rat-fink?" - He didn't answer. I leaned back against the wall and -contemplated the street. A car jerkily backed out of the -opposite driveway, back and forthed, and roared off. -Immediately it was followed by another just such a car. There -was the pungent smell of gasoline. Then cars followed one after -another, until my eyes blurred. Several helis appeared in the -sky. They were the so-called silent helis, but they flew -relatively low, and while they flew, it was difficult to talk. -In any case, the boy was apparently not going to talk. But he -wasn't going to leave, either. He was doing something with his -splotcher in the bushes and was glancing at me now and then. I -was hoping he wasn't going to splotch me again. The helis kept -going and going, and the cars kept swishing and swishing, as -though all the fifteen thousand cars were speeding by on Second -Waterway, and all the five hundred helis were hung over Number -78. The whole thing lasted about ten minutes, and the boy -seemed to cease paying attention to me while I sat and wondered -what questions I should ask of Rimeyer. Then everything -returned to its previous state, the smell of exhaust was gone, -the sky was cleared. - "Where are they all going -- all at once?" I asked. - "Don't you know?" - "How would I know?" - "I don't know either, but somehow you knew about Hugger." - "About Hugger," I said. "I know about Hugger quite -accidentally. And about you I know nothing at all... how you -live and what you do. For instance, what are you doing now?" - "The safeguard is broken." - "Well then, give it to me, I'll fix it. Why are you afraid -of me? Do I look like a rat-fink?" - "They all drove off to work," he said. - "You sure go to work late. It's practically dinnertime -already. Do you know the Hotel Olympic?" - "Of course I know." - "Would you walk me there?" - He hesitated. - "No." - "Why not?" I asked. - "School is about to end -- I must be going home." - "Aha! So that's the way of it," said I. "You are playing -hookey, or ditching it, as we used to say. What grade are you -in?" - "Third." - "I used to be in third grade, too," I said. - He came a bit out of the bushes. - "And then?" - "Then I was in the fourth." I got up. "Well, okay. Talk -you won't, go for a walk you won't, and your pants are wet, so -I am going back in. You won't even tell me your name." - He looked at me in silence and breathed heavily through -his mouth. I went back to my quarters. The cream-colored hall -was irreparably disfigured, it seemed to me. The huge black -clot was not drying. Somebody is going to get it today, I -thought. A ball of string was underfoot. I picked it up. The -end of the string was tied to the landlady's half-doorknob. So, -I thought, this too is clear. I untied the string and put the -ball in my pocket. - In the study, I got a clean sheet of paper from the desk -and composed a telegram to Matia. "Arrived safely, 78 Second -Waterway. Kisses. Ivan." I telephoned it to the local PT&T and -again dialed Rimeyer's number. Again there was no answer. I put -on my jacket, looked in the mirror, counted my money, and was -about to set out when I saw that the door to the living room -was open and an eye was visible through the crack. Naturally, I -gave no sign. I carefully completed the inspection of my -clothing, returned to the bathroom, and vacuumed myself for a -while, whistling away merrily. When I returned to the study, -the mouse-eared head sticking through the half-open door -immediately vanished. Only the silvery tube of the splotcher -continued to protrude. Sitting down in the chair, I opened and -closed all the twelve drawers, including the secret one, and -only then looked at the door. The boy stood framed in it. - "My name is Len," he announced. - "Greetings, Len," I said absent-mindedly. "I am called -Ivan. Come on in -- although I was going out to have dinner. -You haven't had dinner yet?" - "No." - "That's good. Go ask your mother's permission and we'll be -off " - "It's too early," he said. - "What's too early? To have dinner?" - "No, to go. School doesn't end for another twenty -minutes." He was silent again. "Besides, there's that fat fink -with the braid." - "He's a bad one?' I asked. - "Yeah," said Len. "Are you really leaving now?" - "Yes, I am," I said, and took the ball of string from my -pocket. "Here, take it. And what if Mother comes out first?" - He shrugged. - "If you are really leaving," he said, "would it be all -right if I stayed in your place?" - "Go ahead, stay." - "There's nobody else here?" - "Nobody." - He still didn't come to me to take the string, but let me -come to him, and even allowed me to take his ear. It was indeed -cold. I ruffled his head lightly and pushed him toward the -table. - "Go sit all you want. I won't be back soon." - "I'll take a snooze," said Len. - -

    Chapter THREE

- - The Hotel Olympic was a fifteen-story red-and-black -structure. Half the plaza in front of it was covered with cars, -and in its center stood a monument surrounded by a small -flowerbed. It represented a man with a proudly raised head. -Detouring the monument, I suddenly realized that I knew the -man. In puzzlement I stopped and examined it more thoroughly. -There was no doubt about it. There in front of Hotel Olympic, -in a funny old-fashioned suit with his hand resting on an -incomprehensible apparatus which I almost took for the -extension of the abstract-styled base, and with his eyes -staring at infinity through contemptuously squinting lids, was -none other than Vladimir Sergeyevitch Yurkovsky. Carved in gold -letters on the base was the legend "Vladimir Yurkovsky, -December 5, Year of the Scales." - I couldn't believe it, because they do not raise monuments -to Yurkovskys. While they live, they are appointed to more or -less responsible positions, they are honored at jubilees, they -are elected to membership in academies. They are rewarded with -medals and are honored with international prizes, and when they -die or perish; they are the subjects of books, quotations, -references, but always less and less often as time passes, and -finally they are forgotten altogether. They depart the halls of -memory and linger on only in books. Vladimir Sergeyevitch was a -general of the sciences and a remarkable man. But it is not -possible to erect monuments to all generals and all remarkable -men, especially in countries to which they had no direct -relationship and in cities where if they did visit, it was only -temporarily. In any case, in that Year of the Scales, which is -of significance only to them, he was not even a general. In -March he was, jointly with Dauge, completing the investigation -of the Amorphous Spot on Uranus. That was when the sounding -probe blew up and we all got a dose in the work section -- and -when we got back to the Planet in September, he was all spotted -with lilac blotches, mad at the world, promising himself that -he would take time out to swim and get sunburned and then get -right back to the design of a new probe because the old one was -trash.... I looked at the hotel again to reassure myself. The -only out was to assume that the life of the town was in some -mysterious and potent manner highly dependent on the Amorphous -Spot on Uranus. Yurkovsky continued to smile with snobbish -superiority. Generally, the sculpture was quite good, but I -could not figure out what it was he was leaning on. The -apparatus didn't look like the probe. - Something hissed by my ear. I turned and involuntarily -sprang back. Beside me, staring dully at the monument base, was -a tall gaunt individual closely encased from head to foot in -some sort of gray scaly material and with a bulky cubical -helmet around his head. The face was obscured behind a glass -plate with holes, from which smoke issued in synchronism with -his breathing. The wasted visage behind the plate was covered -with perspiration and the cheeks twitched in frantic tempo. At -first I took him for a Wanderer, then I thought that he was a -tourist executing a curative routine, and only finally did I -realize that I was looking at an Arter. - "Excuse me," I said "Could you please tell me what sort of -monument this is?" - The damp face contorted more desperately. "What?" came the -dull response from inside the helmet. - I bent down. - "I am inquiring: what is this monument?" - The man glared at the statue. The smoke came thicker out -of the holes. There was more powerful hissing. - "Vladimir Yurkovsky," he read, "Fifth of December, Year of -the Scales... aha... December... so -- it must be some German." - "And who put up the monument?" - "I don't know," said the man. "But it's written down right -there. What's it to you?" - "I was an acquaintance of his," I explained. - "Well then, why do you ask? Ask the man himself." - "He is dead." - "Aah... Maybe they buried him here?" - "No," I said, "he is buried far away." - "Where?" - "Far away. What's that thing he is holding?" - "What thing? It's an eroula." - "What?" - "I said, an eroula. An electronic roulette."- - My eyes popped. - "What's a roulette doing here?" - "Where?" - "Here, on the statue." - "I don't know," said the man after some thought. "Maybe -your friend invented it?" - "Hardly," said I. "He worked in a different field." - "What was that?" - "He was a planetologist and an interplanetary pilot." - "Aah... well, if he invented it, that was bully for him. -It's a useful thing. I should remember it: Yurkovsky, Vladimir. -He must have been a brainy German." - "I doubt he invented it," I said. "I repeat -- he was an -interplanetary pilot." - The man stared at me. - "Well, if he didn't invent it, then why is he standing -with it?" - "That's the point," I said. "I am amazed myself." - "You are a damn liar," said the man suddenly. "You lie and -you don't even know why you are lying. It's early morning, and -he is stoned already.... Alcoholic!" - He turned away and shuffled off, dragging his thin legs -and hissing loudly. I shrugged my shoulders, took a last look -at Vladimir Sergeyevitch, and set off toward the hotel, across -the huge plaza. - The gigantic doorman swung the door open for me and -sounded an energetic welcome. - I stopped. - "Would you be so kind," said I. "Do you know what that -monument is?" - The doorman looked toward the plaza over my head. His face -registered confusion. - "Isn't that written on it?" - "There is a legend," I said. "But who put it up and why?" - The doorman shuffled his feet. - "I beg your pardon," he said guiltily, "I just can't -answer - your question. The monument has been there a long time, -while I came here very recently. I don't wish to misinform you. -Maybe the porter..." - I sighed. - "Well, don't worry about it. Where is a telephone?" - "To your right, if you please," he said looking delighted. - A porter started out in my direction, but I shook my head -and picked up the receiver and dialed Rimeyer's number. This -time I got a busy signal. I went to the elevator and up to the -ninth floor. - Rimeyer, looking untypically fleshy, met me in a dressing -gown, out of which stuck legs in pants and with shoes on. The -room stank of cigarette smoke and the ashtray was full of -butts. There was a general air of chaos in the whole suite. One -of the armchairs was knocked over, a woman's slip was lying -crumpled on the couch, and a whole battery of empty bottles -glinted under the table. - "What can I do for you?" asked Rimeyer with a touch of -hostility, looking at my chin. Apparently he was recently out -of his bathroom, and his sparse colorless hair was wet against -his long skull. I handed him my card in silence. Rimeyer read -it slowly and attentively, shoved it in his pocket, and -continuing to look at my chin, said, "Sit down." - I sat. - "It is most unfortunate. I am devilishly busy and don't -have a minute's time." - "I called you several times today," said I. - "I just got back. What's your name?" - "Ivan." - "And your last name?" - "Zhilin." - "You see, Zhilin, to make it short, I have to get dressed -and leave again." He was silent awhile, rubbing his flabby -cheeks. "Anyway there's not much to talk about.... However, if -you wish, you can sit here and wait for me. If I don't return -in an hour, come back tomorrow at twelve. And leave your -telephone number and address, write it down right on the table -there...." - He threw off the bathrobe, and dragging it along, walked -off into the adjoining room. - "In the meantime," he continued, "you can see the town, -and a miserable little town it is.... But you'll have to do it -in any case. As for me, I am sick to my stomach of it." - He returned adjusting his tie. His hands were trembling, -and the skin on his face looked gray and wilted. Suddenly I -felt that I did not trust him -- the sight of him was -repellent, like that of a neglected sick man. - "You look poorly," I said. "You have changed a great -deal." - For the first time he looked me in the eyes. - "And how would you know what I was like before?" - "I saw you at Matia's. You smoke a lot, Rimeyer, and -tobacco is saturated regularly with all kinds of trash -nowadays." - "Tobacco -- that's a lot of nonsense," he said with sudden -irritation. "Here everything is saturated with all kinds of -tripe.... But perhaps you may be right, probably I should -quit." He pulled on his jacket slowly; "Time to quit, and in -any case, I shouldn't have started." - "How is the work coming along?" - "It could be worse. And unusually absorbing work it is." -He smiled in a peculiar unpleasant way. "I am going now, as -they are waiting for me and I am late. So, till an hour from -now, or until tomorrow at twelve." - He nodded to me and left. - I wrote my address and telephone number on the table, and -as my foot plowed into the mass of bottles underneath, I -couldn't help but think that the work was indeed absorbing. I -called room service and requested a chambermaid to clean up the -room. The most polite of voices replied that the occupant of -the suite categorically forbade service personnel to enter his -room during his absence and had repeated the prohibition just -now on leaving the hotel. "Aha," I said, and hung up. This -didn't sit well with me. For myself, I never issue such -directions and have never hidden even my notebooks, not from -anyone. It's stupid to work at deception and much better to -drink less. I picked up the overturned armchair, sat down, and -prepared for a long wait, trying to overcome a sense of -displeasure and disappointment. - I didn't have to wait for long. After some ten minutes, -the door opened a crack and a pretty face protruded into the -room. - "Hey there," it pronounced huskily. "Is Rimeyer in?" - "Rimeyer is not in, but you can come in anyway." - She hesitated, examining me. Apparently she had no -intention of coming in, but was just saying hello, in passing. - "Come in, come in," said I. "I have nothing to do." - She entered with a light dancing gait, and putting her -arms akimbo, stood in front of me. She had a short turned-up -nose and a disheveled boyish hairdo. The hair was red, the -shorts crimson, and the blouse a bright yolk yellow. A colorful -woman and quite attractive. She must have been about -twenty-five. - "You wait -- right?" - Her eyes were unnaturally bright and she smelled of wine, -tobacco, and perfume. - She collapsed on the hassock and flung her legs up on the -telephone table. - "Throw a cigarette to a working girl," she said. "It's -five hours since I had one." - "I don't smoke. Shall I ring for some?" - "Good Lord, another sad sack! Never mind the phone .. or -that dame will show up again. Rummage around in the ashtray and -find me a good long butt." - The ashtray did have a lot of long butts. - 'They all have lipstick on them," said I. - "That's all right; it's my lipstick. What's your name?" - "Ivan." - She snapped a lighter and lit up. - "And mine is Ilina. Are you a foreigner, too? All you -foreigners seem so wide. What are you doing here?"' - "Waiting for Rimeyer." - "I don't mean that! What brought you here, are you -escaping from your wife?" - "I am not married," I said quietly. "I came to write a -book." - "A book? Some friends this Rimeyer has. He came to write a -book. Sex Problems of Impotent Sportsmen. How's your -situation with the sex problem?" - "It is not a problem to me," I said mildly. "And how about -you?" - She lowered her legs from the table. - "That's a no-no. Take it slow. This isn't Paris, you know. -All in good time. Anyway, you should have your locks cut -- -sitting there like a perch." - "Like a who?" I was very patient as I had another -forty-five minutes to wait. - "Like a perch. You know the type." She made vague motions -around her ears. - "I don't know about that," I said. "I don't know anything -yet as I have just arrived. Tell me about it, it sounds -interesting." - "Oh no! Not I! We don't chatter. Our bit is a small one -- -serve, clean up, flash your teeth, and keep quiet. Professional -secret. Have you heard of such an animal?" - "I've heard," I said. "But who's 'we' -- an association of -doctors? - For some reason, she thought this was hilarious. - "Doctors! Imagine that." She laughed. "Well, wise guy, -you're all right -- quite a tongue. We have one in the once -like you. One word, and we're all rolling in the aisles. -Whenever we cater to the Fishers, he always gets the job, they -like a good laugh." - "Who doesn't?" said I. - "Well, you are wrong. The Intels, for instance, chased him -out. 'Take the fool away,' they said. Or also recently those -pregnant males." - "Who?"' - "The sad ones. Well, I can see you don't understand a -thing. Where in heaven's name did you come from?" - "From Vienna." - "So -- don't you have the sad ones in Vienna?" - "You couldn't imagine what we don't have in Vienna." - "Could be you don't even have irregular meetings?" - "No, we don't have them. All our meetings are regular, -like a bus schedule." - She was having a good time. - "Perhaps you don't have waitresses either?" - "Waitresses we do have, and you can find some excellent -examples. Are you a waitress then?" - She jumped up abruptly. - "That won't do at all," she cried. "I've had enough sad -ones for today. Now you're going to have a loving cup with me -like a good fellow...." She began to search furiously among the -bottles by the window. "Damn him, they're all empty! Could be -you're a teetotaler? Aha, here's a little vermouth. You drink -that, or shall we order whiskey?" - "Let's begin with the vermouth," said I. - She banged the bottle on the table and took two glasses -from the window sill. - "Have to wash them. Hold on a minute, everything's full of -garbage." She went into the bathroom and continued to speak -from there. "If you turned out to be a teetotaler on top of -everything else. I don't know what I would do with you.... What -a pigsty he's got in his bathroom -- I love it! Where are you -staying? Here too?" - "No, in town," I replied. "On Second Waterway." - She came back with the glasses. - "Straight or with water?" - "Straight, I guess." - "All foreigners take it straight. But we have it with -water for some reason." She sat on my armchair and put her arms -around my shoulders. We drank and kissed without any feeling. -Her lips were heavily lipsticked, and her eyelids were heavy -from lack of sleep and fatigue. She put down her glass, -searched out another butt in the ashtray, and returned to the -hassock. - "Where is that Rimeyer?" she said. "After all, how long -can you wait for him? Have you known him a long time?" - "No, not very." - "I think maybe he is a louse," she said with sudden ire. -"He's dug everything out of me, and now he plays hard to get. -He doesn't open his door, the animal, and you can't get through -to him by phone. Say, he wouldn't be a spy, would he?" - "What do you mean, a spy?" - "Oh, there's loads of them.... From the Association for -Sobriety and Morality.... The Connoisseurs and Appraisers are -also a bad lot...." - "No, Rimeyer is a decent sort," I said with some effort. - "Decent... you are all decent. In the beginning, Rimeyer -too was decent, so good-natured and full of fun... and now he -looks at you like a croc." - "Poor fellow," I said. "He must have remembered his family -and become ashamed of himself." - "He doesn't have a family. Anyway, the heck with him! Have -another drink?" - We had another drink. She lay down and put her hands over -her head. Finally she spoke. - "Don't let it get to you. Spit on it! Wine we have enough -of, we'll dance, go to the shivers. Tomorrow there's a football -game, we'll bet on the Bulls." - "I am not letting it get to me. If you want to bet on the -Bulls, we'd bet on the Bulls." - "Oh those Bulls! They are some boys! I could watch them -forever, arms like iron, snuggling up against them is just like -snuggling against a tree trunk, really!" - There was a knock on the door. - "Come in!" yelled Ilina. - A man entered and stopped at once. He was tall and bony, -of middle age, with a brush mustache and light protruding eyes. - "I beg your pardon, I was looking for Rimeyer," he said. - "Everyone here wants to see Rimeyer," said Ilina. "Have a -chair and we'll all wait together." - The stranger bowed his head and sat down by the table, -crossing his legs. - Apparently he had been here before. He did not look -around, but stared at the wall directly in front of him. -However, perhaps he just was not a curious type. In any case, -it was clear that neither I nor Ilina was of any interest to -him. This seemed unnatural to me, since I felt that such a pair -as myself and Ilina should arouse interest in any normal -person. Ilina raised up on her elbow and scrutinized him in -detail. - "I have seen you somewhere," she said. - "Really?" said the stranger coldly. - "What's your name?" - "Oscar. I am Rimeyer's friend." - "That's fine," said Ilina. She was obviously irritated by -the stranger's indifference, but she kept herself in check. -"He's also a friend of Rimeyer." She stuck her finger at me. -"You know each other?" - "No," said. Oscar, continuing to look at the wall. - "My name is Ivan," said I. "And this is Rimeyer's friend, -Ilina. We just drank to our fraternal friendship." - Oscar glanced indifferently in Ilina's direction and -nodded his head politely. Ilina picked up the bottle without -taking her eyes off him. - "There's still a little left here," she said. "Would you -like a drink, Oscar?" - "No, thank you," he said, coldly. - "To fraternal friendship!" said Ilina. "No? You don't want -to? Too bad!" - She splashed some wine in my glass, poured the rest in -hers, and downed it at once. - "Never in my life would I have thought that Rimeyer could -have friends who refuse a drink. Still, I have seen you -somewhere before." - Oscar shrugged his shoulders. - "I doubt it," he said. - Ilina was visibly becoming enraged. - "Some sort of a fink," she said to me loudly. "Say there, -Oscar, you wouldn't be an Intel?" - "No." - "What do you mean, no?" said Ilina. "You're the one who -had a set-to with that baldy Leiz at the Weasel, broke a -mirror, and had your face slapped by Mody." - The stone visage of Oscar grew a shade pinker. - "I assure you," he said courteously, "I am not an Intel -and have never in my life been in the Weasel." - "Are you saying that I'm a liar?" said Ilina - At this point I took the bottle off the table and put it -under my armchair, just in case. - "I am a visitor," said Oscar. "A tourist." - "When did you arrive?" I said to discharge the tension. - "Very recently," replied Oscar. He continued to gaze at -the wall. Obviously here was a man with iron discipline. - "Oh, oh!" said Ilina suddenly. "Now I remember! I got it -all mixed up." - She burst out laughing, "Of course you're no Intel! You -were at our office the day before last. You're the salesman who -offered our manager some junk like... 'Dugong' or 'Dupont..." - "Devon," I prompted. "There is a repellent called Devon." - Oscar smiled for the first time. - "You are quite right, of course," he said. "But I am not a -salesman. I was only doing a favor for a relative." - "That's different," said Ilina and jumped up. "You should -have said so. Ivan, we all need to drink to a pledge of -friendship. I'll call... no, I'll go get it myself. You two can -have a talk, I'll be right back." - She ran out of the room, banging the door. - "A fun girl," said I. - "Yes, extremely. You live here?" - "No, I'm a traveler, too.... What a strange idea your -relative had!" - "What do you have in mind?" - "Who needs Devon in a resort town?" - Oscar shrugged. - "It's hard for me to judge; I'm no chemist. But you will -agree that it's hard for us to comprehend the actions of our -fellow men, much less their fancies.... So Devon turns out to -be - What did you call it, a res...?" - "Repellent," I said. - "That would be for mosquitoes?" - "Not so much for as against." - "I can see you are quite well up on it," said Oscar. - "I had occasion to use it." - "Well, well." - What the devil, thought I. What is he getting at? He was -no longer staring at the wall He was looking me straight in the -eyes and smiling. But if he was going to say something, it was -already said. - He got up. - "I don't think I'll wait any longer," he pronounced. "It -looks like I'll have to drink another pledge. But I didn't come -here to drink, I came here to get well. Please tell Rimeyer -that I will call him again tonight. You won't forget?" - "No," I said, "I won't forget. If I tell him that Oscar -was in to see him, he will know whom I am talking about?" - "Yes, of course. It's my real name." - He bowed, and walked out at a deliberate pace, -ramrod-straight and somehow unnatural-looking. I dipped my hand -in the ashtray, found a butt without lipstick, and inhaled -several times. I didn't like the taste and put out the stub. I -didn't like Oscar, either. Nor Ilina. And especially Rimeyer -- -I didn't like him at all. I pawed through the bottles, but they -were all empty. - -

    Chapter FOUR

- - In the end I didn't wait long enough to see Rimeyer. Ilina -never came back. Finally I got tired of sitting in the smoky, -stale atmosphere of the room and went down to the lobby. I -intended to have dinner and stopped to look around for a -restaurant. A porter immediately materialized at my side. - "At your service," he murmured discreetly. "An auto? Bar? -Restaurant? Salon?" - "What kind of salon?" I asked, my curiosity piqued. - "A hair-styling salon." He looked at my hairdo with -delicate concern. "Master Gaoway is receiving today. I -recommend him most strenuously." - I recollected that Ilina had called me a disheveled perch -and said, "Well, all right." - "Please follow me," said the porter. - Crossing the lobby, he opened a wide low door and said -into the spacious interior, "Excuse me, Master, you have a -client." - "Come in," replied a quiet voice. - I entered. The salon was light and airy and smelled -pleasantly. Everything in it shone -- the chrome, the mirrors, -the antique parquet floor. Shiny half-domes hung from the -ceiling on glistening rods. In the center stood a huge white -barber chair. The Master was advancing to meet me. He had -penetrating immobile eyes, a hooked nose, and a gray Van Dyke. -More than anything else he reminded me of a mature, experienced -surgeon. I greeted him with some timidity, He nodded and, -surveying me from head to foot, began to circle around me. I -began to feel uncomfortable. - "I would like you to bring me up to the current fashion," -said I, trying not to let him out of my field of view. - But he restrained me gently by my sleeve and. stood -breathing softly behind my back for a few seconds. "No doubt! -No doubt at all", he murmured, then touched me lightly on my -shoulder. "Please," he said sternly, "take a few steps forward --- five or six -- then turn abruptly to face me." - I obeyed. He regarded me pensively, pulling on his beard. -I thought he was hesitating. - "On the other hand," he said, "sit down." - "Where?" I said. - "In the chair, in the chair." - I lowered myself into its softness and watched him -approach me slowly. His intelligent face was suddenly suffused -with a look of profound chagrin. - "But how is such a thing possible?" he said. "It's -absolutely awful." - I couldn't find anything to say. - "Gross disharmony," he muttered. "Repulsive... repulsive." - "Is it really that bad?" I asked. - "I don't understand why you came to me," he said, "since -you obviously don't place any value at all on your appearance." - "I am beginning to, from this day on," I said. - He waved his hand. - "Never mind... I will work on you, but..." He shook his -head, turned impulsively, and went to a high table covered with -shiny devices. The back of the chair depressed smoothly, and I -found myself in a half-reclining position. A big hemisphere -descended toward me from above, radiating warmth, while -hundreds of tiny needles seemed to sink into the nape of my -neck, eliciting a strange combination of simultaneous pain and -pleasure. - "Is it gone yet?" he asked. - The sensation abated. - "It's gone," I said. - "Your skin is good," growled the Master with a certain -satisfaction. - He returned with an assortment of the most unlikely -instruments and proceeded to palpate my cheeks. - "And still Mirosa married him," he said suddenly. "I -expected anything and everything, except that. After all that -Levant had done for her. Do you remember that moment when they -were both weeping over the dying Pina? You could have bet -anything that they would be together forever. And now, imagine, -she is being wed to that literary fellow." - I have a rule: to pick up and sustain any conversation -that comes along. When you don't know what it's all about, this -can even be interesting. - "Not for long," I said with assurance. "Literary types are -very inconstant, I can assure you, being one myself." - For a moment his hands paused on my temples. - "That didn't enter my head," he admitted. "Still, it's -wedlock, even though only a civil one.... I must remember to -call my wife. She was very upset." - "I can sympathize with her," I said. "But it did always -seem to me that Levant was in love with that... Pina." - "In love?" exclaimed the Master, coming around from my -other side. "Of course he loved her! Madly! As only a lonely, -rejected-by-all man can love." - "And so it was quite natural that after the death of Pina, -he sought consolation with her best friend." - "Her bosom friend, yes," said the Master approvingly, -while tickling me behind the ear. "Mirosa adored Pina! It's a -very accurate term -- bosom friend! One senses a literary man -in you at once! And Pina, too, adored Mirosa." - "But, you notice," I picked up, "that. right from the -beginning Pina suspected that Mirosa was infatuated with -Levant." - "Well, of course! They are extremely sensitive about such -things. This was clear to everyone -- my wife noticed it at -once. I recollect that she would nudge me with her elbow each -time Pina alighted on Mirosa's tousled head, and so coyly and -expectantly looked at Levant." - This time I kept my peace. - "In general, I am profoundly convinced," he continued, -"that birds feel no less sensitively than people." - Aha, thought I, and said, "I don't know about birds in -general, but Pina was a lot more sensitive than let's say even -you or I." - Something bummed briefly over my head, and there was a -soft clink of metal. - "You speak like my wife, word for word," observed the -Master, "so you most probably must like Dan. I was overcome -when he was able to construct a bunkin for that Japanese -noblewoman... can't think of her name. After all, not one -person believed Dan. The Japanese king, himself..." - "I beg your pardon," I said. "A bunkin?" - "Yes, of course, you are not a specialist.... You remember -that moment when the Japanese noblewoman comes out of prison. -Her hair, in a high roller of blond hair, is ornamented with -precious combs..." - "Aah," I guessed. "It's a coiffure." - "Yes, it even became fashionable for a time last year. -Although a true bunkin could be made by a very few... even as a -real chignon, by the way. And, of course, no one could believe -that Dan, with his burned hands and half-blind .. Do you -remember how he was blinded?" - "It was overpowering," I said. - "Oh yes, Dan was a true Master. To make a bunkin without -electro-preparation, without biodevelopment... You know, I just -had a thought," he continued, and there was a note of -excitement in his voice. "It just struck me that Mirosa, after -she parts with that literary guy, should marry Dan and not -Levant. She will be wheeling him out on the veranda in his -chair, and they will be listening to the singing nightingales -in the moonlight -- the two of them together." - "And crying quietly out of sheer happiness," I said. - "Yes," the voice of the Master broke, "that would be only -right. Otherwise I just don't know, I just don't understand, -what all our struggles are for. No... we must insist. I'll go -to the union this very day...." - I kept quiet, again. The Master was breathing uneasily by -my ear. - "Let them go and shave at the automates," he said suddenly -in a vengeful tone, "let them look like plucked geese. We let -them have a taste once before of what it's like; now we'll see -how they appreciate it." - "I am afraid it won't be simple," I said cautiously, not --- having the vaguest idea of what this was about. - "We Masters are used to the complicated. It's not all that -simple -- when a fat and sweaty stuffed shirt comes to you, and -you have to make a human being out of him, or at the very best, -something which under normal circumstances does not differ too -much from a human being... is that simple? Remember what Dan -said: 'Woman gives birth to a human being once in nine months, -but we Masters have to do it every day.' Aren't those -magnificent words?" - "Dan was talking about barbers?" I said, just in case. - "Dan was talking about Masters. 'The beauty of the world -rests on our shoulders,' he would say. And again, do you -remember: 'In order to make a man out of an ape, Darwin had to -be an excellent Master.'" - I decided to capitulate and confess. - "This I don't remember." - "How long have you been watching 'Rose of the Salon'?" - "Well, I have arrived just recently." - "Aah, then you have missed a lot. My wife and I have been -watching the program for seven years, every Tuesday. We missed -only one show; I had an attack and lost consciousness. But in -the whole town there is only one man who hasn't missed even one -show -- Master Mille at the Central Salon." - He moved off a few paces, turned various colored lights on -and off, and resumed his work. - "The seventh year," he repeated. "And now -- can you -imagine -- the year before last they kill off Mirosa and throw -Levant into a Japanese prison for life, while Dan is burned at -the stake. Can you visualize that?" - "It's impossible," I said. "Dan? At the stake? Although -it's true that they burned Bruno at the stake, too." - "It's possible," he said with impatience. "In any case, it -became clear to us that they want to fold up the program fast. -But we didn't put up with that. We declared a strike and -struggled for three weeks. Mille and I picketed the barber -automates. And let me tell you that quite a lot of the -townspeople sympathized with us." - "I should think so," I said. "And what happened? Did you -win? - "As you see. They grasped very well what was involved, and -now the TV center knows with whom they are dealing. We didn't -give one step, and if need be, we won't. Anyway we can rest on -Tuesdays now just like in the old days -- for real." - "And the other days?" - "The other days we wait for Tuesday and try to guess what -is awaiting us and what you literary fellows will do for us. We -guess and make bets -- although we Masters don't have much -leisure." - "You have a large clientele?" - "No, that's not it. I mean homework. It's not difficult to -become a Master, it's difficult to remain one. There is a mass -of literature, lots of new methods, new applications, and you -have to keep up with it all and constantly experiment, -investigate and keep track of allied fields -- bionics, plastic -medicine, organic medicine. And with time, you accumulate -experience, and you get the urge to share your knowledge. So -Mille and I are writing our second book, and practically every -month, we have to update the manuscript. Everything becomes -obsolete right before your eyes. I am now completing a treatise -on a little-known characteristic of the naturally straight -nonplastic hair; and do you know I have practically no chance -of being the first? In our country alone, I know of three -Masters who are occupied with the same subject. It's only to be -expected -- the naturally straight nonplastic hair is a real -problem. It's considered to be absolutely -nonaestheticizable.... However, this may not be of interest to -you? You are a writer?" - "Yes," I said. - "Well, you know, during the strike, I had a chance to run -through a novel. That would not be yours, by any chance?" - "I don't know," I said, "What was it about?" - "Well, I couldn't say exactly.... Son quarrels with -father. He has a friend, an unpleasant fellow with a strange -name. He occupies himself by cutting up frogs." - "Can't remember," I lied -- poor Ivan Sergeyevitch. - "I can't remember either. It was some sort of nonsense. I -have a son, but he never quarrels with me, and he never -tortures animals -- except perhaps when he was a child" - He backed away again and made a slow circuit around me. -His eyes were burning; he seemed to be very pleased. - "It looks as though we can stop here," he said. - I got out of the chair. "Not bad. Not bad at all," -murmured the Master. I approached the mirror. He turned on -spotlights, which illuminated me from all sides so that there -were no shadows on my face. - In the first instant I did not notice anything unusual -about myself. It was my usual self. Then I felt that it was not -I at all. That it was something much better than I. A whole lot -better. Better looking than I. More benevolent than I. -Appreciably more significant than I. I experienced a sense of -shame, as though I were deliberately passing myself off as a -man to whom I couldn't hold a candle. - "How did you do this thing?" I said in a strangled tone. - "It's nothing," said the Master, smiling in a very special -way. "You turned out to be a fairly easy client, albeit quite -neglected." - I stood before the mirror like Narcissus and couldn't tear -myself away. Suddenly, I felt awed. The Master was a magician, -and an evil one at that, although he probably didn't realize it -himself. The mirror reflected an extremely attractive lie. An -intelligent, good-looking, monumental vapidity. Well, perhaps -not a total vacuum, for after all I didn't have that low an -opinion of myself. But the contrast was too great. All of my -inner world, everything I valued in myself -- all that could -just as well have not existed. It was no longer needed. I -looked at the Master. He was smiling. - "You have many clients?" I asked. - He did not grasp my meaning, but after all, I didn't -really want him to understand me. - "Don't worry," he replied, "I'll always work on you with -pleasure. The rawest material is the most intriguing." - "Thank you," said I, lowering my eyes so as not to see his -smile. "Thank you. Goodbye." - "Just don't forget to pay," he said placidly. "We Masters -value our work very highly." - "Yes, of course," I caught myself. "Naturally. How much do -I owe you?" - He stated how much I owed. - 'What?" said I regaining my equilibrium. - He repeated with satisfaction. - "Madness", I said forthrightly. - "Such is the price of beauty," he explained. "You came -here as an ordinary tourist, and you are leaving a king of this -domain." - "An impersonator is what I am leaving as," I muttered, -extracting the money. - "No, no, not that bad!" he said confidentially. "Even I -don't know that for sure. And even you are not convinced of it -entirely.... Two more dollars, please. Thank you. Here is 50 -pfennigs change. You don't mind pfennigs?" - I had nothing against pfennigs. I wanted to leave as fast -as possible. - I stood in the lobby for a while, becoming myself again, -and gazing at the metallic figure of Vladimir Sergeyevitch. -After all, all this is not new. After all, millions of people -are not what they pass themselves for. But the damnable barber -had made me over into an empiriocritic. Reality was masked with -gorgeous hieroglyphics. I no longer believed what I saw in this -city. The plaza covered with stereo-plastic was probably in -reality not beautiful at all. Under the elegant contours of the -autos lurked ominous and ugly shapes. And that beautiful -charming woman is no doubt in fact a repulsive malodorous -hyena, a promiscuous dull-witted sow. I closed my eyes and -shook my head. The old devil! - Two meticulously groomed oldsters stopped nearby and began -to debate heatedly the relative merits of baked pheasant -compared with pheasant broiled with feathers. They argued, -drooling saliva, smacking their lips and choking, snapping -their bony fingers under each other's noses. No Master could -help these two. They were Masters themselves and they made no -bones about it. At any rate, they restored my materialist -viewpoint. I went to a porter and inquired about a restaurant. - "Right in front of you," said he and smiled at the arguing -oldsters. "Any cuisine in the world." - I could have mistaken the entrance to the restaurant for -the gates to a botanical garden. I entered, parting the -branches of exotic trees, stepping alternately on soft grass -and coral flagstones. Unseen birds twittered in the luxuriant -greenery, and the discreet clatter of utensils was mixed with -the sound of conversation and laughter. A golden bird flew -right in front of my nose, barely able to carry the load of a -caviar tartine in its beak. - "I am at your service," said the deep velvety voice. - An imposing giant of a man with epaulettes stepped toward -me cut of a thicket. - "Dinner," I said curtly. I don't like maitres-d'hotel. - "Dinner," he said significantly. "In company? Separate -table?"' - "Separate table. On second thought..." - A notebook instantaneously appeared in his hand. - "A man of your age would be welcome at the table of - Mrs. and Miss Hamilton-Rey." - "Go on," I said. - "Father Geoffrois..." - "I would prefer an aborigine." - He turned the page. - "Opir, doctor of philosophy, just now has sat down at his -table." - "That's a possibility," said I. - He put away the book and led me along a path paved with -limestone slabs. Somewhere around us there were people eating, -talking, swishing seltzer. Hummingbirds darted like -multicolored bees in the leaves. The maitre-d'hotel inquired -respectfully, "How would you like to be introduced?" - "Ivan. Tourist and litterateur." - Doctor Opir was about fifty. I liked him at once because -he immediately and without any ceremony sent the maitre-d'hotel -packing after a waiter. He was pink and plump, and moved and -talked incessantly. - "Don't trouble yourself," he said when I reached. for the -menu. "It's all set already. Vodka, anchovies under egg -- we -call them pacifunties -- potato soup..." - "With sour cream," I interjected. - "Of course!... steamed sturgeon a la Astrakhan... a patty -of veal..." - "I would prefer pheasant baked in feathers." - "No -- don't; it's not the season... a slice of beef, eel -in sweet marinade." - "Coffee," I said. - "Cognac," he retorted. - "Coffee with cognac." - "All right, cognac and coffee with cognac. Some pale wine -with the fish and a good natural cigar." - Dinner with Doctor Opir turned out to be most congenial. -It was possible to eat, drink, and listen. Or not to listen. -Doctor Opir did not need a conversation. He required a -listener. I did not have to participate in the talking, I -didn't even supply any commentaries, while he orated with -enthusiastic delight, almost without interruption, waving his -fork, while plates and dishes nonetheless became empty in front -of him with mystifying speed. Never in my life have I met a man -who was so skilled in conversation while his mouth was so fully -packed and so busy masticating. - "Science! Her Majesty!" he exclaimed. "She matured long -and painfully, but her fruits turned out to be abundant and -sweet. Stop, Moment, you are beautiful! Hundreds of generations -were born, suffered, and died, and not one was impelled to -pronounce this incantation. We are singularly fortunate. We -were born in the greatest of epochs, the Epoch of the -Satisfaction of Desires. It may be that not everybody -understands this as yet, but ninety-nine percent of my fellow -citizens are already living in a world where, for all practical -purposes, a man can have all he can think of. O, Science! You -have finally freed mankind. You have given us and will -henceforth provide for us everything -- food -- wonderful food --- clothing of the best quality and in any quantity, and to -suit any taste! -- shelter -- magnificent shelter. Love, joy, -satisfaction, and for those desiring it, for those who are -fatigued by happiness -- tears, sweet tears, little saving -sorrows, pleasant consoling worries which lend us significance -in our own eyes.... Yes, we philosophers have maligned science -long and angrily. We called forth Luddites, to break up -machines, we cursed Einstein, who changed our whole universe, -we vilified Wiener, who impugned our godlike essence. Well, so -we really lost that godlike substance. Science robbed us of it. -But in return! In return, it launched men to the feasting -tables of Olympus. Aha! Here is the potato soup, that heavenly -porridge. No, no, do as I do... take this spoon, a touch of -vinegar... a dash of pepper... with the other spoon, this one -here, dip some sour cream and... no, no... gently, gently mix -it.... This too is a science, one of the most ancient, older in -any cue than the ubiquitous synthetic.... By the way, don't -fail to visit our synthesizers, Amalthea's Horn, Inc. You -wouldn't be a chemist? Oh yes, you are a litterateur! You -should write about it, the greatest mystery of our times, -beefsteaks out of thin air, asparagus from clay, truffles from -sawdust.... What a pity that Malthus is dead'! The whole world -would be laughing at him! Of course, he had certain reasons for -his pessimism. I am prepared to agree with those who consider -him a genius. But he was too ill-informed, he completely missed -the possibilities in the natural sciences. He was one of those -unlucky geniuses who discover laws of social development -precisely at that moment when these laws cease to operate. I am -genuinely sorry for him. The whole of humanity was but billions -of hungrily gaping mouths to him. He must have lost sleep from -the sheer horror of it. It is a truly monstrous nightmare -- a -billion gaping maws and not one head. I turned back and see -with bitterness how blind they were, the shakers of souls and -the masters of the minds of the recent past. Their awareness -was dimmed by unbroken horror. Social Darwinists! They saw only -the press of the struggle for survival: mobs of hunger-crazed -people, tearing each other to pieces for a place in the sun, as -though there was only that one single place, as though the sun -wasn't sufficient for all! And Nietzsche... maybe he was -suitable for the hungry slaves of the Pharaohs' times, with his -ominous sermons about the master race, with his supermen beyond -good and evil... who needs to be beyond now? It's not so bad on -this side, don't you suppose? There were, of course, Marx and -Freud. Marx, for example, was the first to understand that it -all depended on economics. He understood that to rip the -economics out of the hands of greedy nincompoops and -fetishists, to make it part of the state, to develop it -limitlessly, was the very way to lay the foundations of a -Golden Age. And Freud showed us for what, after all, we needed -this Golden Age. Recollect the source of all human misery. -Unsatisfied instincts, unrequited love, and unsated hunger -- -isn't that right? But here comes Her Majesty, Science, and -presents us with satisfactions. And how rapidly all this has -come to pass! The names of gloomy prognosticators are not yet -forgotten, and already... How do you like the sturgeon? I am -under the impression that the sauce is synthetic. Do you see -the pinkish tint? Yes, it is synthetic. In a restaurant we -should be able to expect natural sauce. Waiter! On second -thought -- the devil take it, let's not be so finicky. Go on, -go on... Now what was I saying? Yes! Love and hunger. Satisfy -love and hunger, and you'll see a happy man. On condition, of -course, that your man is secure about the next day. All the -utopias of all times are based on this simplest of -considerations. Free a man of the worry about his daily bread -and about the morrow, and he will become truly free and happy. -I am deeply convinced that children, yes, precisely the -children, are man's ideal. I see the most profound meaning in -the remarkable similarity between a child and the carefree man -who is the object of utopia. Carefree means happy -- and we are -so close to that ideal! Another few decades, or maybe just a -few more years, and we will attain the automated plenty, we -will discard science as a healed man discards his crutches, and -the whole of mankind will become one huge happy family of -children. The adults will be distinguished from the children -only by their ability to love, and this ability will, again -with the help of science, become the source of new and -unheard-of joys and pleasures.... Excuse me, what is your name? -Ivan? So, you must be from Russia. Communist? Aha... well, -everything is different there I know.... And here is the -coffee! Mm, not bad. But where is the cognac? Well, thank you! -By the way, I hear that the Great Wine Taster has retired. The -most grandiose scandal befell at the Brussels contest of -cognacs, which was suppressed only with the greatest of -difficulties. The Grand Prix is awarded to the White Centaur -brand. The jury is delighted! It is something totally -unprecedented! Such a phenomenal extravaganza of sensations! -The declaratory packet is opened, and, oh horrors, it's a -synthetic! The Great Wine Taster turned as white as a sheet of -paper and was physically ill. By the way, I had an opportunity -to try this cognac, and it's really superb, but they run it -from crude and it doesn't even have a proper name. H ex -eighteen naphtha fraction and it's cheaper than hydrolyzed -alcohol.... Have a cigar. Nonsense, what do you mean you don't -smoke? It's not right not to have a cigar after a dinner like -this.... I love this restaurant. Every time I come here to -lecture at the university, I dine at the Olympic. And before -returning, I invariably visit the Tavern. True, they don't have -the greenery, nor the tropical birds, and it's a bit stuffy and -warm and smells of smoke, but they have a genuine, inimitable -cuisine. The Assiduous Tasters gather nowhere but there -- at -the Gourmet. In that place you do nothing but eat. You can't -talk, you can't laugh, it's totally nonsensical to go there -with a woman -- you only eat there! Slowly, thoughtfully..." - Doctor Opir finally ran down, leaned back in his chair, -and inhaled deeply with total enjoyment. I sucked on the mighty -cigar and contemplated the man. I had him well pegged, this -doctor of philosophy. Always and in all times there have been -such men, absolutely pleased with their situation in society -and therefore absolutely satisfied with the condition of that -society. A marvelously well-geared tongue and a lively pen, -magnificent teeth and faultless innards, and a well-employed -sexual apparatus. - "And so the world is beautiful, Doctor?" - "Yes," said the doctor with feeling, "it is finally -beautiful." - "You are a gigantic optimist," said I. - "Our time is the time of optimists. Pessimists go to the -Good Mood Salon, void the gall from their subconscious, and -become optimists. The time of pessimists has passed, just as -the time of tuberculars, of sexual maniacs, and of the military -has passed. Pessimism, as an intellectual emotion, is being -extirpated by that self-same science. And that not indirectly -through the creation of affluence, but concretely by way of -invasion of the dark world of the subcortex. Let's take the -dream generator, currently the most popular diversion of the -masses. It is completely harmless, unusually well adopted to -general use, and is structurally simple. Or consider the -neurostimulators...." - I attempted to steer him into the desired channel. - "Doesn't it seem to you that right there in the -pharmaceutical field science is overdoing it a bit sometimes?" - Doctor Opir smiled condescendingly and sniffed at his -cigar. - "Science has always moved by trial and error," he said -weightily. "And I am inclined to believe that the so-called -errors are always the result of criminal application. We -haven't yet entered the Golden Age, we are just in the process -of doing so, and all kinds of throwbacks, mobsters, and just -plain dirt are under foot. So all kinds of drugs are put out -which are health-destroying, but which are created, as you -know, from the best of motives; all kinds of aromatics ... or -this... well, that doesn't suit a dinner conversation." He -cackled suddenly and obscenely "You can guess my meaning -- we -are mature people! What was I saying? Oh yes, all this -shouldn't disturb you. It will pass just like the atom bombs." - "I only wanted to emphasize," I remarked, "that there is -still the problem of alcoholism, and the problem of narcotics." - Doctor Opir's interest in the conversation was visibly -ebbing. Apparently he imagined that I challenged his thesis -that science is a boon. To conduct an argument on this basis -naturally bored him, as though, for instance, he had been -affirming the salubriousness of ocean swimming and I was -contradicting him on the basis that I had almost drowned last -year. - "Well, of course..." he mumbled, studying his watch, "we -can't have it all at once.... You must admit, after all, that -it is the basic trend which is the most important.... Waiter!" - Doctor Opir had eaten well, had a good conversation -- -professing progressive philosophy -- felt well-satisfied, and I -decided not to press the matter, especially as I really didn't -give a hang about his progressive philosophy, while in the -matters which interested me the most, he probably would not be -concretely informed at all in the final analysis. - We paid up and went out of the restaurant. I inquired, "Do -you ]mow, Doctor, whose monument that is? Over there on the -plaza." - Doctor Opir gazed absent-mindedly. "Sure enough, it's a -monument," he said. "Somehow I overlooked it before.... Shall I -drop you somewhere?" - "Thank you, I prefer to walk." - "In that case, goodbye. It was a pleasure to meet you.... -Of course it's hard to expect to convince you." He grimaced, -shifting a toothpick around his mouth. "But it would be -interesting to try. Perhaps you will attend my lecture? I begin -tomorrow at ten." - "Thank you," I said. "What is your topic?" - "Neo-optimist Philosophy. I will be sure to touch upon a -series of questions which we have so pithily discussed today." - "Thank you," I said again. "Most assuredly." - I watched as he went to his long automobile, collapsed in -the seat, puttered with the auto-driver control, fell back -against the seat back, and apparently dozed off instantly. The -car began to roll cautiously across the plaza and disappeared -in the shade and greenery of a side street. - Neo-optimism... Neo-hedonism... Neo-cretinism... -Neo-capitalism... "No evil without good," said the fox. So, I -have landed in the Country of the Boobs. It should he recorded -that the ratio of congenital fools does not vary as a function -of time. It should be interesting to determine what is -happening to the percentage of fools by conviction. Curious -- -who assigned the title of Doctor to him? He is not the only -one! There must have been a whole flock of doctors who -ceremoniously granted that title to Neo-optimist Opir. However, -this occurs not only among philosophers. - I saw Rimeyer come into the hall and forgot Doctor Opir at -once. The suit hung on Rimeyer like a sack. Rimeyer stooped, -and his face was flabby. I thought he wavered in his walk. He -approached the elevator and I caught him by the sleeve there. - He jumped violently and turned on me. - "What in hell?" he said. He was clearly unhappy to see me. - "Why are you still here?" - "I waited for you." - "Didn't I tell you to come tomorrow at noon?" - "What's the difference?" I said. "Why waste time?" - He looked at me, breathing laboriously. - "I am expected. A man is waiting for me in my room, and he -must not see you with me. Do you understand?" - "Don't shout," I said. "People are noticing." - Rimeyer glanced sideways with watery eyes. - "Go in the elevator," he said. - We entered and he pressed the button for the fifteenth -floor. - "Get on with your business quickly," he said. - The order was startlingly stupid, so that I was -momentarily disoriented. - "You mean to say that you don't know why I am here?" - He rubbed his forehead, and then said, "Hell, everything's -mixed up.... Listen, I forgot, what is your name?" - "Zhilin." - "Listen, Zhilin, I have nothing new for you. I didn't have -time to attend to that business. It's all a dream, do you -understand? Matia's inventions. They sit there, writing papers, -and invent. They should all be pitched the hell out." - We arrived at the fifteenth floor and he pressed the -button for the first. - "Devil take it," he said. "Five more minutes and he'll -leave.... In general I am convinced of one thing, there is -nothing to it. Not in this town, in any case." He looked at me -surreptitiously, and turned his eyes away. "Here is something I -can tell you. Look in at the Fishers. Just like that, to clear -your conscience." - "The Fishers? What Fishers?" - "You'll find out for yourself," he said impatiently. "But -don't get tricky with them. Do everything they ask." Then, as -though defending himself, he added, "I don't want any -preconceptions, you understand." - The elevator stopped at the first floor and he signaled -for the ninth. - "That's it," he said. "Then we'll meet and talk in detail. -Let's say tomorrow at noon." - "All right," I said slowly. He obviously did not want to -talk to me. Maybe he didn't trust me. Well, it happens! - "By the way," I said, "you have been visited by a certain -Oscar." - It seemed to me that he started. - "Did he see you?" - "Naturally. He asked me to tell you that he will be -calling tonight." - "That's bad, devil take it, bad...." muttered Rimeyer. -"Listen... damn, what is your name?" - "Zhilin." - The elevator stopped. - "Listen, Zhilin, it's very bad that he has seen you.... -However, what the hell is the difference. I must go now." Re -opened the elevator door, "Tomorrow we'll have a real good -talk, okay? Tomorrow... and you look in on the Fishers. Is that -a deal?" - He slammed the door with all his strength. - "Where will I look for them?" I asked. - I stood awhile, looking after him. He was almost running, -receding down the corridor with erratic steps. - -

    Chapter FIVE

- - I walked slowly, keeping to the shade of the trees. Now -and then a car rolled by. One of these stopped and the driver -threw open the door, leaned out, and vomited on the pavement. -He cursed weakly, wiped his mouth with his palm, slammed the -door, and drove off. He was on the elderly side, red-faced, -wearing a loud shirt with nothing under it. - Rimeyer apparently had turned into a drunkard. This -happens fairly often: a man tries hard, works hard, is -considered a valuable contributor, he is listened to and made -out as a model, but just when he is needed for a concrete task, -it suddenly turns out that he has grown puffy and flabby, that -wenches are running in and out of his place, and that he smells -of vodka from early morning.... Your business does not interest -him, while at the same time, he is frightfully busy, is -constantly meeting someone, talks confusingly and murkily, and -is of no help whatsoever. And then he turns up in the alcoholic -ward, or a mental clinic, or is involved in a legal process. Or -he gets married unexpectedly -- strangely and ineptly -- and -this marriage smells strongly of blackmail. ... One can only -comment: "Physician, heal thyself." - It would still be nice to hunt up Peck. Peck is hard as -flint, honest, and he always knows everything. You haven't even -finished the rundown on the tech control, and haven't had a -chance to get off the ship, before he is buddy-buddy with the -cook, is already fully informed and involved in the -investigation of the dispute between the Commander of the -Pathfinders and the chief engineer, who didn't settle the -matter of some prize; the technicians are already planning an -evening in his honor, and the deputy director is listening to -his advice in a quiet corner... Priceless Peck! He was born in -this city and has spent a third of his life here. - I found a telephone booth, and rang information for Peck -Xenai's number and address. I was asked to wait. As usual, the -booth smelled of cats. The plastic shelf was covered with -telephone numbers and obscene images. Someone had carved quite -deeply, as with a knife, the strange word "SLUG." I opened the -door, to lighten the string atmosphere, and watched the -opposite shady side of the street, where a barman stood in -front of his establishment in a white jacket with rolled-up -sleeves, smoking a cigarette. Then I was told that according to -the data at the beginning of the year, Peck resided at No. 31 -Liberty Street, number 11-331. I thanked the operator and -dialed the number at once. A strange voice told me that I had a -wrong number. Yes, the number was correct, and so was the -address, but no Peck lived there, and if he had, they didn't -know when he left or where he had gone. I hung up, left the -booth, and crossed the street to the shady side. - Catching my eye, the barman came to life and said from -afar, "Come in, why don't you?" - "Don't know that I'd like to," I said. - "So you won't be friendly, eh?" he said. "Come in anyway. -We'll have a talk. I feel bored." - I stopped. - "Tomorrow morning," I said, "at ten o'clock, at the -university, there will be a philosophy lecture on Neo-optimism. -It will be given by the renowned Doctor Opir from the capital. - The barman listened with avid interest -- he even stopped -inhaling. - "How do you like that!" he said. "So they have come to -that! The day before yesterday, they chased all the girls out -of a night club, and now they'll be having lectures. We'll show -them lectures!" - "It's about time," I said. - "I don't let them in," he continued, getting more -animated. "I have a sharp eye for them. A guy could be just -approaching the door, when I can spot him for an Intel -'Fellows,' I say, 'an Intel is coming.' And the boys are all -well picked; Dodd himself is here every night after training. -So, he gets up and meets this Intel at the door, and I don't -even know what goes on between them, but be passes him on -elsewhere. Although it's true that sometimes they travel in -bunches. In that case, so there wouldn't be a to-do, we lock -the door -- let them knock. That's the right way, isn't it?" - 'That's okay by me," I said. I had had enough of him. -There are people who pall unusually quickly. "Let them." - "What do you mean -- let them?" - "Let them knock. In other words, knock on any door." - The barman looked at me with growing alertness. - "What say you move on," he said. - "How about a quick one," I offered. - "Move along, move along," he said. "You won't get served -here." - We looked at each other awhile,, then he growled -something, backed up, and slid the glass door in front of him. - "I am no Intel," I said. "I am a poor tourist. A rich -one." - He looked at me with his nose flattened against the glass. -I made a motion as though knocking a drink back. Re mumbled -something and went back into the darkness of the place -- I -could see him wandering aimlessly among empty tables. The place -was called the Smile. I smiled and went on. - Around the corner was a wide main thoroughfare. A huge -van, plastered with advertisements, was parked by the curb. Its -back was swung down for a counter, on which were piled -mountains of cans, bottles, toys, and stacks of -cellophane-wrapped clothing and underwear. Two teenage girls -twittered some sort of nonsense while selecting blouses. -"Pho-o-ny," squeaked one. The other, turning the blouse this -way and that, replied, "Spangles, spangles and not phony." -"Here by the neck it phonies." "Spangles." "Even the star -doesn't glimmer." - The driver of the van, a gaunt man with huge, horn-rimmed -dark glasses, sat on the step of the advertising rotunda. His -eyes were not visible, but, judging by his relaxed mouth and -sweat-beaded nose, he was asleep. I approached the counter. The -girls stopped talking and stared at me with parted mouths. They -must have been about sixteen, and their eyes were vacant and -blue, like those of young kittens. - "Spangles," I said. "No phonying and lots of sparkle." - "And around the neck?" asked the one who was trying on the -blouse. - "Around the neck it's practically a masterpiece." - "Spangles," said the other uncertainly. - "OK, let's look at another one," offered the first -peacefully. "This one here." - "This one is better, the silvery one with the frame." - I saw books. They were magnificent books. There was a -Strogoff with such illustrations as I had never even heard of. -There was Change of Dream with an introduction by -Saroyan. There was a Walter Mintz in three volumes. There was -almost an entire Faulkner, The New Politics by Weber, -Poles of Magnificence by Ignatova, The Unpublished -Sian She-Cuey, History of Fascism in the "Memory of -Mankind" edition. There were current magazines, and almanacs, -pocket Louvres, Hermitage, and Vatican. There was everything! -"It phonies too but it has a frame." "Spangles." I grabbed the -Mintz. Holding the two volumes under my arm, I opened the -third. Never have I seen such a complete Mintz. There were even -the émigré letters. - "How much will that be?" I called. - The girls gaped again; the driver sucked in his lips and -sat up. - "What?" he said huskily. - "Who is the owner here?" I said. - He got up and came to me. - "What would you like?" - "I want this Mintz. How much is it?" - The girls giggled. He stared at me in silence, then -removed his glasses. - "You are a foreigner?" - "Yes, I am a tourist." - "It's the most complete Mintz." - "Of course, I can see that. I was stunned when I saw it." - "Me too," he said, "when I saw what you were after." - "He is a tourist," twittered one of the girls. "He doesn't -understand." - "It's all free," said the driver. "Personal needs fund. To -take care of personal needs." - I looked back at the bookshelf. - "Did you see Change of Dream?" asked the driver. - "Yes, thank you, I have it." - "About Strogoff I will not even inquire." - "How about the History of Fascism?" - "An excellent edition." - The girls giggled again. The driver's eyes popped in -sudden wrath. - "Scram, snot faces," he barked. - The girls jumped. One of them thievishly grabbed several -blouse packages. They ran across the street, where they stopped -and continued to gaze at us. - "With frames!" said the driver. His thin lips twitched. "I -should drop this whole idea. Where do you live?" - "On Second Waterway." - "Aha, in the thick of the mire.... Let's go -- I will drop -you off. I have a complete Schedrin in the van, which I don't -even exhibit; I have the entire classics library; the whole -Golden Library, the complete Treasures of Philosophic Thought." - "Including Doctor Opir's?" - "Bitch tripe," said the driver. "Salacious bum! Amoeba! -Rut do you know Sliy?" - "Not much," I said. "I don't like him. Neo-individualism, -as Doctor Opir would say." - "Doctor Opir stinks," said the driver. "While Sliy is a -real man. Of course, there is the individualism. But at least -he says what he thinks and does what he says. I'll get some -Sliy for you.... Listen, did you see this? And this!" - He dug himself up to his elbows in books. He stroked them -tenderly and his face shone with rapture. - "And this," he kept on. "And how about this Cervantes?" - An oldish lady of imposing bearing approached and started -to pick over the canned goods. - "You still don't have Danish pickles... didn't I ask you -to get some?" - "Go to hell," said the driver absent-mindedly. - The woman was stunned. Her face slowly turned crimson. - "How dare you!" she hissed. - The driver looked at her bullishly. - "You heard what I said. Get out of here!" - "Don't you dare!" said the woman. "What is your number?" - "My number is ninety-three," said the driver, -"Ninety-three -- is that clear enough? And I spit on all of -you. Is that clear? Any other questions?" - "What a hooliganism!" said the woman with dignity. She -took two cans of delicacies, scanned the counter, and with -great precision, ripped the cover off the Cosmic Man -magazine. "I'll remember you, number ninety-three! These aren't -the old times for you." She wrapped the two cans in the cover. -"We'll see each other in the municipal court." - I took a firm hold on the driver's arm. His rigid muscles -gradually relaxed. - "The nerve!" said she majestically and departed. - She stepped along the sidewalk, proudly carrying her -handsome head, which was topped with a high cylindrical -coiffure. She stopped at the corner, opened one of the cans, -and proceeded to pick out chunks with elegant fingers. - I released the driver's arm. - "They ought to be shot," he said suddenly. "We ought to -strangle them instead of dispensing pretty books to them." He -turned toward me, and I could see his eyes were tortured. -"Shall I deliver your books?" - "Well, no," I said. "Where will I put them?" - "In that case, shove off," said the driver. "Did you take -your Mintz? Then go and wrap your dirty pantaloons in it." - He climbed up into the cab. Something clicked and the back -door began to rise. You could hear everything crashing and -rolling inside the van. Several books and some shiny packets, -boxes, and cans fell on the pavement. The rear panel had not -yet closed completely when the driver shut his door and the van -took off with a jerk. - The girls had already disappeared. I stood alone on the -empty street and watched the wind lazily turn the pages of -History of Fascism at my feet. Later a gang of kids in striped -shorts came around the corner. They walked by silently, hands -stuck in their pockets. One jumped down on the pavement and -began to kick a can of pineapple, with a slick pretty cover, -like a football down the street. - -

    Chapter SIX

- - On the way home, I was overtaken by the change of shifts. -The streets filled up with cars. Controller copters appeared -over the intersections, and sweaty police cleared constantly -threatening jams with roaring bull horns. The cars moved -slowly, and the drivers stuck heads out of windows to light up -from each other, to yell, to talk and joke while furiously -blowing their horns. There was a instant screech of clashing -bumpers. Everyone was happy, everyone was good-natured, and -everyone glowed with savage glee. It seemed as though a heavy -load had just fallen from the soul of the city, as though -everyone was seized with an enviable anticipation. Fingers were -pointed at me and the other pedestrians. Several times I was -prodded with bumpers while crossing -- the girls doing it with -the utmost good nature. One of them drove alongside me for -quite a while, and we got acquainted. Then a line of -demonstrators with sober faces walked by on the median, -carrying signs. The signs appealed to people to join the -amateur club ensemble Songs of the Fatherland, to enter the -municipal Culinary Art groups, and to sign up for condensed -courses in motherhood and childhood. The people with signs were -nudged by bumpers with special enthusiasm. The drivers threw -cigarette butts, apple cores, and paper wads at them. They -yelled such things as "I'll subscribe at once, just wait till I -put my galoshes on," or "Me, I'm sterile," or "Say, buddy, -teach me motherhood." The sign carriers continued to march -slowly in between the two solid streams of cars, unperturbed -and sacrificial, looking straight ahead with the sad dignity of -camels. - Not far from my house, I was set upon by a flock of girls, -and when I finally struggled through to Second Waterway, I had -a white aster in my lapel and drying kisses on my cheeks, and -it seemed I had met half the girls in town. What a barber! What -a Master! - Vousi, in a flaming orange blouse, was sitting in the -chair in my study. Her long legs in pointy shoes rested on the -table, while her slender fingers held a long slim cigarette. -With her head thrown back, she was blowing thick streams of -smoke at the ceiling, through her nose. - "At long last!" she cried, seeing me. "Where have you been -all this time? As you can see, I've been waiting for you." - "I've been delayed," I said, trying to recollect if I had -indeed promised to meet her. - Wipe off the lipstick," she demanded. "You look silly! -What's this? Books? What do you need books for?" - "What do you mean by that?" - "You are really quite a problem! Comes back late, hangs -around with books. Or are those pornos?" - "It's Mintz," I said. - "Let me have them!" She jumped up and snatched the books -out of my grasp. "Good God! What nonsense -- all three are -alike. What is it? History of Fascism... are you a -Fascist?" - "How can you say that, Vousi!" - "Then, what do you need them for? Are you really going to -read them?" - "Reread them." - "I just don't understand," she said peevishly. "I liked -you from the first. Mother says you're a writer, and I went and -bragged to everyone, like a fool, and then you turn out to be -the next thing to an Intel." - "How could you, Vousi!" I said with reproach. By now I had -realized that it was impermissible to be taken for an Intel. -"These bookos were simply needed in my literary business, -that's all." - "Bookos!" she laughed. "Bookos! Look at what I can do." -She threw back her head and blew two thick streams of smoke out -of her nostrils. "I got it on the second try. Pretty good, -right?" - "Remarkable aptitude," I remarked. - "Instead of laughing at me, you should try it yourself. -... A lady taught me at the salon today. Slobbered all over me, -the fat cow... Will you try it?" - "How come she did that?" - "Who?" - "The cow." - "Not normal. Or maybe a sad sack.... What's your name? I -forgot." - "Ivan." - "An amusing name! You'll have to remind me again. Are you -a Tungus?" - "I don't think so." - "So-o... and I went and told everyone that you are a -Tungus. Too bad.... Say, why not have a drink?" - "Let's." - "Today I should have a strong drink to forget that -slobbering cow." - She ran out into the living room and came back with a -tray. We had some brandy and looked at each other, not having -anything to say. I felt ill at ease. I couldn't say why, but I -liked her. I sensed something, something I couldn't put my -finger on; something which distinguished her from the -long-legged, smooth-skinned pin-up beauties, good only for the -bed. I had the impression that she sensed something in me, too. - "Beautiful day, today," she said, looking away. - "A bit hot," I observed. - She sipped some brandy; I did too. The silence stretched. - "What do you like to do the most?" she asked. - "It depends. And you?" - "Same with me. In general, I like to have fun and not have -to think about anything." - "So do I," I said. "At least I do right now." - She seemed to perk up a little. I understood suddenly what -was the matter: during the whole day, I had not met a single -truly pleasant person, and I simply had gotten tired of it. -There was nothing to her, after all. - "Let's go somewhere," she said. - "We could," I said. I really didn't want to go anywhere, I -wanted to sit and relax in the cool room for a while. - "I can see you're not too eager," she said. - "To be honest, I would prefer to sit around here for a -bit." - "Well then, amuse me." - I considered the problem, and recounted the story of the -traveling salesman in the upper bunk. She liked it, but I think -she missed the point. I made a correction in my aim, and told -her the one about the president and the old maid. She laughed a -long time, kicking her wonderfully long legs. Then, taking -courage from another shot of brandy, I told about the widow -with the mushrooms growing on the wall. She slid down to the -floor and almost knocked over the tray. I picked her up under -the armpits, hoisted her back up in the chair, and delivered -the story of the drunk spaceman and the college girl, at which -point Aunt Vaina came rushing in and inquired fearfully what -was going on with Vousi, and whether I was tickling her -unmercifully. I poured Aunt Vaina a glass, and addressing -myself to her personally, recounted the one about the Irishman -who wanted to be a gardener. Vousi was completely shattered, -but Aunt Vaina smiled sorrowfully and confided that Major -General Tuur liked to tell the same story, when he was in a -good mood. But in it there was, she thought, a Negro instead of -the Irishman, and he aspired to the duties of a piano tuner and -not a gardener. "And you know, Ivan, the story ended somehow -differently," she added after some thought. At this point I -noticed Len standing in the doorway, looking at us. I waved and -smiled at him. He seemed not to notice, so I winked at him and -beckoned for him to come in. - "Whom are you winking at?" asked Vousi, through lingering -laughter. - "It's Len," I said. It was really a pleasure to watch her, -as I love to see people laugh, especially such a one as Vousi, -beautiful and almost a child. - "Where's Len?" she wondered. - There was no Len in the doorway. - "Len isn't here," said Aunt Vaina, who was sniffing the -brandy with approval, and did not notice a thing. "The boy went -to the Ziroks' birthday party today. If you only knew, Ivan..." - "But why does he say it was Len?" asked Vousi, glancing at -the door again. - "Len was here," I said. "I waved at him, and be ran away. -You know, he looked a bit wild to me." - "Ach, we have a highly nervous boy there," said Aunt -Vaina. "He was born in a very difficult time, and they just -don't know how to deal with a nervous child in these modern -schools. Today I let him go visit." - "We'll go, too, now," said Vousi. "You'll walk with me. -I'll just fix myself up, because on account of you everything -got smeared. In the meantime, you can put on something more -decent." - Aunt Vaina wouldn't have minded staying behind to tell me -a few more things and maybe show me a photo album of Len, but -Vousi dragged her off and I heard her ask her mother behind the -door, "What's his name? I just can't remember it. He is a jolly -fellow, isn't he?" - "Vousi!" admonished Aunt Vaina. - I laid out my entire wardrobe on the bed and tried to -imagine what Vousi would consider a decently dressed man. Until -now, I had thought I was dressed quite satisfactorily. Vousi's -heels were already beating an impatient rat-a-tat on the study -floor. Not having come up with anything, I called her in. - "That's all you have?" she asked, wrinkling her nose. - "It really isn't good enough?" - "Well, it will pass. Take off the jacket and put on this -Hawaiian shirt... or better yet, this one here. They sure have -dressing problems in your Tungusia! Hurry up. No, no, take off -the shirt you have on." - "You mean, without an undershirt?" - "You know, you really are a Tungus. Where do you think you -are going -- to the pole or to Mars? What's this under your -shoulder blade?" - "A bee stung me," I said, hurriedly pulling on my shirt. -"Let's go!" - The street was already dark. The fluorescents shone palely -through dark foliage. - "Which way are we bound?" I asked. - "Downtown, of course.... Don't grab my arm, it's hot! At -least you know how to fight, I hope?" - "I know how." - "That's good. I like to watch." - "To watch, I like, too," I said. - There were a lot more people out in the streets than in -the daytime. Under the trees, in the bushes, and in the -driveways there were groups of unsettled-looking individuals. -They furiously smoked crackling synthetic cigars, guffawed, -spat negligently and often, and spoke in loud rough voices. -Over each group hung the racket of radio receivers. Under one -streetlight a banjo twanged, and two youngsters, twisting in -weird contortions and yelling out wildly, were performing -fling, a currently fashionable dance, a dance of great beauty -when properly executed. The youngsters knew how. Around them -stood a small crowd, also yelling lustily and clapping their -hands in rhythm. - "Shall we have a dance?" I offered. - "But no, no..." hissed Vousi, taking me by the hand and -increasing her pace. - "And why not? You do fling?" - "I'd sooner hop with alligators than this crowd." - "Too bad," I said, "They look like regular fellows." - "Yes, each one by himself," said Vousi, "and in the -daytime." - They hung around on the corners, huddled around -streetlights, gauche, smoked to the gills, leaving the -sidewalks behind them strewn with bits of candy paper, -cigarette butts, and spittle. They were nervous and showy -melancholic, yearning, constantly looking around, stooped. They -were awfully anxious not to look like others, and at the same -time, assiduously imitated each other and two or three popular -movie stars. There were really not that many, but they stood -out like sore thumbs, and it always seemed to me that every -town and the whole world was filled with them -- perhaps -because every city and the whole world belonged to them by -night. And to me, they seemed full of some dark mystery, But I -too used to stand around of evenings in the company of friends, -until some real people turned up and took us off the streets, -and many a time I have seen the same groups in all the cities -of the world, where there was a lack of capable men to get rid -of them. But I never did understand to the very end what force -it is that turns these fellows away from good books, of which -there are so many, from sport establishments, of which this -town had plenty, and even from ordinary television sets, and -drives them out in the night streets with cigarettes in their -teeth and transistor sets in their ears, to stand and spit as -far as possible, to guffaw as offensively as possible, and to -do nothing. Apparently at fifteen, the most attractive of all -the treasures in the world is the feeling of your own -importance and ability to excite everyone's admiration, or at -least attract attention. Everything else seems unbearably dull -and dreary, including, perhaps above all, those avenues of -achieving the desirable which are offered by the tired world of -adults. - "This is where old Rouen lives," said Vousi. "He has a new -one with him every night. The old turnip has managed it so that -they all come to him of their own will. During the fracas, his -leg was blown off.... You see there is no light in his place, -they are listening to the hi-fi. On top of which, he's ugly as -mortal sin." - "He lives well who has but one leg," I said -absent-mindedly. - Of course she had to giggle at this, and continued. - "And here lives Seus. He is a Fisher. Now there's a man -for you!" - "Fisher," I said. "And what does he do, this -Seus-Fisher?"' - "He Fishers. That's what Fishers do -- they Fisher. Or are -you asking where he works?" - "No, I mean to ask where does he Fisher?" - "In the Subway." Suddenly she stopped. "Say, you wouldn't -be a Fisher?" - "Me? Why, does it show?" - "There is something about you, I noticed at once. We know -about these bees that sting you in the back." - "Is that right?" I said. - She slipped her arm through mine. - "Tell me a story," she said, cajoling. "I never had a -Fisher among my friends. Will you tell me a story?" - "Well now... shall I tell you about the pilot and the -cow?" - She tweaked my elbow. - "No, really..." - "What a hot evening," I said. "It's a good thing you had -me take off my jacket!" - "Anyway, everybody knows. Seus talks about it, and so do -others." - "Ah, so," I said with interest. "And what does Seus tell?" - She let go of my arm at once. - "I didn't hear it myself. The girls told me." - "And what did they tell?" - "Well, this and that.... Maybe they put it all on. Maybe, -you know. Seus had nothing to do with it." - "Hmmm," I said. - "Don't think anything about Seus, he's a good guy and he -keeps his mouth closed." - "Why should I be thinking about Seus?" I said to quiet -her. "I have never even laid eyes on him." - She took my arm again and enthusiastically announced that -we were going to have a drink now. - "Now's the very time for us to have a drink." - She was already using the familiar address with me. We -turned a corner and came out on a wide thoroughfare. Here it -was lighter than day. The lamps shone, the walls glowed, the -display windows were lambent with multicolored fires. This was, -apparently, one of Ahmad's circles of paradise. But I imagined -it differently. I expected roaring bands, grimacing couples, -half-naked and naked people. But here it was relatively quiet. -There were lots of people, and it seemed to me that most were -drunk, but they were all very well and differently dressed and -all were gay. And almost all smoked. There was no wind, and -waves of bluish smoke undulated around the lights and lanterns. -Vousi dragged me into some establishment, found a couple of -acquaintances, and disappeared after promising to find me -later. The crowd was dense, and I found myself pressed against -the bar. Before I could gather my wits, I found myself downing -a shot. A brown middle-aged man with yellow whites of the eye -was booming into my face. - "Kiven hurt his leg -- right? Brush became an antique and -is now quite useless. That makes three -- right? And on the -right they haven't got nobody. Phinney is on the right, and -that's worse than nobody. A waiter, that's what be is." - "What are you drinking?" I asked. - "I don't drink at all," replied the brown one with -dignity, breathing strong fumes at me. "I have jaundice. Ever -hear of it?" - Behind me, someone fell off a stool. The noise modulated -up and down. The brown one, sitting down next to me, was -shouting out some story about some character who almost died of -fresh air after breaking some pipe at work. It was hard to -understand any part of it, as various stories were being -shouted from all sides. - "... Like a fool, he quieted down and left, and she called -s taxi truck, loaded up his stuff, and had it dumped outside -the town..." - "... I wouldn't have your TV in my outhouse. You can't -think of one improvement on the Omega, my neighbor is an -engineer, and that's just what he says -- you can't think up an -improvement on the Omega..." - "... That's the way their honeymoon ended. When they -returned home, his father enticed him in the garage -- and his -father is a boxer -- and trounced him until he lost -consciousness. They called a doctor later..." - "... So, all right, we took enough for three... and their -rule is, you know, take as much as you wish, but you get to -swallow all of it... and they are watching us by now, and he is -carried away -- and says -- let's take more... well, I says to -myself, enough of this, time to break knuckles..." - "... Dear child, with your bust, I wouldn't know any -grief, such a bosom is one in a thousand, but don't think I'm -flattering you, that's not my style..." - A scrawny girl with bangs down to the tip of her nose -climbed up on the vacant stool next to me and began to pound -with puny fists on the bar, yelling, "Barman, barman, a drink." - The din died down again, and I could hear behind me a -tragic whisper -- "Where did he get it?" "From Buba, you know -him, he is an engineer." "Was it real?" "It's scary, you could -croak." "Then you need some kind of pill --" "Quiet, will you?" -"Oh, all right, who would be listening to us? You got one?" -"Buba gave me one package, he says any drugstore has them by -the ton... here, look." "De... Devon -- what is it?" "Some sort -of medicine, how would I know?" I turned around. One was -red-faced with a shirt unbuttoned down to his navel, and with a -hairy chest. The other was strangely haggard-looking with a -large-pored nose. Both were looking at me. - "Shall we have a drink?" I said. - "Alcoholic," said the pore-nose. - "Don't, Pete. Don't start up, please," said the red-faced -one. - "If you need some Devon, I've got it," I said loudly. - They jumped back. Pore-nose began to look around -cautiously. Out of the corner of my eye, I could see several -faces turn toward us and grow still. - "Let's go, Pat," said red-face. "Let's go! The hell with -him." - Someone put a hand on my shoulder. I turned around and saw -a handsome sunburned man with powerful muscles. - "Yes?" I said. - "Friend," he said benevolently, "drop this business. Drop -it while it's not too late. Are you a Rhinoceros?" - "I am a hippopotamus," I joked. - "No, don't. I'm serious. Did you get beat up, maybe?" - "Black and blue." - "All right, don't feel bad about it. Today it's you, -tomorrow it's them.... As for Devon and all that -- that's -crap, believe me. There's lots of crap in the world, but that -is the crap of all crap." - The girl with the bangs advised me, "Crack him in the -teeth... what's he sticking his nose in for... lousy dick." - "Lapping it up, and doing it up brown, aren't you?" said -the sunburned one coolly, and turned his back on us. His back -was huge, and studded with bulging muscles under a tight -half-transparent shirt. - "None of your business," said the girl at his back. Then -she said to me, "Listen, friend, call the barman for me -- I -can't seem to get through to him." - I gave her my glass and asked, "What's to do?" - "In a minute, we'll all go," replied the girl. Having -swallowed the alcohol, she went limp all at once. "As to what -to do -- that's up to luck. Without luck, you can't make out. -Or you need money if you deal with promoters. You're probably a -visitor? Nobody here drinks that dry vodka. How is it your way, -you should tell me about it.... I'm not going anywhere today, -I'll go to the salon instead. I feel terrible and nothing seems -to help.... Mother says -- have a child. But that's dull too, -what do I need one for?" - She closed her eyes and lowered her chin on her entwined -fingers. She looked brazen, but at the same time crestfallen. I -attempted to rouse her but she stopped paying attention to me, -and suddenly started shouting again, "Barman, barman, a drink!" - I looked for Vousi. She was nowhere to be seen. The cafe -began to empty. Everyone was in a hurry to get somewhere. I got -off my stool, too, and left the cafe. Streams of people flowed -down the street. They were all going in the same direction, and -in about five minutes, I was swept out onto a big square. It -was huge and poorly lighted, a wide gloomy space bordered by a -ring of streetlights and store windows. It was full of people. - They stood pressed against each other, men, women, and -youngsters, boys and girls, shifting from foot to foot, waiting -for I knew not what. There was almost no talking. Here and -there cigarette tips flared, lighting hollow cheeks and -compressed lips. Then a clock began to strike the hour, and -over the square, gigantic luminous panels sprang into flaming -light. There were three of them -- red, blue, and green, -irregularly shaped rounded triangles. The crowd surged and -stood still. Around me, cigarettes were put out with subdued -movements. The panels went out momentarily and then started to -flash in rotation: red-blue-green, red-blue-green... I felt a -wave of hot air on my face, and was suddenly dizzy. They were -astir around me. I got up on tiptoes. In the center of the -square, the people stood motionless; I had the impression that -they were seized rigid and did not fall only because they were -pressed in by the crowd. Red-blue-green, red-blue-green. -Wooden, upturned faces, blackly gaping mouths, staring, bulging -eyes. They weren't even winking there, under the panels. A -total quiet fell, so that I jumped when a piercing woman's -voice nearby yelled: "Shivers!" All at once, tens of voices -responded: "Shivers! Shivers!" People on the sidewalk on the -square's perimeter began to clap hands in rhythm with the -flashes, and to chant in even voices, "Shi-vers! Shi-vers! -Shi-vers!" Somebody prodded me in the back with a sharp elbow. -I was pressed forward to the center, toward the panels. I took -a step and another and started through the crowd, pushing the -stiffened bodies aside. Two youngsters, rigid as icicles, -suddenly started thrashing wildly, grabbing at each other, -scratching and pounding with all their strength, but their -faces remained frozen in the direction of the flashing sky... -red-blue-green, red-blue-green. And just as suddenly as they -started, they grew still again. - At this paint, finally, I understood that all this was -extraordinarily amusing. Everyone laughed. There was lots of -room around me and music thundered forth. I swept up a charming -girl and we began to dance, as they used to dance, as dancing -should be done and was done a long, long time ago, as it was -done always with abandon, so that your head swam, and so that -everyone admired you. We stepped out of the way, and I held on -to her hands, and there was no need to talk about anything, and -she agreed that the van driver was a strange man. Can't stand -alcoholics, said Rimeyer, and pore-nose is the most genuine -alcoholic, and what about Devon I said, how could you be -without Devon when we have an excellent zoo, the buffaloes love -to wallow in the mud, and bugs are constantly swarming out of -it. Rim, I said, there are some fools who said that you are -fifty years old -- such nonsense when I wouldn't give you over -twenty-five -- and this is Vousi, I told her about you, but I -am intruding on you, said Rimeyer; no one can intrude on us, -said Vousi, as for Seus he's the best of Fishers, he grabbed -the splotcher and got the ray right in the eye, and Hugger -slipped and fell in the water and said -- wouldn't it be -something for you to drown -- look your gear are melting away, -aren't you funny, said Len, there is such a game of boy and -gangster, you know, you remember we played with Maris... Isn't -it wonderful, I have never felt so good in my life, what a -pity, when it could be like this every day. Vousi, I said, -aren't we great fellows, Vousi, people have never had such an -important problem before, and we solved it and there remained -only one problem, Vousi, the sole problem in the world, to -return to people a spiritual content, and spiritual concerns, -no, Seus, said Vousi, I love you very much, Oscar, you are very -nice, but forgive me, would you, I want it to be Ivan, I -embraced her and felt that it was right to kiss her and I said -I love you... - Boom! Boom! Boom! Something exploded in the dark night sky -and tinkling sharp shards began to fall on us, and at once I -felt cold and uncomfortable. There were machine guns firing! -Again the guns rattled. "Down, Vousi," I yelled, although I -could not yet understand what was going on, and threw her down -on the ground and covered her with my body against the bullets, -whereupon blows began to rain on my face. - Bang, bang, rat-tat-tat-tat... around me people stood like -wooden pickets. Some were coming to and rolling their eyeballs -inanely. I was half reclining on a man's chest, which was as -hard as a bench, and right in front of my eyes was his open -mouth and chin glistening with saliva... Blue-green, -blue-green, blue-green... Something was missing. - There were piercing screams, cursing, someone thrashed and -screeched hysterically. A mechanical roar grew louder over the -square. I raised my head with difficulty. The panels were right -overhead, the blue and green flashing regularly, while the red -was extinguished and raining glass rubble. Rat-tat-tat-tat and -the green panel broke and darkened. In the blue remaining light -unhurried wings floated by, spewing the reddish lightning of a -fusillade. - Again I attempted to throw myself on the ground, but it -was impossible, as they all stood around me like pillars. -Something made an ugly snap quite near me, and a yellow-green -plume rose skyward from which puffed a repulsive stench. Pow! -Pow! Another two plumes hung over the square. The crowd howled -and stirred. The yellow vapor was caustic like mustard, my eyes -and mouth filled, and I began to cry and cough, and around me, -everyone began to cry and cough and yell hoarsely: "Lousy bums! -Scoundrels! Sock the Intels!" Again the roar of the engine -could be heard, coming in louder and louder. The airplane was -returning. "Down, you idiots," I yelled. Everyone around me -flopped down all over each other. Rat-tat-tat-tat! This time -the machine gunner missed and the string apparently got the -building opposite us. To make up for the miss, the gas bombs -fell again right on target. The lights around the square went -out, and with them the blue panel, as a free-for-all started in -the pitch-black dark. - -

    Chapter SEVEN

- - I'll never know how I arrived at that fountain. It must be -that I have good instincts and ordinary cold water was exactly -what I needed. I crawled into the water without taking off my -clothes, and lay down, feeling better immediately. I was lying -on my back, drops rained on my face, and this was unbelievably -pleasant. It was quite dark here, and dim stars shone through -the branches and the water. It was very quiet. For several -minutes I was watching a brighter star, for some reason unknown -to me, which was slowly moving across the sky, until I realized -that I was watching the relay satellite Europa. How far from -all this, I thought, how degrading and senseless to remember -the revolting mess on the square, the disgusting foul mouthings -and screechings, the wet phrumping of the gas bombs, and the -putrid stench which turned your stomach and lungs inside out. -Understanding freedom as the rapid satisfaction and -multiplication of needs and desires, I recollected, people -distort their natures as they engender within themselves many -senseless and stupid desires, habits and the most unlikely -inventions.... - Priceless Peck, he loved to quote old pundit Zosima as he -circled around a well-laid table, rubbing his hands. We were -snot-nosed undergrads then and ingenuously believed that such -pronouncements, in our time, were meant only to show off -flashes of humor and erudition.... At this point in my -reflections, someone noisily plunged into the water some ten -paces from me. - At first he coughed hoarsely, spat and blew his nose, so -that I hurried to leave the water, then he started to splash, -finally became quiet, and suddenly discharged himself of a -string of curses: - "Shameless lice," he growled. "Whores, swine... on live -people! Stinking hyenas, rotten scum... learned prostitutes, -filthy snakes." He hawked furiously again. "It bothers them -that people are having a good time! Stepped on my face, the -crud!" He groaned nasally and painfully, "The hell with this -shiver business. That will be the day when I'll go again." - He moaned again and rose. I could hear the water running -from his clothes. I could dimly perceive his swaying figure. He -saw me too. - "Hey, friend, have a smoke on you?" - "I did," I replied. - "Low-lifers! I didn't think to take them out. Just fell in -with everything on." He splashed over to me and sat down -alongside. "Some moron stepped on my cheek," he informed me. - "They marched over me, too," I said. "The people went -ape." - "But, you tell me, where do they get the tear gas?" he -said. "And machine guns?" - "And airplanes," I added. - "An airplane means nothing," he contradicted. "I have one -myself. I bought it cheap for seven hundred crowns.... What do -they want, that's what I don't understand." - "Hoodlums," I said. "They should have their faces pulped -properly, and that would be the end of that argument." - He laughed bitterly. - "Someone did! For that you get worked over good.... You -think they didn't get beat up? And how they got beat up! But -apparently that isn't enough.... We should have driven them -right into the ground, together with their excrement, but we -passed up the chance.... And now they are giving us the -business! The people got soft, that's what, I tell you. Nobody -gives a damn. They put their four hours in, have a drink and -off to the shivers! And you can pot them like clay pigeons." He -slapped his sides in desperation. "Those were the times," he -cried. "They didn't dare open their mouths! Should one of them -even whisper, guys in black shirts or maybe white hoods would -pay a night visit, crunch him in the teeth, and off to the camp -he went, so there wouldn't be a peep out of him again.... In -the schools, my son says, everyone bad-mouths fascism: Oh dear, -they hurt the Negroes' feelings; oh dear, the scientists were -witch-hunted; oh dear, the camps; oh dear, the dictatorship! -Well, it wasn't witch-hunting that was needed, but to hammer -them into the ground, so there wouldn't be any left for -breeding!" He drew his hand under his nose, slurping long and -loud. - "Tomorrow morning, I have to go to work with my face all -out of shape.... Let's go have a drink, or we'll both catch -cold." - We crawled through the bushes and came out on the street. - "The Weasel is just around the corner," he informed me. - The Weasel was full of wet-haired half-naked people. They -seemed depressed, somehow embarrassed, and gloomily bragging -about their contusions and abrasions. Several young women, clad -only in panties, clustered around the electric fireplace, -drying their skirts. The men patted them platonically on their -bare flesh. My companion immediately penetrated into the thick -of the crowd, and swinging his arms and blowing his nose with -his fingers, began to call for "hammering the bastards into the -ground." He was getting some weak support. - I asked for Russian vodka, and when the girls left, I took -off my sport shirt and sat by the fireplace. The barman -delivered my glass and returned at once to his crossword in the -fat magazine. The public continued its conversation. - "So, what's the shooting for? Haven't we had enough of -shooting? Just like little boys, by God... just spoiling some -good fun." - "Bandits, they're worse than gangsters, but like it or not -that shiver business is no good, too." - "That's right. The other day mine says to me, 'Papa, I saw -you; you were all blue like a corpse and very scary' -- and -she's only ten. So how can I look her in the eyes? Eh?" - "Hey anybody! What's an entertainment with four letters?" -asked the barman without raising his head. - "So, all right, but who dreamed all this up -- the shiver -and the aromatics? Eh and also..." - "If you got drenched, brandy is best." - "We were waiting for him on the bridge, and along he comes -with his eyeglasses and some kind of pipe with lenses in it. So -up he goes over the rail with his eyeglasses and his pipe, and -he kicked his legs once and that was that. And then old Snoot -comes running, after having been revived, and he looks at the -guy blowing bubbles. "Fellows," he says, "What the hell is the -matter with you, are you drunk or something, that's not the guy --- I am seeing him for the first time..." - "I think there ought to be a law -- if you are married, -you can't go to the shiver." - "Hey somebody," again the bartender, "What's a literary -work with seven letters -- a booklet, maybe?" - "So, I myself had four Intels in my squad, machine gunners -they were. It's quite true that they fought like devils. I -remember we were retreating from the warehouse, you know -they're still building a factory there, and two stayed behind -to cover us. By the way, nobody asked them, they volunteered -entirely by themselves. Later we came back and found them -hanging side by side from the rail crane, naked, with all their -appurtenances ripped off with hot pincers. You understand? And -now, I'm thinking, where were the other two today? Maybe they -were the very same guys to treat me to some tear gas, those are -the types that can do such things." - "So who didn't get hung? We got hung by various places, -too!" - "Hammer them into the ground right up to their noses, and -that'll be the end of that!" - "I'm going. There is no point in hanging around here, I'm -getting heartburn. They must have fixed everything up by now, -back there." - "Hey, barman, girls, let's have one last one." - My shirt had dried, and as the cafe emptied, I pulled it -on and went over to sit at a table and to watch. Two -meticulously dressed gentlemen in the corner were sipping their -drinks through straws. They called attention to themselves -immediately -- both were in severe black suits and black ties, -despite the very warm night. They weren't talking, and one of -them constantly referred to his watch. After a while, I grew -tired of observing them. Well, Doctor Opir, how do you like the -shivers? Were you at the square? But of course you were not. -Too bad. It would have been interesting to know what you -thought of it. On the other hand, to the devil with you. What -do I care what Doctor Opir thinks? What do I think about it -myself? Well, high-grade barber's raw material, what do you -think? It's important to get acclimatized quickly - and not stuff the brain with induction, deduction, and -technical procedures. The most important thing is to get -acclimatized as rapidly as possible. To get to feel like one of -them.... There, they all went back to the square. Despite -everything that happened, they still went back to the square -again. As for me, I don't have the slightest desire to go back -there. I would, with the greatest of pleasure at this point, go -back to my room and check out my new bed. But when would I go -to the Fishers? Intels, Devon, and Fishers. Intels -- maybe -they are the local version of the Golden Youth? Devon... Devon -must be kept in mind, together with Oscar. But now the Fishers. - "The Fishers; that's a little bit vulgar," said one of the -black suits, not whispering, but very quietly. - "It all depends on temperament," said the other. "As for -me, personally I don't condemn Karagan in the slightest." - "You see, I don't condemn him either. It's a little -shocking that he picked up his options. A gentleman would not -have behaved that way." - "Forgive me, but Karagan is no gentleman. He is only a -general manager. Hence the small-mindedness and the -mercantilism and a certain what I might call commonness..." - "Let's not be so hard on him. The Fishers -- that's -something intriguing. And to be honest, I don't see any reason -why we should not involve ourselves. The old Subway -- that's -quite respectable. Wild is much more elegant than Nivele, but -we don't reject Nivele on that account." - "'You really are seriously considering?" - "Right now, if you wish.... It's five to two, by the way. -Shall we go?" - They got up, said a friendly and polite goodbye to the -bartender, and proceeded toward the exit. They looked elegant, -calm, and condescendingly remote. This was astounding luck. I -yawned loudly, and muttering, "Off to the square," followed -them, pushing stools out of my way. The street was poorly -illuminated, but I saw them immediately. They were in no hurry. -The one on the right was the shorter, and when they passed -under the street lights, you could see his safe, sparse hair. -As near as I could tell, they were no longer conversing. - They detoured the square, turned into a dark alley, -avoided a drunk who tried to strike up a conversation, and -suddenly, without one backward glance, turned abruptly into a -garden in front of a large gloomy house. I heard a heavy door -thud shut. It was a minute before two. - I pushed off the drunk, entered the garden, and sat down -on a silver-painted bench under a lilac bush. The wooden bench -was situated on a sandy path which ran through the garden. A -blue lamp illuminated the entrance of the house, and I -discerned two caryatids supporting the balcony over the door. -This didn't look like the entrance to the old subway, but as -yet, I couldn't tell for sure, so I decided to wait. - I didn't have to wait long. There was a rustle of steps -and a dark figure in a cloak appeared on the path. It was a -woman. I did not grasp immediately why her proudly raised head -with a high cylindrical coiffure, in which large stones -glistened in the starlight, seemed familiar. I arose to meet -her, and said, trying to sound both respectful and mocking, -"You are late, madam, it's after two." - She was not in the least startled. - "You don't say!" she exclaimed. "Can it be my watch is so -slow?" - It was the very same woman who had the altercation with -the van driver, but of course she did not recognize me. Women -with such disdainful-looking lower lips never remember chance -meetings. I took her by the arm, and we mounted the wide stone -steps. The door turned out to be as heavy as a reactor-well -cover. There was no one in the entrance hall. The woman, -without turning, flung the cloak on my arm and went ahead, and -I paused for a second to look at myself in the huge mirror. -Good man, Master Gaoway, but it still behooved me to stay in -the shadows. We entered the ballroom. - No, this was anything but a subway. The room was enormous -and incredibly old-fashioned. The walls were lined with dark -wood, and fifteen feet up, there was a gallery with a railing. -Pink blond-curled angels smiled down with only their blue lips -from a far-flung ceiling. Almost the entire floor of the room -was covered with rows of soft massive chairs covered with -embossed leather. Elegantly dressed people, mostly middle-aged -men, sat in them in relaxed and negligent poses. They were -looking at the far end of the room, where a brightly lit -picture blazed against a background of black velvet. - No one turned to look at us. The woman glided toward the -front rows, and I sat down near the door. By now, I was almost -sure that I had come here for nothing. There was silence and -some coughs, and lazy streams of smoke curled upward from the -fat cigars; many bald pates glistened under the chandeliers. My -attention turned to the picture. I am an indifferent -connoisseur of paintings, but it looked like a Raphael, and if -it was not genuine, it was certainly a perfect copy. - There was a deep brassy gong, and simultaneously a tall, -thin man in a black mask appeared by the side of the picture. A -black leotard covered his body from head to toe. He was -followed by a limping, hunchbacked dwarf in a red smock. In his -short, extended pawlike arms, he held a dully glinting sword of -a most wicked appearance. He went to the right of the picture -and stood still, while the masked individual stepped forward -and spoke in a measured tone: "In accordance with the bylaws -and directives of the Honorable Society of Patrons, and in the -name of Art, which is holy and irreproducible, and the power -granted me by you, I have examined the history and worth of -this painting and now --" - "Request a halt," sounded a curt voice behind me. - Everyone turned around. I also turned around and saw that -three young, obviously very powerful, and immaculately dressed -men were looking at me full in the face. One had a monocle in -his right eye. We studied each other for a few seconds, and the -man with the monocle twitched his cheek and let it drop. I got -up at once. They moved toward me together, stepping softly and -soundlessly. I tried the chair, but it was too massive. They -jumped me. I met them as best I could and at first everything -went well, but very quickly it became evident that they wore -brass knuckles, and I barely managed to evade them. I pressed -my back against the wall and looked at them while they, -breathing heavily, looked at me. There were still two of them -left. There was the usual coughing in the auditorium. Four more -were coming down the gallery steps, which squeaked and groaned -loudly enough to reverberate in the hall. Bad business, thought -I, and launched myself to force a breach. - It was hard going, just like the time in Manila, but then -there were two of us. It would have been better if they were -armed, as I would have had a chance to expropriate a gun. - But all six of them met me with knuckles and truncheons. -Luckily for me it was very crowded. My left arm went out of -commission, and then the four suddenly jumped back, while the -fifth drenched me with a clammy liquid from a flat container. -Simultaneously, the lights were extinguished. - These tricks were well known to me: now they could see me, -but I could not see them. In all probability that would have -been the end of me, were it not that some idiot threw open the -door and announced in a greasy basso, "I beg forgiveness, I am -terribly late and so sorry..." I charged toward the light, over -some bodies, mowed down the latecomer, flew across the entrance -hall, threw open the front door, and pelted down the sandy path -holding my left arm with my right hand. No one was pursuing me, -but I traversed two blocks before it dawned on me to stop. - I flung myself down on a lawn and lay for a long time in -the short grass, grabbing lungfuls of the warm moist air. In no -time, the curious gathered around me. They stood in a -semicircle and ogled me avidly, not saying a word. "Take off," -I said, getting up finally. Hurriedly, they scooted away. I -stood awhile, figuring out where I was, and began a stumbling -journey homeward. I had had enough for today. I still didn't -get it, but I had had quite enough. Whoever they were, these -members of the Honorable Society of Art Patrons -- secret art -worshippers, extant aristocrat-conspirators or whoever else -- -they fought cruelly and without quarter, and the biggest fool -in that hall of theirs was still apparently none other than I. - I passed by the square, where again the color panels -pulsed rhythmically, and hundreds of hysterical voices -screamed, "Shi-vers! Shi-vers!" Of this too I had had enough. -Pleasant dreams are, of course, more attractive than unpleasant -ones, but after all, we do not live in a dream. In the -establishment where Vousi had taken me, I had a bottle of -ice-cold soda water, observed with curiosity a squad of police -peacefully camped by the bar, and went out, turning into Second -Waterway. - A lump the size of a tennis ball was rising behind my left -ear. I weaved badly and walked slowly, keeping close to the -fences. Later, I heard the tap of heels behind me and voices: - "... Your place is in the museum, not in a cabaret." - "Nothing of the sort, I am not drunk. Can't you -und-derstand, only one measly bottle of wine..." - "How disgusting! Soused and picking up a wench." - "What's the girl got to do with it? She is a m-model!" - "Fighting over a wench. Making us fight over her." - "Why in hell d-do you believe them and don't believe me?" - "Just because you're drunk! You're a bum, just like they -all are, maybe worse...." - "That's all right. I'll remember that scoundrel with the -bracelet quite well.... Don't hold me! I'll walk by myself!" - "You'll remember nothing, friend. Your glasses were -knocked off in the first instant, and without them, you aren't -even a man, but a blind sausage.... Stop kicking, or it will be -the fountain for you...." - "I'm warning you, one more stunt like that, and we'll -throw you out. A drunken kulturfuhrer -- it's enough to -make you sick." - "Stop preaching at him, give a man a chance to sleep it -off." - "Fellows! There he is, the l-louse!" - The street was empty, and the louse was clearly me. I -could bend my left arm already, but it hurt like the devil, and -I stepped back to let them pass. There were three of them. They -were young, in identical caps, pushed over their eyes. One, -thickset and low-slung, was obviously amused and held the other -one, a tall, open-faced, loose-jointed fellow, with a powerful -grip, restraining his violent and sporadic movements. The -third, long and skinny, with a narrow and darkish face, was -following at some distance with his hands behind his back. As -he got alongside me, the loose-jointed one braked determinedly. -The short one attempted to nudge him off the spot, but in vain. - The long one passed by and then stopped, looking back -impatiently over his shoulder. - "Thought you were gonna get away, pig!" he yelled -drunkenly, attempting to seize me by the chest with his free -hand. - I retreated to the fence and said, addressing myself to -the short fellow, "I had no business with you." - "Stop being a rowdy," said the distant one sharply. - "I remember you very well indeed," yelled the drunk. -"You're not going to get away from me! I'll get even with you!" - He advanced upon me in surges, dragging the short one, - who hung on with bulldog grimness, behind him. - "It's not him," cajoled the low-slung one, who was still -very merry. "That guy went off to the shivers and this one is -sober." - "You won't fool me." - "I'm warning you for the last time. We are going to expel -you." - "Got scared, the bum! Took off his bracelet." - "You can't even see him. You're worthless without your -glasses." - "I can see everything pe-erfectly!... And even if he isn't -the one..." - "Stop it! Enough is enough!" - The long one finally came back and grasped the drunk from -the other side. - "Will you move on!" he said to me with irritation, "Why -the devil are you stopping here! Haven't you ever seen a -drunk?" - "Oh, no! You aren't going to get away from me." - I continued on my way. I had not far to go by now. The -trio dragged along behind me noisily. - "I can see right through him, if you please. King of -Nature! Drunk enough to retch, and to beat up whoever comes -along. Got beat up himself, and that's all he needs.... Let go -of me, I'll hang a few good ones on his mug...." - "What have you come to, we have to walk you along like a -hood." - "So don't walk me!... I loathe them.... Shivers, wenches, -whiskey... brainless jelly..." - "Sure, sure, take it easy, just don't fall." - "Enough of your reproofs... I am sick of your hypocrisy, -your puritanism. We should blow them up, shoot them! Raze -everything off the face of the earth!" - "Drunk as a coot, and I thought he was sobered up!" - "I am sober. I remember everything... the twenty-eighth, -right?" - "Shut up, you fool." - "Shh! Right you are! The enemy is on the alert.... -Fellows, there was a spy here somewhere.... Didn't I talk to -him?... The son of a bitch took off his bracelet... but I'll -get that dick before the twenty-eighth!" - "Will you be quiet!" - "Shh! And not another word. That's it! And don't worry, -the grenade launchers are my baby." - "I am going to kill him right now, the bum!" - "Lay it on the enemies of civilization.... Fifteen hundred -meters of tear gas -- personally... six sectors... awk!" - I was already by the gate to my house. When I turned -around to look, the burly man was lying face down, the short -one was squatting alongside, while the long fellow stood -rubbing the edge of his right hand. - "Why did you do that?" said the short man. "You must have -maimed him." - "Enough prattle," said the long one furiously. "We can't -seem to learn to stop prattling. We can't learn to stop -boozing. Enough!" - Let us be as children, Doctor Opir, thought I, slipping -into the yard as quietly as possible. I held the latch to keep -it from clicking into place. - "Where did he go?" said the long one, lowering his voice. - "Who?" - "The guy who went ahead of us." - "Turned off somewhere." - "Where? Did you notice?" - "Listen, I wasn't concerned about him." - "Too bad. But all right, pick him up, and let's go." - Stepping into the shadow of the apple trees, I watched -them drag the drunk by the gate. He was wheezing horribly. - The house was quiet. I went to my quarters, undressed, and -took a hot shower. My shirt and shorts smelled of tear gas and -were covered with the greasy spots of the luminous liquid. I -threw them into the hamper. Next, I inspected myself in the -mirror and marveled once more at how lightly I had gotten away: -a bump behind the ear, a sizable contusion on the left -shoulder, and some scraped ribs. Also skinned knuckles. - On the night table, I discovered a notice which -respectfully suggested that I deposit a sum to cover the rent -for the apartment for the first thirty days. The sum was quite -considerable, but tolerable. I counted out a few credits and -stuffed them into the thoughtfully provided envelope, and then -lay down on the bed with my hands behind my head. The sheets -were cool and crisp, and a salty sea breeze blew in through the -open window. The phonor susurrated cozily behind my ear. I -intended to think awhile before falling asleep, but was too -exhausted and quickly dozed off. - Later, some noise in the background awakened me, and I -grew alert and listened with eyes wide open. - Somewhere nearby, someone either cried or sang in a thin -childish voice. I got up cautiously and leaned out the open -window. The thin halting voice was intoning: "... having stayed -in the grave but a short time, they come out and live among the -living as though alive." There was the sound of sobs. From far -away like the keening of a mosquito came the chant "Shi-vers! -Shi-vers!" The pitiable little voice went on -- "Blood and -earth mixed together they can't eat." I thought that it was -Vousi, drunk and lamenting upstairs in her room, and called out -softly, "Vousi!" No one replied, The thin voice cried out: -"Hence from my hair, hence from my flesh, hence from my bones," -and I knew who it was. I climbed over the window sill, jumped -onto the lawn, and went to the apple grove, listening to the -sobbing. Light appeared through the trees, and soon I came to a -garage. The doors were cracked open and I looked in. Inside was -a huge shiny Opel. Two candles were burning on the workbench. -There was a smell of gasoline and hot wax. - Under the candles, seated on a work stool, was Len, -dressed in a full-length white gown, in bare feet, with a -thick, well-worn book on his knees. He regarded me with -wide-open eyes, his face completely white and frozen with -terror. - "What are you doing here?" I said loudly and entered. - He continued to look at me in silence and started to -tremble. I could hear his teeth chattering. - "Len, old friend," I said, "I guess you didn't recognize -me. It's me -- Ivan." - He dropped the book and hid his hands in his armpits. As -earlier today, in the morning, his face beaded with cold sweat. -I sat down alongside of him and put my arm around his -shoulders. He collapsed against me weakly. He shook all over. I -looked at the book. A certain Doctor Neuf had blessed the human -race with An Introduction to the Science of Necrological -Phenomena. I kicked the book under the bench. - 'Whose ear is that?" I asked loudly. - "Mo... Mama's..." - "A very nice Ford." - "It's not a Ford. It's an Opel." - "You're right -- it is an Opel... a couple of hundred - miles per hour I would guess..." - "Yes." - "Where did you get the candles?" - "I bought them." - "Is that right! I didn't know that they sold candles in -our time. Is your bulb burned out? I went out in the garden, -you know, to get an apple off a tree, and then I saw the light -in the garage." - He moved closer to me and said, "Don't leave for a while -yet, will you?" - "OK. What do you say we blow out the lights and go to my -place?" - "No, I can't go there." - "Where can't you go?" - "In the house and to your place." He was talking with -tremendous conviction. "For quite a while yet. Until they fall -asleep." - "Who?" - "They." - "Who are -- they?" - "They -- you hear?" - I listened. There was only the rustle of branches in the - wind and somewhere very far away the cry of: "Shi-vers! -Shi-vers!"' - "I don't hear anything special," I said. - "That's because you don't know. You are new here and - they don't bother the new ones." - "But who are they, after all?" - "All of them. You've seen the fink with the buttons?" - "Pete? Yes, I saw him. But why is he a fink? In my - opinion, he's an entirely respectable man." - Len jumped up. - "Come on," he said in a whisper, "I'll show you. But be -quiet." - We came out of the garage, crept up to the house, and -turned a corner. Len held my hand all the time; his palm was -cold and wet.. - "There -- look," he said. - Sure enough, the sight was frightening. My customs friend -was lying on the porch with his head stuck at an unnatural -angle through the railing. The mercury vapor light from the -street fell on his face, which looked blue and swollen, and -covered with dark welts. Through half-open lids, the eyes could -be seen, crossed toward the bridge of the nose. - 'They walk among the living, like living people in the -daytime," murmured Len, holding on to me with both hands. "They -bow and smile, but at night their faces are white, and blood -seeps through their skin." I approached the veranda. The -customs man was dressed in pajamas. He breathed noisily and -exuded a smell of cognac. There was blood on his face, as -though he'd fallen on his face into some broken glass. - "He's just drunk," I said loudly. "Simply drunk and -snoring. Very disgusting." - Len shook his head. - "You are a newcomer," he whispered. "You see nothing. But -I saw." He shook again. "Many of them came. She brought them... -and they carried her in... there was a moon... they sawed off -the top of her head... and she screamed and screamed... and -then they started to eat with spoons. She ate, too, and they -all laughed when she screamed and flopped around..." - "Who? Who was it?" - "And then they piled on wood and burned it and danced -around the fire... and then they buried everything in the -garden... she went out to get the shovel in the car... I saw it -all... do you want to see where they buried her?" - "You know what, friend?" I said. "Let's go to my place." - "What for?" - "To get some sleep, that's what for. Everyone is sleeping --- only you and I are palavering here." - "Nobody is sleeping. You really are new. Right now no one -is sleeping. You must not sleep now." - "Let's go, let's go," said I, "over to my place." - "I won't go," he said. "Don't touch me. I didn't say your -name." - "I am going to take a belt," I said menacingly, "and I -will strap your behind." - Apparently this calmed him. He clutched my hand again and -became silent. - "Let's go, old pal, let's go," I said. "You're going to -sleep and I will sit alongside you. And if anything at all -happens, I will awaken you at once." - We climbed into my room through the window (he absolutely -refused to enter the house by the front door), and I put him to -bed. I intended to tell him a tale, but he fell asleep -immediately. His face looked tortured, and every few minutes he -quivered in his sleep. I pushed the chair by the window, -wrapped myself in a bathrobe, and smoked a cigarette to calm my -nerves. I attempted to think about Rimeyer and about the -Fishers, with whom I had not met up after all; about what must -happen on the twenty-eighth; and about the Art Patrons, but -nothing came of it and this irritated me. It was annoying that -I was unable to think about my business as something of -importance. The thoughts scattered and jumbled emotions -intruded, and I did not think so much as I felt. I felt that I -hadn't come for nothing, but at the same time, I sensed that I -had come for altogether the wrong reason. - But Len slept. He did not even awake when an engine -snorted at the gate, car doors were slammed, there were shouts, -chokes, and howls in different voices, so that I almost decided -that a crime was being committed in front of the house, when it -became clear that it was just Vousi coming back. Happily -humming, she began to undress while still in the garden, -negligently draping her blouse, skirt, and other garments over -the apple branches. She didn't notice me, came into the house, -shuffled around upstairs for a while, dropped something heavy, -and finally settled down. It was close to five o'clock. The -glow of dawn was kindling over the sea. - -

    Chapter EIGHT

- - When I woke up, Len was already gone. My shoulder ached so -badly that the pain pounded in my head, and I promised myself -to take it easy the whole day. Grunting and feeling sick and -forlorn, I executed a feeble attempt at set-ting-up exercises, -approximated a wash-up, took the envelope with the money, and -set out far Aunt Vaina, moving edge-wise through the doorway. -In the hall, I stopped in indecision: it was quiet in the -house, and I wasn't sure that my landlady was up. But at this -point the door to her side of the house opened, and Pete, the -customs man, came out into the hall. Well, well, thought I. At -night he had looked like a drowned drunk. Now in the light of -day, he resembled a victim of a hooligan attack. The lower part -of his face was dark with blood. Fresh blood glistened on his -chin, and he held a handkerchief under his jaw to keep his -snow-white braided uniform clean. His face was strained and his -eyes tended to cross, but in general, he held himself -remarkably calm, as though falling face-down into broken glass -was a most ordinary event for him. A slight misadventure, you -know, can happen to anybody; please don't pay it any attention; -every-thing will be all right. - "Good morning," I mumbled. - "Good morning," he responded, politely dabbing his chin -cautiously and sounding a bit nasal. - "Anything the matter? Can I help?" - "A trifle," he said. ' The chair fell." - He bowed courteously, and passing by me, unhurriedly left -the house. I observed his departure with a thoroughly -unpleasant feeling, and when I turned back toward the door, I -found Aunt Vaina standing in front of me. She stood in the -doorway, gracefully leaning on the jamb, all clean, rosy, and -perfumed, and looking at me as though I was Major General Tuur -or, at least, Staff Major Polom. - "Good morning, early bird," she cooed. "I was puzzled -- -who would be talking at this hour?" - "I couldn't bring myself to disturb you," I said, -shuddering fashionably and mentally howling at the pain in my -shoulder. "Good morning, and may I take the }liberty to hand -you --" - "How nice! You can tell a real gentleman right away. Major -General Tuur used to say that a true gentleman never makes -anyone wait. Never. Nobody..." - I became aware that slowly but very persistently, she was -herding me away from her door. The living room was darkened, -with the drapes apparently drawn, and some strange sweet smell -was wafting out of it into the hall. - "But you did not have to be in such a rush, really..." - She was finally in a convenient position to close the door -with a smooth negligent gesture. "However, you can be sure that -I will value your promptness appropriately. Vousi is still -asleep, and it's time for me to get Len off to school. So if -you will excuse me... By the way, we have the newspapers on the -veranda." - "Thank you," I said, retreating. - "If you'll have the patience, I would like to ask you to -join me for breakfast and a cup of cream." - "Unfortunately, I will have to be going," I said, bowing -out. - As to newspapers, there were six. Two local, illustrated, -fat as almanacs; one from the capital; two luxurious weeklies; -and, for some reason, the Arab El Gunia. The last I put -aside, and sifted through the others, accompanying the news -with sandwiches and hot cocoa. - In Bolivia, government troops, after stubborn fighting, -had occupied the town of Reyes. The rebels were pushed across -the River Beni. In Moscow, at the international meeting of -nuclear physicists, Haggerton and Soloviev announced a project -for a commercial installation to produce anti-matter. The -Tretiakoff Gallery had arrived in Leopoldville, official -opening being scheduled for tomorrow. The scheduled series of -pilotless craft had been launched from the Staryi Vostok base -on Pluto into the totally free flight zone; communications with -two of the craft were temporarily disrupted. The General -Secretary of the UN had directed an official message to -Orolianos, in which he warned that in the event of a repetition -of the use of atomic grenades by the extremists, UN police -forces would be introduced into Eldorado. In Central Angola, at -the sources of the River Kwando, an archaeological expedition -of the Academy of Sciences of the UAR had uncovered the remains -of a cyclopean construction, apparently dating from well before -the ice age. A group of specialists of the United Center for -the Investigation of Subelectronic (Ritrinitive) Structures had -evaluated the energy reserves available to mankind as -sufficient for three billion years. The cosmic branch of Unesco -had announced that the relative population growth of -extraterrestrial centers and bases now approached the -population growth on Earth. The head of the British delegation -to the UN had put forth a proposal, in the name of the great -powers, for the total demilitarization, by force if need be, of -the remaining militarized regions on the globe. - Information about how many kilos were pressed by whom and -about who drove how many balls through whose goal posts I did -not bother to read. Of the local announcements, I was intrigued -by three. The local paper, Joy of Life, reported: "Last night a -group of evil-minded men again carried out a private plane raid -on Star Square, which was full of citizens taking their -leisure. The hooligans fired several machine-gun bursts and -dropped eleven gas bombs. As a result of the ensuing panic, -several men and women suffered severe injuries. The normal -recreation of hundreds of respectable people was disrupted by a -small group of bandit (excuse the term) intelligentsia with the -obvious connivance of the police. The president of the Society -for the Good Old Country Against Evil Influences informed our -correspondent that the Society intended to take into its own -hands the matter of the protection of the well-earned rest of -fellow citizens. In no equivocal manner, the president let it -be known whom specifically the people regarded as the source of -the harmful infection, banditism, and militarized -hooliganism..." - On page twelve, the paper devoted a column to an article -by "the outstanding proponent of the latest philosophy, the -laureate of many literary prizes, Doctor Opir." The treatise -was titled "World Without Worry." With beautiful words and most -convincingly indeed, Doctor Opir established the omnipotence of -science, called for optimism, derided gloomy skeptics and -denigrators, and invited all "to be as children." He assigned a -specially important role in the formation of contemporary -(i.e., anxiety-free) psychology to electric wave -psychotechnics. "Recollect what a wonderful charge of vigor and -good feeling is imparted by a bright, happy, and joyful dream!" -exclaimed this representative of the latest philosophy. "It is -no wonder that sleep has been known for over a hundred years to -be a curative agent for many psychic disturbances. But we are -all a touch ill: we are sick with our worries, we are overcome -by the trivia of daily routine, we are irritated by the rare -but still remaining few malfunctions, the inevitable frictions -among individuals, the normal healthy sexual unsatisfiedness, -the dissatisfaction with self which is so common in the makeup -of each person. ... As fragrant bath salts wash away the dust -of travel from our tired bodies, so does a joyful dream wash -away and purify a tired psyche. So now, we no longer have to -fear any anxieties or malfunctions. We well know that at the -appointed hour, the invisible radiation of the dream generator, -which together with the public I tend to call by the familiar -name of 'the shivers,' will heal us, fill us with optimism, and -return to us the wonderful feeling of the joy of being alive." -Further, Doctor Opir expounded that the shivers were absolutely -harmless physically and psychologically, and that the attacks -of detractors who wished to see in the shivers a resemblance to -narcotics and who demagogically ranted about a "doped mankind," -could not but arouse in us a painful incomprehension, and, -conceivably, some stronger public-spirited emotions that could -be dangerous to the malevolently inclined citizens. In -conclusion, Doctor Opir pronounced a happy dream to be the best -kind of rest, vaguely hinted that the shivers constituted the -best antidote to alcoholism and drug addiction, and insistently -warned that the shivers should not be confused with other (not -medically approved) methods of electric wave application. - The weekly Golden Days informed the public that a valuable -canvas, ascribed in the opinion of experts to the gifted band -of Raphael, had been stolen from the National Art Galleries. -The weekly called the attention of the authorities to the fact -that this criminal act was the third during the past four -months of this year, and that neither of the previously stolen -works of art had ever been found. - All in all, there was really nothing to read in the -weeklies. I glanced through them quickly, and they left me with -the most depressing impression. - All were filled with desolate witticisms, artless -caricatures, among which the "captionless" series stood out -with particular imbecility, with biographies of dim -personalities, slobbering sketches of life in various layers of -society, nightmarish series of photos with such titles as "Your -husband at work and at home," endless amounts of useful advice -on how to occupy your time without, God forbid, burdening your -head, passionately idiotic sallies against alcoholism, -hooliganism, and debauchery, and calls to join clubs and -choruses with which I was already familiar. There were also -memoirs of participants in the "fracas" and in the struggle -against organized crime, which were served up in the literary -style of jackasses totally lacking in taste or conscience. -These were obviously exercises of addicts of literary -sensationalism, loaded with suffering and tears, magnificent -feats and saccharine futures. There were endless crosswords, -chainwords, rebuses, and puzzle pictures. - I flung the pile of papers into the corner. What a dreary -place they had here! The boob was coddled, the boob was -lovingly nurtured, and the boob was cultivated; the boob had -become the norm; a little more and he would become the ideal, -while jubilant doctors of philosophy would exultantly dance -attendance upon him. But the papers were in full choreographic -swing even now. Oh, what a wonderful boob we have! Such an -optimistic boob, and such an intelligent boob, such a healthy -alert boob, and with such a fine sense of humor; and oh boob, -how well and adroitly you can solve crossword puzzles! But most -important of all, boob, don't you worry about a thing, -everything is quite all right, everything is just dandy, -everything is in your service, the science and the literature, -just so you can be amused and don't have to think about a -thing.... As for those seditious skeptics and hoodlums, boob, -we'll take care of them! With your help, we can't help but take -care of them! What are they complaining about, anyway? Do they -have more needs than other people? - Dreariness and desolation! There had to be some curse upon -these people, some awful predilection for dangers and -disasters. Imperialism, fascism, tens of millions of people -killed and lives destroyed, including millions of these same -boobs, guilty and innocent, good and bad. The last skirmishes, -the last putsches, especially pitiless because they were the -last. Criminals, the military driven berserk by prolonged -uselessness, all kinds of leftover trash from intelligence and -counterintelligence, bored by the sameness of commercial -espionage, all slavering for power. Again we were forced to -return from space, to come out of our laboratories and -factories, to call back our soldiers. And we managed it again. -The zephyr was gently turning the pages of History of -Fascism by my feet. But hardly had we had the time to savor -the cloudless horizons, when out of these same sewers of -history crept the scum with submachine guns, homemade quantum -pistols, gangsters, syndicates, gangster corporations, gangster -empires. "Minor malfunctions are still encountered here and -there," soothed and calmed Doctor Opir, while napalm bottles -flew through university windows, cities were seized by bands of -outlaws, and museums burned like candles.... All right. -Brushing aside Doctor Opir and his kind, once again we came out -of space, out of the labs and factories, recalled the soldiers, -and once again managed the problem. And again the skies were -clear. Once more the Opirs were out, the weeklies were purring, -and once more filth was flowing out of the same sewers. Tons of -heroin, cisterns of opium, and oceans of alcohol, and beyond -all that something new, something for which we had no name.... -Again everything was hanging by a thread for them, and boobs -were solving crosswords, dancing the fling, and desired but one -thing: to have fun. But somewhere idiot children were being -born, people were going insane, some were dying strangely in -bathtubs, some were dying no less strangely with some group -called the Fishers, while art patrons defended their passion -for art with brass knuckles. And the weeklies were attempting -to cover this foul-smelling bog with a crust, fragile as a -meringue, of cloyingly sweet prattle, and this or that -diplomaed fool glorified sweet dreams, and thousands of idiots -surrendered with relish to dreams in lieu of drunkenness (so -that they need not think)... and again the boobs were persuaded -that all was well, that space was being developed at an -unprecedented pace (which was true), and that sources of energy -would last for billions of years (which was also true), that -life was becoming unquestionably more interesting and varied -(which was also undoubtedly true, but not for boobs), while -demagogue-denigrators (real-thinking men who considered that in -our times any drop of pus could infect the whole of mankind, as -once upon a time a beer putsch turned into a world menace) were -foreign to the people's interests and deserved of universal -condemnation. Boobs and criminals, criminals and boobs. - "Have to work at it," I said aloud. "To hell with -melancholy! We'd show you skeptics!" - It was time to go see Rimeyer. Although there were the -Fishers. But all right, the Fishers could be attended to later. -I was tired of poking around in the dark. I went out in the -yard. I could hear Aunt Vaina feeding Len. - "But, Mom, I don't want any!" - "Eat, son, you must eat. You are so pale." - "I don't want to. Disgusting lumps l" - "What lumps? Here, let me have some myself! Mm! Delicious! -Just try some and you'll see it's very tasty." - "But I don't want any! I'm ill, I'm not going to school." - "Len, what are you saying? You've skipped a lot of days as -it is." - "So what?" - "What do you mean, so what? The director has already -called me twice. We'll be fined." - "Let them fine us!" - "Eat, son, eat. Maybe you didn't get enough sleep?" - "I didn't. And my stomach hurts... and my head... and my -tooth, this one here, you see?" - Len's voice sounded peevish, and I immediately visualized -his pouting lips and his swinging stockinged foot. - I went out the gate. The day was again clear and sunny, -full of bird twitter. It was still too early, so that on my way -to the Olympic, I met only two people. They walked together by -the curb, monstrously out of place in the joyful world of green -branch and clear blue sky. One was painted vermilion and the -other bright blue. Sweat beaded through the paint on their -bodies. Their breaths heaved through open mouths and the -protruding eyes were bloodshot. Unconsciously I unbuttoned all -the buttons of my shirt and breathed with relief when this -strange pair passed me. - At the hotel I went right up to the ninth floor. I was in -a very determined mood. Whether Rimeyer wanted to or not, he -would have to tell me everything I wanted to know. As a matter -of fact, I needed him now for other things as well. I needed a -listener, and in this sunny bedlam I could talk openly only to -him, so far. True, this was not the Rimeyer I had counted on, -but this too had to be talked cut in the end.... - The red-headed Oscar stood by the door to Rimeyer's suite, -and, seeing him, I slowed my steps. He was adjusting his tie, -gazing pensively at the ceiling. He looked worried. - "Greetings," I said -- I had to start somehow. - He wiggled his eyebrows and looked me over, and I was -aware that he remembered me. He said slowly, "How do you do." - "You want to see Rimeyer, too?" l asked. - "Rimeyer is not feeling well," he said. He stood hard by -the door and apparently had no intention of letting me by. - "A pity," I said, moving up on him. "And what is his -problem?" - "He is feeling very bad." - "Oh, oh!" I said. "Someone should have a look." - I was now right up against Oscar. It was obvious he was -not about to give way. My shoulder responded at once with a -flare of pain. - "I am not sure it's all that necessary," he said. - "What do you mean? Is it really that bad?" - "Exactly. Very bad. And you shouldn't bother him. Not -today, or any other day!" - It seems I arrived in time, I thought, and hopefully not -too late. - "Are you a relative of his?" I asked. My attitude was most -peaceable. - He grinned. - "I am his friend. His closest friend in this town. A -childhood friend, you might say." - 'This is most touching," I said. "But I am his relative. -Same as a brother. Let's go in together and see what his friend -and brother can do for poor Rimeyer." - "Maybe his brother has already done enough for Rimeyer." - "Really now... I only arrived yesterday." - "You wouldn't, by any chance, have other brothers around -here?" - "I don't think there are any among your friends, with the -exception of Rimeyer." - While we were carrying on with this nonsense, I was -studying him most carefully. He didn't look too nimble a type --- even considering my defective shoulder. But he kept his -hands in his pockets all the time, and although I didn't think -he would risk shooting in the hotel, I was not of a mind to -chance it. Especially as I had heard of quantum dischargers -with limited range. - I have been told critically many times that my intentions -are always clearly readable on my face. And Oscar was -apparently an adequately keen observer. I was coming to the -conclusion that he obviously did not have anything there at -all, that the hands-in-the-pocket act was a bluff. He moved -aside and said, "Go on in." - We entered. Rimeyer was indeed in a bad way. He lay on the -couch covered with a torn drape, mumbling in delirium. The -table was overturned, a broken bottle stained the middle of the -floor, and wet clothes were strewn all over the room. I -approached Rimeyer and sat down by him so as not to lose sight -of Oscar, who stood by the window, half-sitting on the sill. -Rimeyer's eyes were open. I bent over him. - "Rimeyer," I called. "It's Ivan. Do you recognize me?" - He regarded me dully. There was a fresh cut on his chin -under the stubble. - "So you got there already..." he muttered. "Don't prolong -the Fishers... doesn't happen... don't take it so hard ... -bothered me a lot... I can't stand..." - It was pure delirium. I looked at Oscar. He listened with -interest, his neck stretched out. - "Bad when you wake up..." mumbled Rimeyer. "Nobody... wake -up... they start... then they don't wake up..." - I disliked Oscar more and more. I was annoyed that he -should be hearing Rimeyer's ravings. I didn't like his being -here ahead of me. And again, I didn't like that cut on -Rimeyer's chin -- it was quite fresh. How can I be rid of you, -red-haired mug, I wondered. - "We should call a doctor," I said. "Why didn't you call a -doctor, Oscar? I think it's delirium tremens." - I regretted the words immediately. To my considerable -surprise, Rimeyer did not smell of alcohol at all, and Oscar -apparently knew it. He grinned and said, "Delirium tremens? Are -you sure?" - "We have to call a doctor at once," I said. "Also, get a -nurse." - I put my hand on the phone. He jumped up instantly and put -his hand on mine. - "Why should you do it?" he said. "Better let me call a -doctor. You are new here and I know an excellent doctor." - "Well, what kind of a doctor is he?" I objected, studying -the cut on his knuckles -- which was also quite new. - "An exemplary doctor. Just happens to be a specialist on -the DT's." - Rimeyer said suddenly, "So I commanded... also -spracht Rimeyer... alone with the world..." - We turned to look at him. He spoke haughtily, but his eyes -were closed, and his face, draped in loose, gray skin, seemed -pathetic. That swine Oscar, I thought, where does he get the -gall to linger here? A sudden wild thought flashed through my -head -- it seemed at that moment exceedingly well conceived: to -disable Oscar with a blow to the solar plexus, tie him up, and -force him then and there to expose everything he knew. He -probably knew quite a lot. Possibly everything. He looked at -me, and in his pale eyes was a blend of fear and hatred. - "All right," I said. "Let the hotel call the doctor." - He removed his hand and I called service. While waiting -for the doctor, I sat by Rimeyer, and Oscar walked from corner -to corner, stepping over the liquor puddle. I followed him out -of the corner of my eye. Suddenly he stooped and picked up -something off the floor. Something small and multicolored. - "What have you got there?" I inquired indifferently. - He hesitated a bit and then threw a small flat box with a -polychrome sticker on my knees. - "Ah!" I said, and looked at Oscar. "Devon." - "Devon," he responded. "Strange that it's here rather than -in the bathroom." - The devil, I thought. Maybe I was still too green to -challenge him openly. I still knew but very little of this -whole mess. - "Nothing strange about that," I said at random. "I believe -you distribute that repellent. It's probably a sample which -fell out of your pocket." - "Out of my pocket?" He was astonished. "Oh, you think that -I... But I finished my assignments a long time ago, and now I'm -just taking it easy. But if you're interested, I can be of some -help." - That s very interesting, I said. "I will consult --" - Unfortunately, the door flew open at this point, and a -doctor accompanied by two nurses entered the room. - The doctor turned out to be a decisive individual. He -gestured me off the couch and flung the drape off Rimeyer. He -was completely naked. - "Well, of course," said the doctor. "Again..." - He raised Rimeyer's eyelid, pulled down his lower lip, and -felt his pulse. "Nurse - cordeine! And call some chambermaids -and have them clean out these stables till they shine." He -stood up and looked at me. "A relative?" - "Yes," I said, while Oscar kept still. - "You found him unconscious?" - "He was delirious," said Oscar. - "You carried him out here?" - Oscar hesitated. - "I only covered him with the drape," he said. "When I -arrived, he was lying as he is now. I was afraid he would catch -cold." - The doctor regarded him for a while, and then said, "In -any case, it is immaterial. Both of you can go. A nurse will -stay with him. You can call this evening. Goodbye." - "What is the matter with him, Doctor?" I asked. - "Nothing special. Overtired, nervous exhaustion... besides -which he apparently smokes too much. Tomorrow he can be moved, -and you can take him home with you. It would be unhealthy for -him to stay here with us. There are too many amusements here. -Goodbye." - We went out into the corridor. - "Let's go have a drink," I said. - "You forgot that I don't drink," corrected Oscar. - "Too bad. This whole episode has upset me. I'd like a -snort. Rimeyer always was such a healthy specimen." - "Well, lately he has slipped a lot," said Oscar carefully. - "Yes, I hardly recognized him when I saw him yesterday." - "Same here," said Oscar. He didn't believe a word of it, -and neither did I. - "Where are you staying?" I asked. - "Right here," said Oscar. "On the floor below, number -817." - "Too bad that you don't drink. We could go to your room -and have a good talk." - "Yes, that wouldn't be a bad idea. But, regretfully, I am -in a great rush." He was silent awhile. "Let me have your -address. Tomorrow morning, I'll be back and drop in to see you. -About ten -- will that suit you? Or you can ring me up." - "Why not?" I said and gave him my address. "To be honest -with you, I am quite interested in Devon." - "I think we'll be able to come to an understanding," said -Oscar. "Till tomorrow!" - He ran down the stairs. Apparently he really was in a -hurry. I went down in the elevator and sent off a telegram to -Matia: "Brother very ill, feeling very lonesome, but keeping up -spirits, Ivan." I truly did feel very much alone. Rimeyer was -out of the game again, at least for a day. The only hint he had -given me was the advice about the Fishers. I had nothing more -definite. There were the Fishers, who were located somewhere in -the old subway; there was Devon, which in same peripheral way -could have something to do with my business, but also could -just as well have no connection with it at all; there was -Oscar, clearly connected with Devon and Rimeyer, a player -sufficiently ominous and repulsive, but undoubtedly only one of -many such unpleasant types on the local cloudless horizons; -then again there was a certain "Buba," who supplied pore-nose -with Devon.... After all, I have been here just twenty-four -hours, I thought. There is time. Also, I could still count on -Rimeyer in the final analysis, and there was the possibility of -finding Peck. Suddenly I remembered the events of the night -before and sent a wire to Sigmund: "Amateur concert on the -twenty-eighth, details unknown, Ivan." Then I beckoned to a -porter and inquired as to the shortest way to the old subway. - -

    Chapter NINE

- - "You would do better to come at night. It's too early -now." - "I prefer now." - "Can't wait, eh? Perhaps you've got the wrong address?" - "Oh no, I haven't got it wrong." - "You must have it now, you are sure?" - "Yes, now and not later." - He clicked his tongue and pulled on his lower lip. He was - short, well knit, with a round shaved head. He spoke -hardly moving his tongue and rolling his eyes languidly under -the lids. I thought he had not had enough sleep. His companion, -sitting behind the railing in an easy chair, apparently also -had missed some. But he did not utter a word and didn't even -look in my direction. It was a gloomy place, with stale air and -warped panels which had sprung away from the walls. A bulb, -dimmed with dust, hung shadeless from the ceiling on a dirty -cable. - "Why not come later?" said the round-head. "When everybody -comes." - "I just got the urge," I said diffidently. - "Got the urge..." He searched in his table drawer. "I -don't even have a form left. Eli, do you have some?" - The latter, without breaking his silence, bent over and -pulled out a crumpled sheet of paper from somewhere near the -railing. - The round-head said, yawning, "Guys that come at break of -day... nobody here... no girls... they're still in bed." He -proffered the form. "Fill it out and sign. Eli and I will sign -as witnesses. Turn in your money. Don't worry, we keep it -honest. Do you have any documents?" - "None." - "That's good, too." - I scanned the form. "In open deposition and of my own - free will, I, the undersigned, in the presence of -witnesses, earnestly request to be subjected to the initiation -trials toward the mutual quest of membership in the Society of -VAL." There were blank spaces for signature of applicant and -signatures of witnesses. - "What is VAL?" I asked. - "That's the way we are registered," answered round-head. -He was counting my money. - "But how do you decipher it?" - "Who knows? That was before my time. It's VAL, that's all -there is to it. Maybe you know, Eli?" Eli shook his bead -lazily. "Well, really, what do you care?" - "You are absolutely right." I inserted my name and signed. - Round-head looked it over, signed it, and passed the form -to Eli. - "You look like a foreigner," he said. - "Right." - "In that case, add your home address. Do you have -relatives?" - "No." - "Well then, you don't have to. All set, Eli? Put it in the -folder. Shall we go?" - He lifted up the gate in the railway and walked me over to -a massive square door, probably left over from the days when -the subway had been fitted out as an atomic shelter. - "There is no choice," he said as though in self-defense. -He pulled the slides and turned a rusty handle with -considerable effort. "Go straight down the corridor and then -you'll see for yourself." - I thought that I heard Eli snickering behind him. I turned -around. A small screen was fitted in the railing in front of -Eli. Something was moving on the screen, but I could not see -what it was. Round-bead put all his weight on the handle and -swung back the door. A dusty passage became visible. For a few -seconds he listened and then said, "Straight down this -corridor." - "What will I find there?" I said. - "You'll get what you were looking for. Or have you changed -your mind?" - All of which was clearly not what I was looking for, but -as is well known, nobody knows anything until he has tried it -himself I stepped over the high sill and the door shut behind -me with a clang. I could hear the latches screeching home. - The corridor was lit by a few surviving lamps. It was -damp, and mold grew an the cement walls. I stood still awhile, -listening, but there was nothing to be heard but the infrequent -tap of water drops. I moved forward cautiously. Cement rubble -crunched underfoot. Soon the corridor came to an end, and I -found myself in a vaulted, poorly lit concrete tunnel. When my -eyes accommodated to the darkness, I discerned a set of tracks. -The rails were badly rusted and puddles of dark water gleamed -motionless along their length. Sagging cables hung from the -ceiling. The dampness seeped to the marrow of my bones. A -repulsive stench of sewer and carrion filled my nostrils. No, -this was not what I was looking for. I was not of a mind to -fritter away my time and thought of going back and telling them -that I would be back some other time. But first, simply out of -curiosity, I decided to take a short walk along the tunnel. I -went to the right toward the light of distant bulbs. I jumped -puddles, stumbled over the rotting ties, and got entangled in -loose wires. Reaching a lamp, I stopped again. - The rails had been removed. Ties were strewn along the -walls, and holes filled with water gaped along the right of -way. Then I saw the rails. I have never seen rails in such a -condition. Some were twisted into corkscrews. They were -polished to a high shine and reminded me of gigantic drill -bits. Others were driven with titanic force into the floor and -walls of the tunnel. A third group were tied into knots. My -skin crawled at this sight. Some were simple knots, some with a -single bow, some with a double bow like shoelaces. They were -mauve and brown. - I looked ahead into the depths of the tunnel. The smell of -rotting carrion wafted out of it, and the dim yellow lights -winked rhythmically as though something swayed in the draft, -covering and uncovering them periodically. My nerves gave way. -I felt that this was nothing more than a stupid joke, but I -couldn't control myself. I squatted down and looked around. I -soon found what I was looking for -- a yard-long piece of -reinforcing rod. I stuck it under my arm and went ahead. The -iron was wet and cold and rough with rust. - The reflection of the winking lights glinted on slippery -wet walls. I had noticed some time back the round, -strange-looking marks on them, but at first did not pay them -any attention. Then I became interested and examined them more -closely. As far as the eye could reach, there were two sets of -round prints on the walls at one-meter intervals. It looked as -though an elephant had run along the wall -- and not too long -ago at that. On the edge of one of the prints, the remains of a -crushed centipede still struggled feebly. Enough, I thought, -time to go back. I looked along the tunnel. Now I could plainly -see the swaying curves of black cables under the lamps. I took -a better grip on the rod and went ahead, holding close to the -wall. - The whole thing was getting through to me. The cables -sagged under the arch of the tunnel, and on them, tied by their -tails into hairy clusters, hung hundreds upon hundred of dead -rats, swaying in the draft. Tiny teeth glinted horribly in the -semi-dark, and rigid little legs stuck out in all directions. -The clusters stretched in long obscene garlands into the -distance. A thick, nauseating stench oozed from under the arch -and flowed along the tunnel, as palpable as glutinous jelly. - There was a piercing screech and a huge rat scurried -between my feet. And then another and another. I backed up. -They were fleeing from there, from the dark where there was not -a single lamp. Suddenly, warm air came pulsing from the same -direction. I felt a hollow space with my elbow and pressed -myself into the niche. Something live squirmed and squeaked -under my heel; I swung my iron rod without looking. I had no -time for rats, because I could hear something running heavily -but softly along the tunnel, splashing in the puddles. It was a -mistake to get involved in this business, thought I. The iron -rod seemed very light and insignificant in comparison with the -bow-tied rails. This was no flying leech, nor a dinosaur from -the Kongo... don't let it be a giganto-pithek, I thought, -anything but a giganto-pithek. These donkeys would have the wit -to catch one and let it loose in the tunnel. I was thinking -very poorly in those few seconds. And suddenly for no reason at -all I thought of Rimeyer. Why had he sent me here? Had he gone -out of his mind? If only it was not a giganto-pithek! - It raced by me so fast that I couldn't discern what it -was. - The tunnel boomed from its gallop. Then there was the -despairing scream of a caught rat right close by and... -silence. Cautiously I peeked out. He stood about ten paces away -directly under one of the lamps, and my legs suddenly went limp -from relief. - "Smart-alec entrepreneurs," I said aloud, almost crying. -'They would dream up something like this." - He heard my voice and raising his stern legs, pronounced: -"Our temperature is two meters, twelve inches, there is no -humidity, and what there isn't is not there." - "Repeat your orders," I said, approaching him. - He let the air out of his suction cups with a loud -whistle, twitched his legs mindlessly, and ran up on the -ceiling. - "Come down," I said sternly, "and answer my question." - He hung over my head, this poor long-obsolete cyber, -intended for work an the asteroids, pitiable and out of place, -covered with flakes of corrosion and blobs of black underground -dirt. - "Get down," I barked. - He flung the dead rat at me and sped off into the dark. - "Basalts! Granites!" he yelled in different voices. -"Pseudo-metamorphic types! I am over Berlin! Do you copy! Time -to get to bed!" - I threw away the rod and followed him. He ran as far as -the next lamp, came down, and began to dig the concrete -rapidly, like a dog, with his heavy work manipulators. Poor -chap, even in better times his brain was capable of performing -properly only in less than one one-hundredth of a G, and now he -was altogether out of his mind. I bent over him and began to -search for the control center under his armor. "The rotters," I -said aloud. The controls were peened over as though battered -with a sledge. He stopped digging and grabbed me by the leg. - "Stop!" I shouted. "Desist!" - He desisted, lay down on his side, and informed me in a -basso voice, "I am deathly tired of him, Eli. Now would be the -time for a shot of brandy." - Contacts clicked inside him and music poured forth. -Hissing and whistling, he gave a rendition of the "Hunters' -March." I was looking at him and thinking how stupid and -repulsive it all was, how ridiculous and at the same time -frightening. If I had not been a spaceman, if I had been -frightened and run, he would almost certainly have killed me. -But nobody here knew I had been in space. Nobody. Not one -person. Even Rimeyer didn't know. - "Get up," I said. - He buzzed and started to dig the wall, and I turned around -and went back. All the time while I was returning to my -turn-off I could hear him rattling and clanging in the pile of -contorted rails, hissing with the electrowelder and ranting -nonsense in two voices. - The anti-atomic door was already open, and I stepped over -the sill, swinging it shut behind me. - "Well, how was it?" asked round-head. - "Dumb," I replied. - "I had no idea you were a spaceman. You have worked out on -the planets?" - "I have. But it's still dumb. For fools. For illiterate -keyed-up boobs." - "What kind?" - "Keyed-up." - "Well -- there you got it wrong. Lots of people like it. -Anyway, I told you to come at night. We don't have much -amusement for singles." He poured some whiskey and added some -soda from the siphon. "Would you like some?" - I took the glass and leaned on the railing. Eli gloomily -regarded the screen, a cigarette sticking to his lip. On the -screen careened shifting views of the glistening tunnel walls, -twisted rails, black puddles, and flying sparks from the -welder. - 'That's not for me," I announced. "Let barbers and -accountants enjoy it. Of course, I have nothing against them, -but what I need is something the likes of which I have not seen -in my entire life." - "So you don't know yourself what you want," said -roundhead. "It's a hard case. Excuse me, you aren't an Intel?" - "Why?" - "Well, don't take offense -- we are all equal before the -grim reaper, you understand. What am I trying to say? That -Intels are the most difficult clients, that's all. Isn't that -right, Eli? If one of your barbers or bookkeepers comes here, -he knows very well what it is he needs. He needs to get his -blood going, to show off and be proud of himself, to get the -girls squealing, and exhibit the punctures in his side. These -fellows are simple, each one wants to consider himself a man. -After all, who is he -- our client? He has no particular -capabilities, and he doesn't need any. In earlier times, I read -in a book, people used to be envious of each other -- the -neighbor is rolling in luxury and I can't save up for a -refrigerator -- how could you put up with that? They hung on -like bulldogs to all kinds of trash, to money, to cushy jobs -- -they laid down their lives for such things. The guy with a -foxier head or a stronger fist would wind up on top. But now -life has become affluent and dull and there is a plenty of -everything. What shall a man apply himself to? A man is not a -fish, for all that, he is still a man and gets bored, but can't -dream up something to do for himself. To do that you need -special talents, you need to read a mountain of books, and how -can he do that when they make him throw up. To become -world-famous or to invent some new machine, that's something -that wouldn't pop into his head, but even if it did, of what -use would it be? Nobody really needs you, not even your own -wife and children if you examine it honestly. Right, Eli? And -you don't need anybody either. Nowadays, it seems, clever -people think things up for you, something new like these -aerosols, or the shivers, or a new dance. There is that new -drink -- it's called a polecat. Wanna me knock one together for -you? So he downs some of this polecat, his eyes crawl out of -their sockets, and he's happy. But as long as his eyes are in -their sockets, life is just as dull as rainwater for him. There -is an Intel that comes here to us, and every time he complains: -Life, he says, is dull, my friends... but I leave here a new -man; after, say, 'bullets' or 'twelve to one,' I see myself in -a completely new light. Right, Eli? Everything becomes sweet -all over again, food, drink, women." - "Yes," I said sympathetically. "I understand you very -well. But for me it's all too stale." - "Slug is what he needs," said Eli in his bass voice. - "What's that again?" - "Slug is what I said." - Round-head puckered in distaste. - "Aw, come on, Eli. What's with you today?" - "I don't give a hoot for the likes of him," said Eli. "I -just don't like these guys. Everything is insipid for him, -nothing suits him." - "Don't listen to him," said round-head. "He hasn't slept -all night and is very tired." - "Well, why not," I contradicted. "I am quite interested. -What is this slug?" - Round-head puckered his face again. - "It's not decent, you understand?" he said. "Don't listen -to Eli, he is a good enough guy, a simple fellow, but it's -nothing for him to lambaste a man. It's a bad term. Certain -types have taken to writing it all over the walls. Hooligans, -that's what they are, right? The snot-noses hardly know what -it's about, but they write anyway. See how we had to plane off -the railing? Some son of a bitch carved into it, and if I catch -him, I'll turn his hide inside out. We do have women coming -here too." - "Tell him," pronounced Eli, addressing himself to -roundhead, "that he should get hold of a slug and quiet down. -Let him find Buba..." - "Will you shut up, Eli?" said round-head, now angry. -"Don't pay any attention to him." - Having heard the name Buba, I helped myself to another -drink and settled more comfortably on the railing. - "What's it all about?" I said. "Some kind of secret vice?" - "Secret!" boomed Eli, and let out an obscene horselaugh. - Round-head laughed, too. - "Nothing can be a secret here," he said. "What had of -secrets can there be when people are living it up at the age of -fifteen? The dopes, the Intels, manufacture secrets. They'd -like to get a fracas going on the twenty-eighth, they are all -in a huddle, took some mine launchers out of town recently to -hide them, like kids, honest to God! Right, Eli?" - "Tell him," the good simple fellow Eli was persisting. -"Tell him to be off to Hell and gone. And don't go protecting -him. Just tell him to go to Buba at the Oasis and that's that." - He threw my wallet and form on the railing. I finished the -whiskey. Round-head said soberly, "Of course, it's entirely up -to you, but my advice is to stay away from that stuff. Maybe -we'll all come to it someday, but the later, the better. I -can't even explain it to you, I only feel that it is like the -grave: never too late and always too soon." - "Thank you," I said. - "He even thanks you." Eli let loose another horselaugh. -"Have you seen anything like it! He thanks you!" - "We kept three dollars," said round-head. "You can tear up -the blank. Or let me tear it up. God forbid something should -happen to you, the police will come looking to us." - "To be honest with you," I said, putting the wallet away, -"I don't understand how they haven't closed your office -already." - "Everything is on the up and up with us," said round-head. -"If you don't want any, no one is forcing you. But if something -should happen, it's your own fault." - "No one is forcing the drug addicts either," I retorted. - "That's some comparison! Drugs are a profiteering corrupt -business!" - "Well, okay, I'll be seeing you," I said. "Thanks, -fellows. Where did you say to look for Buba?" - "At the Oasis," boomed Eli. "It's a cafe. Beat it." - "What a polite fellow you are, my friend," I said. "It -gets me right in my heart." - "Go on, beat it," repeated Eli. "Stinking Intel." - "Don't get so excited, pal," I said, "or you'll earn -yourself an ulcer. Save your stomach, it's your most valuable -possession." - Eli started to move slowly out from behind the railing, -and I left. My shoulder had started to ache again. - A warm, heavy rain was falling outside. The leaves on the -trees shone wetly and joyfully, there was a smell of ozone, -freshness and thunderstorm. I stopped a taxi and named the -Oasis. The street ran with fresh streams, and the city was so -pretty and comfortable that it seemed improper to think of the -moldy and abandoned Subway. - The rain was pelting in full swing when I jumped out of -the car, ran across the sidewalk, and burst into the Oasis. -There were quite a few people, most of them were eating, -including the bartender, who was spooning some soup out of a -dish placed among drinking glasses. Those who had finished -eating sat smoking and abstractedly staring out of the -streaming window at the street. I approached the bar and -inquired in a low voice whether Buba was there. The bartender -put down his spoon and surveyed the room. - "Naah," he said. "Why don't you have something to eat now, -and he'll be along soon enough." - "How soon?" - "Twenty minutes, half an hour maybe." - "So!" I said. "In that case I'll have dinner, and then -I'll come over and you can point him out to me." - "Uhuh," said the bartender, returning to his soup. - I picked up a tray, collected some sort of a meal, and sat -down by the window away from the rest of the patrons. I wanted -to think. I sensed that there was enough data to ponder the -problem effectively. Some sort of pattern seemed to be forming. -Boxes of Devon in the bathroom. Pore-nose spoke about Buba and -Devon (in whispers). Eli talked of Buba and "slug." A clear -chain of links -- bath, Devon, Buba, slug. Further: the -sunburned fellow with the muscles cautioned that Devon was the -worst of junk, while the roundhead saw no difference between -slug and the grave. It all had to fit together. It seemed to be -what we were looking for. If so, then Rimeyer had done the -right thing to send me to the Fishers. Rimeyer, I said to -myself, why did you send me to the Fishers? And even order me -to do as I was told and not to fuss about it? And you didn't -know, after all, that I was a spaceman, Rimeyer. If you did -know, there were still the other games with bullets and "one -against twelve," besides the demented cyber. You really took a -dislike to me for something or other, Rimeyer. Somehow I have -crossed you. But no, said I, this cannot be. It is simply that -you did not trust me, Rimeyer. It is simply that there is -something that I do not know yet. For example, I do net know -just who this Oscar is who trades in Devon in this resort city -and who is connected with you, Rimeyer. Most likely you have -been meeting with Oscar before our conversation in the elevator -... I don't want to think about that. - There he was lying like a dead man and here I was thinking -such things about him when he could not defend himself. -Suddenly I felt a repulsive cold crawling feeling inside. All -right, suppose we trapped this gang. What would change? The -shivers would remain, lop-eared Len would be up all night as -before, Vousi would be coming home disgustingly drunk, while -customs inspector Pete would be smashing his face into broken -glass. And all would be concerned about the "good of the -people." Some would be irrigated with tear gas, some would be -driven into the ground up to their ears, others would be -converted from apehood into something which passes muster as -human.... And then the shivers would go out of style and the -people would be presented with the super-shivers, while in lieu -of the extirpated slug a super-slug would surface. Everything -would be for the good of the people. Have fun, Boobland, and -don't think about a thing! - Two men in cloaks sat down at the next table with their -trays. One of them seemed to me in some way familiar. He had a -haughty thoroughbred face, and were it not for a thick white -bandage on the left side of his jaw, I was sure I would -recognize him. The other was a ruddy man with a bald pate and -fussy movements. They were speaking quietly, but not so as to -be inaudible, and I could hear them quite well where I was -sitting. - "Understand me correctly," the ruddy one said with -conviction while hurriedly consuming his schnitzel, "I am not -at all against theaters and museums. But the allocation for the -municipal theater for the past year has not been expended -fully, while only tourists visit the museums." - "Also picture thieves," inserted the man with the bandage. - "Drop that, please, we don't have pictures that are worth -the theft. Thank God, they have learned how to synthesize -Sistine Madonnas out of sawdust. I wish to call your attention -to the point that dissemination of culture in our time must -occur in an entirely different manner. Culture must not be -inculcated into the people, rather it must emanate from the -people. Public chorister, do-it-yourself groups, mass games -- -that is what our public needs." - "What our public needs is a good army of occupation," said -the man with the bandage. - "Please stop talking that way, when you actually don't -believe what you are saying. Our coverage by the various -associations is really at an unacceptably poor level. For -instance, Boella complained to me last night that only one man -attends her readings, and he apparently only does so out of -matrimonial intentions. But we need to distract the people from -the shivers, from alcohol, from sexual pastimes. We need to -raise the tone --" - The other interrupted, "What do you want from me? That I -should defend your project against that ass, our honorable -mayor, today? Be my guest! It is absolutely all the same to me. -But if you would like to hear my opinion about tone and spirit, -let me tell you it does not exist, my dear Senator; it is long -dead! It has been smothered in belly fat! And if I were in your -place I would take that into account and only that!" - The ruddy man seemed to be crushed. He was silent for a -while and then groaned suddenly, "Dear God, dear God, to think -of what we have been driven to concern ourselves with! But I -ask you -- is not someone flying to the stars? Somewhere meson -reactors are being built, new learning systems are being -devised! Dear God, I just recently grasped that we are not even -a backwater, we are a preserve! In the eyes of the whole world -we are a sanctuary of stupidity, ignorance, and pornocracy. -Imagine, Professor Rubenstein has a chair in our city for the -second year. A sociopsychologist of world renown. He is -studying us like animals. Instinctive Sociology of Decaying -Economic Structures -- that's the name of his work. He is -interested in people as bearers of primeval instincts, and he -complained to me that it was very difficult for him to gather -data in countries where instinctive activity is distorted and -suppressed by pedagogical systems! But with us he is in seventh -heaven! In his own words, we don't have any activity other than -instinctive! I was insulted, I was ashamed, but, good Lord, -what could I say to contradict him? You must understand me! You -are an intelligent man, my friend, I know you are a cold man, -but I can't really believe that you are indifferent to such a -degree." - The man with the bandage looked at him haughtily and then, -abruptly, his cheek twitched. I recognized him at once: he was -the character with the monocle who had thrown the luminous slop -all over me so deftly yesterday at the Art Patrons' hall. - Why, you vulture, thought I. You thief. So you need an -army of occupation! Spirit smothered in lard indeed! - "Forgive me, Senator," he said. "I do understand it all, -and that's precisely why it is perfectly clear to me that -everything surrounding you is in a state of dementia. The final -spasm! Euphoria!" - I got up and approached their table. - "May I join you?" I asked. - He stared at me in astonishment. I sat down. - "Please excuse me," I said. "I am, to be specific, a -tourist and just a short time here; while you seem to be -natives and even to have some connection with the municipal -government. So I decided to inflict myself on you. I keep -hearing about Art Patrons, Art Patrons. But what it's all about -no one seems to know." - The man with the bandage experienced another tie in his -cheek. His eyes grew wide -- he too recognized me. - "Art Patrons?" said the ruddy one. "Yes, there is such a -barbarous organization with us here. It is very sad that such -is the case, but it's so." - I nodded, studying the bandage. My acquaintance had -already regained his composure and was eating his jelly with -his accustomed haughty look. - "In essence they are simply modern-age vandals. I simply -couldn't find a more appropriate word. They pool their -resources and buy up stolen paintings, statues, manuscripts, -unpublished literary works, patents, and destroy them. Can you -imagine how revolting that is? They And some pathological -delight in the destruction of examples of world culture. They -gather in a large, well-dressed crowd and slowly, deliberately, -orgiastically destroy them!" - "Oh my, my, my!" I said, not taking my eyes off the -bandage. "Such people should be hung by their legs." - "And we are after them," said the ruddy one. "We are in -pursuit of them on the legal level. We are unfortunately unable -to get after the Artiques and the Perchers, who are not -breaking any laws, but as far as the Art Patrons are concerned ---" - "Are you finished yet, Senator?" inquired the bandaged -one, ignoring me. - The ruddy one caught himself. - "Yes, yes. It's time for us to go. You will excuse us, -please," he said, turning to me. "We have a meeting of the -municipal council." - "Bartender!" called the bandaged one in a metallic voice. -"Would you call us a taxi." - "Have you been here long?" asked the ruddy man. - "Second day," I replied. - "Do you like it?" - "A beautiful city." - "Mm -- yes," he mumbled. - We were silent. The man with the bandage impudently -inserted his monocle and pulled out a cigar. - "Does it hurt?" I asked sympathetically. - "What, exactly?" - "The jaw," I said. "And the liver should hurt, too." -"Nothing ever hurts me," he replied, monocle glinting. "Are you -two acquainted?" the ruddy one asked in astonishment. - "Slightly," I said. "We had an argument about art." - The bartender called out that the taxi had arrived. The -man with the bandage immediately got up. - "Let's go, Senator," he said. - The ruddy one smiled at me abstractedly and also got up. - They set off for the exit. I followed them with my eyes -and went to the bar. - "Brandy?" asked the bartender. - "Quite," I said. I shuddered with rage. "Who are those -people I just spoke to?" - 'The baldy is a municipal counselor, his field are -cultural affairs. The one with the monocle is the city -comptroller." - "Comptroller," I said. "A scoundrel is what he is." - "Really?" said the barman with interest. - 'That's right, really," I said. "Is Buba here?" - "Not yet. And how about the comptroller, what is he up - to?" - "A scoundrel, an embezzler, that's what he is," I said. - The bartender thought awhile. - "It could well be," he said. "In fact he's a baron -- that -is, he used to be, of course. His ways, sure enough, are -unsavory. Too bad I didn't go vote or I would have voted -against him. What's he done to you?" - "It's you he's done. And I've given him some back. And -I'll give him some more in due time. Such is the situation." - The bartender, not understanding anything, nodded and -said, "Hit it again?" - "Do," I said. - He poured me more brandy and said, - "And here is Buba, coming in." - I turned around and barely managed to keep the glass in my -grip. I recognized Buba. - -

    Chapter TEN

- - He stood by the door looking about him as though trying to -remember where he had come and what he was to do there. His -appearance was very unlike his old one, but I recognized him at -once anyway, because for four years we sat next to each other -in the lecture halls of the school, and then there were several -years when we met almost daily. - "Say," I addressed the bartender. "They call him Buba?" - "Uhuh," said the bartender. - "What is it -- a nickname?" - "How should I know? Buba is Buba, that's what they all -call him." - "Peck," I cried. - Everyone looked at me. He too slowly turned his head and -his eyes searched for the caller. But he paid no attention to -me. As though remembering something, he suddenly started to -shake the water out of his cape with convulsive motions, and -then, dragging his heels, hobbled over to the bar and climbed -with difficulty on the stool next to mine. - "The usual," he said to the bartender. His voice was dull -and strangled, as though someone held him by the throat. - "Someone has been waiting for you," said the barman, -placing before him a glass of neat alcohol and a deep dish -filled with granulated sugar. - Slowly he turned his head and looked at me, saying, "Well, -what is it you want?" - His drooping eyelids were inflamed red, with accumulated -slime in the corners. He breathed through his mouth as though -suffering with adenoids. - "Peck Xenai," I said quietly. "Undergraduate Peck Xenai, -please return from earth to heaven." - He continued to regard me without a change in his manner. -Then he licked his lips and said, "A classmate, perhaps?" - I felt numb and terrified. He turned around, picked up his -glass, drank it down, gagging in revulsion, and began to eat -the sugar with a large soup spoon. The bartender poured him -another glass. - "Peck," I said, "old friend, don't you remember me?" - He looked me over again. - "I wouldn't say that. I probably did see you somewhere." - "Saw me somewhere!" I said in desperation. "I am Ivan -Zhilin. Could it be you have completely forgotten me?" - His hand holding the glass quivered almost imperceptibly, -and that was all. - "No, friend," he said, "forgive me, please, but I don't -remember you." - "And you don't remember the 'Tahmasib' or Iowa Smith?" - "This heartburn has really got to me today," he informed -the bartender. "Let me have some soda, Con." - The bartender, who had listened with curiosity, poured him -a soda. - "Bad day, today, Con," he said. "Can you imagine, two -automates failed on me today." - The bartender shook his head and sighed. - "The manager is bitching," continued Buba, "called me on -the carpet and bawled me out. I am going to quit that place. I -told him to go to hell and he fired me." - "Complain to the union," the bartender advised. - "To hell with them." He drank his soda and wiped his mouth -with the palm of his hand. He did not look at me. - I sat as though spat upon, forgetting completely what it -was I wanted Buba for. I needed Buba, not Peck -- that is, I -needed Peck too. But not this one. This was not Peck, this was -some strange and repulsive Buba, and I watched in horror as he -sucked up the second glass of alcohol and again set to -shoveling spoonfuls of sugar into himself. His face effloresced -with red spots, and he kept gagging and listening to the -bartender as he animatedly recounted the latest football -exploits. I wanted to cry out, "Peck, what has happened to you? -Peck, you used to hate all this!" I put my hand on his shoulder -and said imploringly, "Peck, dear friend, hear me out, please." - He shied away. - "What's the matter, friend?" His eyes were now completely -unseeing. "I am not Peck, I am Buba, do you understand? You are -confusing me with someone else, there isn't any Peck here.... -So what did the Rhinos do then, Con?" - I reminded myself where I was, and forced myself to -understand that there was no more Peck, and that there was a -Buba, here, an agent of a criminal organization, and this was -the only reality, while Peck Xenai was a mirage -- a memory -which must be quickly extirpated if I intended to press on with -my work. - "Hold on, Buba," I said. "I want to talk business to you." - He was quite drunk by now. - "I don't talk business at the bar," he announced. "And -anyway I am through with work. Done. I have no more business of -any kind. You can apply to the city hall, friend. They'll help -you out." - "I am applying to you, not the city hall," I said. "Will -you listen to me!" - "You I hear all the time, as it is. To the detriment of my -health." - "My business is quite simple," I said. "I need a slug." - He shuddered violently. - "Are you out of your mind, pal?" - "You should be ashamed," said the bartender. "Right out in -front of people... you have lost all sense of decency." - "Shut up," I told him. - "You be quiet," the barman said menacingly. "It must be -some time since you've been busted? Watch your step or you'll -get exported." - "I don't give a damn about the exportation," I said -insolently. "Don't stick your snoot in other people's -business." - "Lousy sluggard," said the bartender. - He was visibly incensed, but spoke in a low voice. "A slug -he wants. I'll call an officer right now and he'll give you a -slug." - Buba slid off the stool and hurriedly hobbled toward the -door. - I left off with the bartender and hurried after him. He -shot out into the rain, and forgetting to cover himself with -his cape, started to look around in search of a taxi. I caught -up with him and grasped him by the sleeve. - "What in God's name do you want from me?" he said -miserably. "I'll call the police." - "Peck," I said. "Come out of it, Peck. I am Ivan Zhilin, -and you must remember me." - He kept looking around and wiping the streaming water from -his face with the palm of his hand. He looked pitiful and run -down, and I, trying to suppress my irritation, kept insisting -to myself that this was my Peck, priceless Peck, irreplaceable -Peck, good, intelligent, joyful Peck, kept trying to remember -him as he was in front of the Gladiator's control console, and -I couldn't because I couldn't imagine him anywhere except at -the bar over a glass of alcohol. - "Taxi," he screeched, but the car flew by, full of people. - "Peck," I said, "come with me. I'll tell you all about -it." - "Leave me alone," he said, his teeth chattering. "I won't -go anywhere with you. Leave off! I didn't bother you, I didn't -do anything to you, leave me be, for God's sake." - "All right," I said, "I'll let you alone. But you must -give me a slug and also your address." - "I don't know of any slugs," he moaned. "God, what kind of -a day is this!" - Favoring his left leg, he wandered off and suddenly dove -into a basement under an elegant and restrained sign. I -followed. We sat down at a table and a waiter immediately -brought us hot meat and beer, although we hadn't ordered -anything. Buba was shivering and his wet face turned blue. He -pushed the plate away with revulsion and began to swallow the -beer, both hands around the mug. The basement was quiet and -empty. Over the sparkling counter hung a white sign with gold -letters reading, "Paid Service Only." - Buba raised his head from the beer and said pleadingly, -"Can I go, Ivan? I can't... What's the point of all this talk? -Let me go, please." - I put my hand on his. - "What's happening to you, Peck? I searched for you. There -is no address listed anywhere. I met you quite by accident, and -I don't understand anything. How did you get involved in this -mess? Can I help you possibly, with anything? Maybe we could ---" - Suddenly he jerked his hand away in a rage. - "What an executioner," he hissed. "The devil lured me to -that Oasis.... Stupid chatter, drivel. I have no slug, do you -understand? I have one, but I won't give it to you. What'll I -do then -- like Archimedes? Don't you have any conscience? Then -don't torture me, let me go." - "I can't let you go," I said, "until I get the slug. And -your address. We must talk." - "I don't want to talk to you, can't you understand? I -don't want to talk to anyone about anything. I want to go home. -I won't give you my slug. What am I -- a factory? Give it to -you and then chase all over town?" - I kept silent. It was clear that he hated me now. That if -he thought he had the strength he would kill me and leave. But -he knew that he did not have the strength. - "Scum," he said in a fury. "Why can't you buy one -yourself? Don't you have the money? Here! Here!" he began to -search convulsively in his pockets, throwing coppers and -crumpled bills on the table. "Take it, there's plenty." - "Buy what? Where?" - "There's a damned jackass! It's... what is it? Hmm... how -do you call it... Oh hell!" he cried. "May you drop straight to -hell!" - He stuck his fingers into his shirt pocket and pulled out -a flat plastic case. Inside it was a shiny metal tube, similar -to a pocket radio local oscillator-mixer subassembly. "Here -- -get fat!" He proffered me the tube. It was quite small, less -than an inch long and a millimeter thick. - "Thank you," I said. "And how do I use it?" - Peck's eyes opened wide. I think he even smiled. - "Good God!" he said almost tenderly. "Can it be you really -don't know?" - "I know nothing," I said. - "Well then, you should have said so from the start. And I -thought you were tormenting me like a torturer. You have a -radio? Insert it in place of the mixer, hang it, stand it -somewhere in the bath, and go to!" - "In the tub?" - "Yes." - "It must be in the bath?" - "But yes! It is absolutely necessary that your body be - immersed in water. In hot water. What an ass you are!" - "And how about Devon?" - "The Devon goes in the water. About five tablets in the -water and one orally. The taste is awful, but you won't regret -it later. And one more thing, be sure to add bath salts to the -water. And before you start, have a couple of glasses of -something strong. This is required so that... how shall I say? --- so you can loosen up, sort of." - "So," I said. "I got it. Now I've got everything." I -wrapped the slug in a paper napkin and put it in my pocket. "So -it's electric wave psychotechnics?" - "Good Lord, now what do you care about that?" - He was up already, pulling the hood over his head. - "No matter," I said. "How much do I owe you?" - "A trifle, nonsense! Let's go quickly... what the hell are -we losing time for?" - We went up into the street. - "You made the right decision," said Peck. What kind of -world is this? Are we men in it? Trash is what it is and not a -world. Taxi!" he yelled. "Hey, taxi!" - He shook in sudden excitement. "What possessed me to go to -that Oasis... Oh no... from now on I'll go nowhere ... -nowhere." - "Let me have your address," I said. - "What do you want with my address?" - A taxi drew up and Buba tore at the door. - "Address," I said, grabbing him by the shoulder. - "What a dumbhead," said Buba.. "Sunshine Street, number -eleven... Dumbhead!" he repeated, seating himself. - "I'll come to see you tomorrow." - He paid no more attention to me. - "Sunshine," he threw at the driver. "Through downtown, and -hurry, for God's sake." - How simple, I thought, looking after his car. How simple -everything turned out to be. And everything fits. The bath and -Devon. Also the screaming radios, which irritated us so, and to -which we never paid any attention. We simply turned them off. I -took a taxi and set out for home. - But what if he deceived me, I thought. Simply wanted to be -rid of me sooner. But I would determine that soon enough. He -doesn't look like a runner, an agent, at all, I thought. After -all, he is Peck. However, no, he is no longer Peck. Poor Peck. -You are no agent, you are simply a victim. You know where to -buy this filth, but you are only a victim. I don't want to -interrogate Peck, I don't want to shake him down like some -punk. True, he is no longer Peck. Nonsense, what does that -mean, that he is not Peck. He is Peck, and still I'll have -to... Electric wave psychotechnics... But the shivers they're -wave psychotechnics too.... Somehow, it's a bit too simple. I -haven't passed two days here yet, while Rimeyer has been living -here since the uprising. We left him behind, and he had gone -native and everyone was pleased with him, although in his -latest reports he wrote that nothing like what we were looking -for existed here. True, he has nervous exhaustion... and Devon -on the floor. Also there is Oscar. Further, he did not beg me -to leave him be, but simply pointed me in the direction of the -Fishers. - I didn't meet anyone either in the front yard or in the -hall.. It was almost five. I went to my rooms and called -Rimeyer. A quiet female voice answered. - "How is the patient?" I asked. - "He is asleep. He shouldn't be disturbed." - "I won't do that. Is he better?" - "I told you he fell asleep. And don't call too often, -please. The phone disturbs him." - "You will be with him all the time?" - "Till morning, at least. If you call again, I'll have the -phone disconnected." - "Thank you," I said. "Just, please, don't leave him till -morning, I'll not trouble you again." - I hung up and sat awhile in the big comfortable chair in -front of the huge absolutely bare table. Then I took the slug -out of my pocket and laid it in front of me. A small shiny -tube, inconspicuous and completely harmless to all outward -appearances, an ordinary electronic component. Such can be made -by the millions. They should cost pennies. - "What's that you got there?" asked Len, right next to my - He stood alongside and regarded the slug. - "Don't you know?" I asked. - "It's from a radio. I have one like it in my radio and -it's breaking all the time." - I pulled my radio out of my pocket and extracted its mixer -and laid it alongside the slug. The mixer looked like the slug, -but it was not a slug. - "They are not the same," said Len. "But I have seen one of -those gadgets, too." - "What gadget?" - "Like the one you have." - All at once, his face clouded over and he looked grim. - "Did you remember?" - "No, I didn't," he said. "I didn't remember anything." - "All right, then." I picked up the slug and inserted it in -place of the mixer in the radio. Len grabbed me by the hand. - "Don't," he said. - "Why not?" - He didn't reply, eyeing the radio warily. - "What are you afraid of?" I asked. - "I'm not afraid of anything. Where did you get that idea?" - "Look in the mirror," I said. "You look as though you are -afraid for me." I put the radio in my pocket. - "For you?" he said in astonishment. - "Obviously for me. Not for yourself, of course, though you -are still scared of those... necrotic phenomena." - He looked sideways. - "Where did you get that idea," he said. "We're just -playing." - I snorted in disdain. - "I am well acquainted with these games. Rut one thing I - don't know: where in our time do necrotic phenomena come -from?" - He glanced around and began backing up. - "I'm going," he said. - "O no," I said decisively. "Let's finish what we started. -Man to man. Don't think that I am altogether an ignoramus." - "What do you know?" He was already near the door and -talking very quietly. - "More than you," I said severely. "But I don't want to -shout it all over the house. If you want to talk, come on over -here. Climb up on the desk and have yourself a seat. Believe -me, I'm not a necrotic phenomenon." - He hesitated for a whole minute, and everything for which -he hoped and everything of which he was afraid appeared and -disappeared on his face. At last, he said, "Just let me close -the door." - He ran into the living room, closed the door to the -hallway, returned to close the study door tight, and approached -me. His hands were in his pockets, the face white, contrasting -with the protruding ears, which were red but cold. - "In the first place, you are a dope," I pronounced, -dragging him toward me and standing him between my knees. "Once -there was a boy who lived in such a fear that his pants never -dried out, not even when he was on a beach, and his ears were -as cold as though they had been left in a refrigerator -overnight. This boy trembled constantly and so well that when -he grew up his legs were all wiggly, and his skin became like -that of a plucked goose." - I was hoping that he would smile just once, but he -listened very intently and very seriously inquired, "And what -was he afraid of?" - "He had an elder brother, who was a nice fellow, but a -great one for drinking. And, as often happens, the tipsy -brother was not at all like the sober brother. He got to look -very wild indeed. And when he really drank a lot, he got to -look like a dead man. So this boy..." - A contemptuous smile appeared on Len's face. - "He sure found something to be scared of. When they are -drunk is when they turn good." - "Who are they?" I asked immediately. "Mother? Vousi?" - "That's it. Mother is just the opposite -- in the morning -when she gets up, she's always nasty, and then she drinks -vermouth once, then twice, and that's it. Toward evening she is -altogether nice because night is near." - "And at night?" - "At night that creep comes around," Len said reluctantly. - "We are not concerned with the creep," I said in a -businesslike manner. "It's not from him that you run to the -garage." - "I don't run," he said stubbornly. "It's a game." - "I don't know, I don't know," I said. "There are, of -course, certain things in this world of which even I am afraid. -For instance when a boy is crying and trembling. I can't look -at such things, and it just turns me over inside. Or when your -teeth hurt and it is required by circumstances that you keep on -smiling -- that's pretty bad and there is no way of ignoring -it. But there are also just plain stupidities. When, for -example, some idiots help themselves, out of sheer boredom and -surfeit, to the brain of a living monkey. That's no longer -frightening, it's just plain disgusting. Especially as they -didn't think it up by themselves. It was a thousand years ago -when they thought of it first, and also out of excessive -affluence, the fat tyrants of the Far East. And contemporary -idiots heard and rejoiced. But they should be pitied, not -feared." - "Pity them?" said Len. "But they don't pity anybody. They -do whatever they like. It's all the same to them, don't you -see? It they are bored, then they don't care whose head they -saw apart. Idiots... Maybe in the daytime they are idiots, but -you don't seem to understand that at night they are not idiots, -they are all accursed." - "How can that be?" - "They are cursed by the whole world They can have no -peace, and they won't ever have it. You don't know anything. -What's it to you? As you arrived, so you will leave... but they -are alive at night, and in the daytime they are dead, -corpselike." - I went to the living room and brought him some water. He -drank down the glass and said, "Will you leave soon?" - "Of course not, how can you think that? I just got here," -I said, patting him on the shoulder. - "Could I sleep with you?" - "Of course." - "At first I had a padlock, but she took it away for some -reason. But why she took it she won't say." - "OK," I said. "You will sleep in my living room. Do you -want to?" - "Yes." - "Go ahead and lock yourself in and sleep to your heart's -content. And I will climb into the bedroom through the window." - He raised his head and gazed at me intently. - "You think your doors lock? I know all about this place. - Yours don't lock either." - "It's for you they don't lock," I said as negligently as -possible. "But for me they'll lock. It's only a half-hour's -work." - He laughed unpleasantly, like an adult. - "You are afraid, too. All right, I was only joking. Don't -be afraid, your locks do work" - "You dope," I said. "Didn't I tell you I wasn't afraid of -anything of that sort?" He looked at me questioningly. "I -wanted to make the lock work for you in the living room, so you -could sleep in peace, as long as you are so afraid. As for me, -I always sleep with the window open." - "I told you, I was joking." - We were silent for a bit. - "Len," I said, "what will you be when you grow up?" "What -do you mean?" he said. He was quite astonished. "What do I -care?" - "Now, now -- what do you care. It's all the same to you -whether you will be a chemist or a bartender?" - "I told you -- we are all under a curse. You can't get -away from it, why can't you understand that? When everybody -knows it?" - "So what?" I said. "There were accursed peoples before. -And then children were born who grew up and removed the curse." - "How?" - "That would take a long time to explain, old friend." I -got up. "I'll be sure to tell you all about it. For now, go on -out and play. You do play in the daytime? Okay then, run along. -When the sun sets, come on over, I'll make your bed." - He stuck his hands in his pockets and went to the door. -There he stopped and said aver his shoulder, "That gadget you'd -better take it out of the radio. What do you think it is?" - "A local oscillator-mixer," I said. - "It's not a mixer at all. Take it out or it will be bad -for you." "Why will it be bad for me?" I said. - "Take it out," be said. "You'll hate everybody. Right now -you are not cursed, blat you will become cursed. Who gave it to -you? Vousi?" - "No." - He looked at me imploringly. - "Ivan, take it out!" - "So be it," I said. "I'll take it out. Run along and play. -And never be afraid of me. Do you hear?" - He didn't say anything and went out, leaving me sitting in -my chair, with my hands on the desk. Soon I heard him puttering -about in the lilacs under the windows. He rustled, stamped -about, muttering something under his breath, and softly -exclaimed, talking to himself, "Bring the flags and put them -here and here... that's it... that's it... and then I got on a -plane and flew away into the mountains." I wondered when he -went to bed. It would be all right if it were eight o'clock or -even nine; maybe it was a mistake to start all this business -with him. I could have locked myself in the bathroom and in two -hours I would know everything. But no, I couldn't refuse him -- -just imagine I was in his place, I thought. But this is not the -way; I am catering to his fears, when I should think of -something more clever. But try to come up with it -- this is no -Anyudinsk boarding school. - A boarding school this certainly is not, I thought. How -different everything is, and what lies ahead of me now, which -circle of paradise, I wonder? But if it tickles, I won't be -able to stand it! Interesting -- the Fishers -- they too are a -circle of paradise, for sure. The Art Patrons are for the -aristocrats of the mind, and the old Subway is for the simpler -types, although the Intels are also aristocrats of the mind and -they get intoxicated like swine and become totally useless, -even they are useless. There is too much bate, not enough love --- it's easy to teach hate, but love is hard to teach. But -then, love has been too well overdone and slobbered over so it -has become passive. How is it that love is always passive and -hate always active and is thus always attractive? And then it -is said that hate is natural, while love is of the mind and -springs from deep thought. - It should be worthwhile to have a talk with the Intels, I -thought. They can't all be hysterical fools, and what if I -should succeed in finding a Man. What in fact is good in man -that comes from nature -- a pound of gray matter. But this too -is not always good, so that he always must start from a naked -nothing; maybe it would be good if man could inherit social -advances, but then again, Len would now be a small-scale major -general. No, better not -- better to start from zero. True he -would not now be afraid of anything, but instead he would be -frightening others -- those who weren't major generals. - I was startled to suddenly see Len perched in the branches -of the apple tree regarding me fixedly. The next moment he was -gone, leaving only the crash of branches and falling apples as -an aftermath. He doesn't believe me in the slightest, I -thought. He believes nobody. And whom do I believe in this -town? I went over everyone I could recall. No, I didn't trust -anyone. I picked up the telephone, dialed the Olympic and asked -for number 817. - "Hello! Yes?" said Oscar's voice. - I kept quiet, covering the radio with my hand. - "Hello, I'm listening," repeated Oscar irritably. "That's -the second time," he said to someone aside. "Hello!... Of -course not, what sort of women could I be carrying on with -here?" He hung up. - I picked up the Mintz volume, lay down on the couch, and -read until twilight. I dearly love Mintz, but I couldn't -remember a word I read that day. The evening shift roared by -noisily. Aunt Vaina fed Len his supper, stuffing him with hot -milk and crackers. Len whimpered and was fretful while she -cajoled him gently and patiently. Customs inspector Pete -propounded in a commanding yet benevolent tone, "You have to -eat, you have to eat, if Mother says eat, you must comply." - Two men of loose character, if one could judge by their -voices, came around looking for Vousi and made a play for Aunt -Vaina. I thought they were drunk. It was growing dark rapidly. -At eight o'clock the phone in the study rang. I ran barefooted -and grabbed the receiver, but no one spoke. As you holler, so -it echoes. At eight-ten, there was a knock on the door. I was -delighted, expecting Len, but it turned out to be Vousi. - "Why don't you ever come around?" she asked indignantly -from the doorway. She was wearing shorts decorated with -suggestively winking faces, a tight-fitting sleeveless shirt -exposing her navel, and a huge translucent scarf: she was fresh -and firm as a ripe apple. To a surfeit. - "I sit and wait for him all day, and all the time he is -sacked out here. Does something hurt?" - I got up and stuck my feet into my shoes. - "Have a chair, Vousi." I patted the couch alongside me. - "I am not going to sit by you. Imagine -- he is reading. -You could at least offer me a drink." - "In the bar," I said, "How is your sloppy cow?" - "Thank God she was not around today," said Vousi, -disappearing in the bar. "Today I drew the mayor's wife. What a -moron. Why, she wants to know, doesn't anyone love her?... You -want yours with water? Eyes white, face red, and a rear end as -wide as a sofa, just like a frog, honest to God. Listen, let's -make a polecat, nowadays everybody makes polecats." - "I don't go for doing like everybody." - "I can see that for myself. Everyone is out for a good -time, and he is here -- sacked out. And reading to boot." - "He -- is tired," I said. - "Oh, so? Well then, I can leave!" - "But I won't let you," I said, catching her by the scarf -and pulling her down beside me. "Vousi, dear girl, are you a -specialist only for ladies' good humor or in general? You -wouldn't be able to put a lonely man whom nobody loves into a -good humor?" - "What's to love?" She looked me over. "Red eyes and a -potato for a nose." - "Like an alligator's." - "Like a dog's. Don't go putting your arm about me, I won't -allow it. Why didn't you come over?" - "And why did you abandon me yesterday?" - "How do you like that --.abandoned him!" - "All alone in a strange town." - "I abandoned him! Why, I locked for you all over. I told -everyone that you are a Tungus, and you got lost -- that was a -poor thing for you to do. No -- I won't permit that! Where were -you last night? Fishering, no doubt. And the same thing today, -you won't tell any stories." - "Why shouldn't I tell?" I said. And I told her about the -old Subway. I sensed at once that the truth would be -inadequate, and so I spoke of men in metallic masks, of a -terrible oath, of a wall wet with blood, of a sobbing skeleton, -and I let her feel the bump behind my ear. She liked everything -very well. - "Let's go right now," she said. - "Not for anything," I said and lay down. - "What kind of manners is that? Get up at once and we'd go. -Of course, no one will believe me. But you will show your bump, -and everything will be just perfect." - "And then we'll go to the shivers?" I wanted to know. - "But yes! You know that turns out to he even good for your -health." - "And we'll drink brandy?" - "Brandy and vermouth and a polecat and whiskey." - "Enough, enough... and no doubt we'll also squeeze into -cars and drive at a hundred and fifty miles per hour?... -Listen, Vousi, why should you go there?" - She finally understood and smiled in discomfiture. - "And what's wrong with it? The Fishers also go." - "There is nothing bad," I said. "But what's good about -it?" - "I don't know. Everybody does it. Sometimes it's a lot of -fun... and the shivers. There everything -- all your wishes -come true." - "And that's it? That's all there is?" - "Well, not everything, of course. But whatever you think - about, whatever you would like to happen, often happens. -Just like in a dream." - "Well then maybe it would be better to go to bed?" - "What's the matter with you?" she said sulkily. "In a real -dream all kinds of things happen... as though you don't know! -But with the shivers, only what you like!" - "And what do you like?" - "We-e-ll! Lots of things."' - "Still... imagine I am a magician. And I say to you, have -three wishes. Anything at all, whatever you wish. The most -impossible. And I will make them come true. Well?" - She thought very hard so that even her shoulders sagged. -Then her face lit up. - "Let me never grow old," she said. - "Excellent," I said. "That's one." - "Let me..." she began inspiredly and stopped. - I used to enjoy tremendously asking my friends this very -question and used to ask it at every available opportunity. -Several times I even assigned compositions to my youngsters on -the theme of three wishes. And it was always most amusing that -out of a thousand men and women, oldsters and children, only -two or three dozen figured that it is possible to wish not only -for themselves personally, or their immediate close ones, but -also for the world at large, for mankind as a whole. No, this -was not witness to the ineradicable human egotism; the wishes -were not invariably strictly selfish, and the majority in -subsequent discussions, when reminded of missed opportunities -and the large problems of all mankind, did a double take and in -honest anger reproached me that I hadn't explained at the -beginning. But one way or another they all began their reply -along the lines of "Let me..." This was a manifestation of some -kind of ancient subconscious conviction that your own personal -wishes cannot change anything in the wide world, and it makes -no difference whether you do or do not have a magic wand. - "Let me..." began Vousi once more, and again was silent. I -was watching her surreptitiously. She noticed this, and -dissolving into a broad smile, said with a wave of her hand, -"So that's your game. Some card you are!" - "No -- no -- no," I said. "You should always be prepared -to answer this question. Because I knew a man once who always -asked it of everyone, and then was inconsolable -- 'Oh what an -opportunity I missed, how could I not have figured it out?' So -you see it's entirely in earnest. Your first wish is never to -grow old. And then?" - "Let's see -- what else? Of course, it would be nice to -have a handsome fellow, whom they would all chase, but who -would be with me only. Always." - "Wonderful," I said. "That's two. And what else?" - Her face showed that the game had already palled on her, -and that any second she'd drop a bomb. And she did. All I could -do was blink my eyes. - "Yes," I said, "of course that, too. But that happens even -without any magic." - "Yes and no," she argued and began to develop the idea, -based on the misfortunes of her clients. All of which was very -gay and amusing to her, while I, in ignominious confusion, -gulped brandy with lemon and tittered in embarrassment, feeling -like a virgin wall flower. Well, if all this went on in a night -club, I could handle it. Well, well, well... some fine -activities go on in those salons of the Good Mood. How do you -like these elderly ladies... - "Enough," I said. "Vousi, you embarrass me, and anyway I -understand it all very well now. I can see that it's really -impossible to do without magic. It's a good thing that I am not -a magician." - "I really stung you well," she said happily. "And what -would you wish for yourself, now?" - I decided I'd reciprocate in kind. - "I don't need anything of that sort," I said. "Anyway, I -am not good at things like that. I'd like a good solid slug." - She smiled gaily. - "I don't need three wishes," I explained, "I can do with -one." - She was still smiling, but the smile became empty, then -crooked, and then disappeared altogether. - "What?" she said in a small voice. - "Vousi!" I said, getting up. "Vousi!" - She didn't seem to know what to do. She jumped up and then -sat down and then jumped up again. The coffee table fell over -with all the bottles. There were tears in her eyes, and her -face looked pitiable, like that of a child who has been -brutally, insolently, cruelly, tauntingly deceived. Suddenly -she bit her lip and with all her strength slapped my face. -While I was blinking, she, now in full tears, kicked away the -overturned table and ran out of the room. I sat, with my mouth -open. An engine roared into life and lights sprang up in the -dark garden, followed by the sound of the motor traversing the -yard and disappearing in the distance. - I felt my face. Some joke. Never in my life have I joked -so effectively. What an old fool I was! How do you like that -for a slug? - "May we?" asked Len. He stood in the door, and he was not -alone. With him was a gloomy, freckle-faced boy with a cleanly -shaved head. - "This is Reg," said Len. "Could he sleep here too?" - "Reg," I said, pensively smoothing my eyelids. "Of course --- even two Regs would be okay. Listen, Len, why didn't you -come ten minutes earlier!" - "But she was here," said Len. "We were looking in the -window, waiting for her to leave." - "Really?" I said. "Very interesting. Reg, old chum, how -about what your parents will say?" - Reg didn't reply. Len said, "He doesn't have parents." - "Well, all right," I said, feeling a bit tired. "You're -not going to have a pillow fight?" - "No," said Len, not smiling, "we are going to sleep." - "Fair enough," I said. "I'll make your beds and you can -give all this a quick clean-up." - I made their beds on the couch and the big chair and they -took off their clothes at once and went to bed. I locked the -door to the hall, turned out their lights, and went into my -bedroom, where I sat awhile listening to them whispering, -moving furniture, and settling down. Then they were quiet. -About eleven o'clock there was the sound of broken glass -somewhere in the house. Aunt Vaina's voice could be heard -singing some sort of marching song, followed by more breaking -glass. Apparently the tireless Pete again was falling down face -first. From the center of town came the cry of "Shivers, -shivers." Someone was loudly sick on the street. - I locked the window and lowered the shades. I also locked -the door to the study. Then I went to the bathroom and turned -on the hot water. I did everything per instructions. The radio -went on the soap shelf, I threw several Devon tablets in the -water, together with some salt crystals, and was about to -swallow the tablet when I remembered that it was propitious to -"loosen up." I didn't want to disturb the boys, but it wasn't -necessary -- an open bottle of brandy stood in the medicine -chest. I took a few swallows right out of the bottle, stripped -down to the skin, climbed into the bath, and turned on the -radio. - -

    Chapter ELEVEN

- - I intentionally did not set the thermo-regulator, so that -when the water cooled off, I returned to consciousness. The -radio was still shrieking and the sparkle of white light on the -walls hurt my eyes. I was thoroughly chilled and covered with -goose bumps. Switching off the radio, I turned on the hot water -and remained in the bath, basking in the flooding warmth and a -very strange, very novel sensation of total, cosmically -enormous emptiness. I expected a hangover, but there wasn't -any. I simply felt good. And there were very many memories. -Also my thoughts flowed inordinately well, as though after a -long rest in the mountains. - In the middle of the last century, Olds and Miller had -conducted experiments on brain stimulation. They inserted -electrodes into the brains of white rats. They employed a -primitive technology and a barbarous methodology, but having -located pleasure centers in the rats' brains, they succeeded in -having the animals press the lever which closed the contacts to -the electrodes, hour after hour, producing up to eight thousand -auto-excitations per hour. These rats did not need anything in -the real world. They weren't in the slightest interested in -anything but the lever. They ignored food, water, danger, -females; they were indifferent to everything except the -stimulation lever. Later, these experiments were tried on -monkeys and produced the same results. Rumors were about that -someone carried out similar experiments on criminals condemned -to death.... - That was a difficult time for mankind: a time of struggle -against atomic destruction, a time of increasing limited wars -over the entire face of the planet, a time when the majority of -mankind was starving, but even so, the contemporary English -writer and critic Kingsley Amis, having learned of the -experiments with rats, wrote: "I cannot be sure that this -frightens me more than a Berlin or a Taiwan crisis, but it -should, I believe, frighten me more." He feared much about the -future, this brilliant and venomous author of New Maps of -Hell, and: in particular, he foresaw the possibilities of -brain stimulation for the creation of an illusory existence, -just as intense as the actual, or more intense. - By the end of the century, when the first triumphs of wave -psychotechnology were realized, and when psychiatric wards -began to empty, amid the chorus of exulting cries of science -commentators, the little brochure by Krinitsky and Milanovitch -had sounded like an irritating dissonance. In its concluding -section the Soviet educators wrote approximately as follows: In -the overwhelming majority of countries, the education of the -young exists on the level of the eighteenth and nineteenth -centuries. This ancient system of education always did and -continues to posit as its objective, first of all and above -all, the preparation for society of qualified but stupefied -contributors to the production process. This system is not -interested in all the other potentialities of the human mind, -and for this reason, outside of the production process, man, en -masse, remains psychologically a cave dweller, Man the -Uneducated. The disuse of these potentialities causes the -individuals' inability to comprehend our complex world in all -its contradictions, to correlate psychologically incompatible -concepts and phenomena, to obtain pleasure from the examination -of connections and laws when these do not pertain directly to -the satisfaction of the most primitive social instincts. In -other words, this system of education for all practical -purposes does not develop in man pure imagination, untrammeled -vision, and as an immediate consequence, the sense of humor. -The Uneducated Man perceives the world as some sort of -essentially trivial, routine, and traditionally simple process, -a world from which it is possible only by dint of great effort -to extract pleasures which are, in the end, also compulsively -routine and traditional. But even the unutilized potentialities -remain, apparently, a hidden reality of the human brain. The -problem for scientific education consists precisely in -initiating the action of these possibilities, in teaching man -to dream, in bringing the multiordinality and variety of -psychic associations into quantitative and qualitative -coordination with the multiordinality and variety of -interrelationships in the world of reality. This problem is the -one which, as is well known, must become the fundamental one -for mankind in the coming proximate epoch. But until this -problem is resolved, there remains some basis to fear that the -successes of psychotechnics will lead to such methods of -electrical stimulation as will endow man with an illusory -existence which can exceed the real existence in intensity and -variety by a considerable margin. And if one remembers that -imagination allows man to be both a rational being and a -sensual animal, and if one adds to that the fact that the -psychic subject matter evoked by the Uneducated Man for his -illusory life of splendor derives from the darkest, most -primitive reflexes, then it is not hard to perceive the awful -temptation hidden in such possibilities. - And therefore -- slug. - It is now understandable, I thought, why they write the -word "slug" on fences. - Everything is now understandable. It's odious, that I -understand.... Better if I understood nothing, better if, upon -regaining consciousness, I shrugged my shoulders and climbed -out of the bath. Would it have been understandable to Strogoff -and Einstein and Petrarch? Imagination is a priceless gift, but -it must not be given an inward direction. Only outward, only -outward... What a tasty worm some corrupter has dropped from -his rod into this stagnant pool! And how accurately timed! Yes -indeed, if I were commander of Wells' Martians, I would not -have bothered with fighter tripods, heat rays, and other such -nonsense. Illusory existence ... no, this is not a narcotic, a -narcotic has a long way to go to approach it. In a. way this is -exactly appropriate. Here. Now. To each time its own. Poppy -seeds and hemp, the kingdom of sweet blurred shadows and peace --- for the beggar, the worn-out, the downtrodden... But here no -one wants peace, here no one is dying of hunger, here is simply -a bore. A well-fed, well-heated, drunken bore. It's not that -the world is bad, it's just plain dreary. World without -prospects, world without promise. But in the end man is not a -carp, he still remains a man. Yes, it is no kingdom of shades, -it is indeed the real existence, without detraction, without -dreary confusion. Slug is moving on the world and the world -will not mind subjecting itself to it. - Suddenly, for a fraction of a moment, I felt that I was -lost. And it was cozy to be destroyed. Fortunately I grew -angry. Splashing out water, I climbed out of the bath, cursing -and stoking my ire, pulled my shorts and shirt over my wet -body, and grabbed my watch. It was three o'clock, and it could -have been three in the afternoon or three the following morning -or three o'clock after a hundred years. Idiot, I thought, -pulling on my trousers. Softened up and let Buba go when he was -ready to give me the address of the gangsters' den. The -operatives could have been there by now and we could have -nabbed the whole accursed nest, the vile nest. The vermin nest. -The repulsive cloaca... And at this instant against the very -depth of my consciousness, like a dancing spot of light, -flicked a very calm thought. But I could not fasten upon it. - I located some Potomac in the medicine cabinet, the -strongest stimulant which I could find in it. I started into -the living room, but the youngsters were snoring away there, so -I climbed out the window. The city was resting, of course. -Guffawing louts hung around under the street lamp on Waterway, -bawling crowds surged on the brightly lit avenues. Somewhere -songs were shouted, somewhere they were yelling "Shivers!" -Somewhere glass was being broken. I picked out a chauffeurless -taxi, found the index for Sunshine Street, and dialed it on the -control console. The car took off across town. The cab smelled -sour and bottles rolled underfoot. At one intersection it -almost plowed into a daisy chain of howling humanity, and at -another there was the rhythmic flashing of colored lights -- -apparently it was possible to set up the shivers elsewhere than -the plaza. They were resting, resting with all their might, -these benevolent patrons from the Happy Mood Salons, these -polite customs inspectors, clever barbers, tender mothers and -manly fathers, innocent youths and maidens -- they all -exchanged their diurnal aspects for the nocturnal, they all -worked hard to have fun and so that it wouldn't be necessary to -think about a thing.... - The taxi braked. It was the very same place. It even -seemed as though there was that same burning smell... - ... Peck registered a hit on the armored carrier with the -Fulminator. It spun on a single tread, hopping in the piles of -broken bricks, and two fascists immediately jumped out in their -unbuttoned camouflage shirts, flung a grenade apiece in our -direction, and sped off into the darkness. They moved knowingly -and adeptly, and it was obvious that these were not youngsters -from the Royal Academy or lifers from the Golden Brigade, but -genuine full-blown tank corps officers. Robert cut them down -point-blank with a burst from his machine gun. The carrier was -bulging with cases of beer. It struck us that we had been -constantly thirsty for the last two days. Iowa Smith clambered -into the carrier and began handing out the cans. Peck opened -them with a knife. Robert, putting the machine gun against the -carrier, punched holes into the cans with a sharp point on the -armor. And the Teacher, adjusting his pince-nez, tripped on the -Fulminator straps and muttered, "Wait a minute, Smith; can't -you see I've got my hands full?" A five-story building burned -briskly at the end of the street, there was a thick smell of -smoke and hot metal, and we avidly downed the warm beer, and -were drenched through and through, and it was very hot and the -dead officers lay on the broken and crushed bricks, with their -legs identically flung out in their black pants, and the -camouflage shirts bunched at their necks, and the skin still -glistening with perspiration on their backs. - 'They are officers," said the Teacher. "Thank God. I can't -bear the sight of any more dead kids. Accursed politics! People -forget God on account of it." - "What god is that?" inquired Iowa Smith out of the -carrier. "I've never heard of him." - "Don't jest about that, Smith," said the Teacher. "This -will all end soon, and from then on no one nowhere will be -permitted to poison the souls of men with vanity." - "And how then shall they multiply?" asked Iowa Smith. He -bent over the beer again, and we could see the burn holes in -his pants. - "I am talking about politics," said the Teacher modestly. -"The fascists must be destroyed. They are beasts. But that is -not enough. There are many other political parties, and there -is no place for them and all their propaganda in our land." The -Teacher came from this town and lived within two blocks of our -post. "Social anarchists, technocrats, communists, are of -course -- " - "I am a communist," announced Iowa Smith, "at least by -conviction. I am for the commune." - The Teacher looked at him in bewilderment. - "Also I am a godless man," added Iowa Smith. "There is no -god, Teacher, and there's nothing you can do about it." - At which point we all began to say that we were all -atheists, and Peck said that on top of that he was for -technocracy, while Robert announced that his father was a -social anarchist and his grandfather was a social anarchist and -he, Robert, probably could not escape being a social anarchist, -although he didn't know what it was all about. - "Well now, if the beer would get ice-cold, said Peck -pensively, "I would at once believe in God with great delight." - Teacher smiled embarrassedly and kept wiping his glasses. -He was a good man and we always kidded him, but he never took -offense. From the very first night I observed that his courage -was not great, but he never retreated without being commanded. -We were still chattering and joking when there was a thunderous -crash, the burning building wall collapsed, and straight out of -the swirling flames and clouds of smoke and sparks swam a -Mammoth attack tank, floating a yard above the pavement. This -was a new horror, the likes of which we hadn't seen yet. -Floating out in the middle of the street, it rotated its -thrower as though looking around, and then, hovering on its air -cushion, began to move in our direction, screeching and -clanking metallically. I regained my wits only by the time I -was behind a gate post. The tank was now considerably closer, -and at first I couldn't see anyone at all, but then Iowa Smith -stood up in full view out of the carrier, and propping the butt -of the Fulminator against his stomach, took aim. I could see -the recoil double him up. I saw a bright flash against the -black brow of the tank. And then the street was filled with -roar and flame, and when I raised my burned eyelids with great -effort, the street was empty and contained only the tank. There -was no carrier, no mounds of broken brick, no leaning kiosk by -the neighboring house -- there was only the tank. It was as -though the monster had come awake and was spewing waterfalls of -flame and the street ceased being a street and became a square. -Peck slapped me hard on the neck and I could see his glassy -eyes right in front of my face, but there was no time to run -toward the trench and break out the launcher. - We both picked up the mine and started running toward the -tank, and all I remember is looking continually at the back of -his head, and gasping for breath and counting steps, when the -helmet flew off Peck's head, and he fell, so I almost dropped -the mine and fell on top of him. The tank was blown up by -Robert and Teacher. I still don't know how they did it or when; -it must be they were running behind us with another mine. I sat -until morning in the middle of the street holding Peck's -bandaged head on my knees and staring at the awesome treads of -the tank sticking out of the asphalt lake. That same morning -the whole bloody thing came to an end all at once. Zun Padana -surrendered with all his staff and was shot in the street by -some crazed woman when already a prisoner.... - This was the very same place. I even thought I smelled -smoke and burned metal. Even the kiosk stood on the corner, and -it too was a bit crooked in the latest style of architecture. -The part of the street which the tank turned into a plaza -remained a plaza, and on the site of the asphalt lake there was -a small square in which someone was being beaten. Iowa Smith -was an urban planner from Iowa, U.S.A., Robert Sventisky was a -movie director form Krakow, Poland. The Teacher was a -schoolteacher from this town. No one ever saw them again, even -dead. And Peck was Peck, who had now become Buba - Buba lived in the same sort of cottage as I, and its front -door was open. I knocked, but no one responded and no one - -came out to meet me. I entered the dark hall. The lights did -not go on. The door to the right was locked, and I looked into -the one on the left. In the living room a bearded man, in a -jacket, but without pants, was sleeping on a tattered couch. -Someone's feet stuck out from under the overturned table. There -was a smell of brandy, tobacco smoke, and of something else, -cloyingly sweet, like in Aunt Vaina's room the other day. In -the door to the study, I bumped into a handsome florid woman, -who was not in the slightest surprised to see me. - "Good evening," I said. Please excuse me, but does Buba -live here?" - "Here," she said, examining me out of glistening -oily-looking eyes. - "Can I see him?" - "And why not -- all you want." - "Where is he?" - "Funny man. Where would he be?" she laughed. - I could guess where, but said, "In the bedroom?" - "You are warm," she said. - "What do you mean -- warm?" - "What a dunce, and sober yet! Would you like a drink?" - "No," I said, angry. "Where is he? I need him right away." - "Your prospects are poor," she said gaily. "But search on, -search on. As for me, I must go." - She patted me on the cheek and went out. - The study was empty. There was a large crystal vase on the -table with some kind of reddish fluid in it. Everything smelled -of that nauseatingly sweet odor. The bedroom was also empty; -crumpled sheets and pillows were scattered about. I approached -the bathroom door. The door was full of holes, obviously made -by bullets shot from the inside, judging by their shape. I -hesitated, then took hold of the handle. The door was locked. - I opened it with considerable difficulty. Buba lay in the -bath up to his neck in greenish water; steam rose from its -surface. The radio howled and wheezed on the edge of the tub. I -stood and looked at Buba. At the erstwhile cosmonaut -experimenter, Peck Xenai. At the once-upon-a-time supple and -well-muscled fellow, who at eighteen left his warm city by the -warm sea, and went into space for the glory of man, and who at -thirty returned to his country to fight the last of the -fascists and to remain here forever. I was repelled to think -that only an hour ago, I had looked like him. I touched his -face and pulled his thin hair. He did not stir. Then I bent -over him to let him sniff some Potomac, and suddenly saw that -he was dead. - I knocked the radio off the edge of the tub and crushed it -under heel. There was a pistol on the floor. But Peck had not -shot himself; it must have been simply that someone interfered -with him and he shot through the door in order to be left -alone. I stuck my arms in the hot water, picked him up, and -carried him to the bed. He lay there all limp and terrible, -with eyes sunken under his brows. If only he were not my -friend... if only he were not such a wonderful guy... if only -he were not such an outstanding worker... - I called emergency aid on the phone and sat down beside -Peck. I tried not to think of him. I tried to think about the -business at hand. And I tried to be cold and harsh, because at -the very bottom of my conscious mind, that flick of warm -feeling, like a speck of light, flashed again, and this time I -understood what the thought was. - By the time the doctor came, I knew what I was going to -do. I would find Eli. I would pay any sum. Maybe I would beat -him. If necessary, I would torture him. And he would tell me, -whence this plague flows out upon the world. He would name -names and addresses. He would tell me all. And we would find -these men. We would locate and burn their secret laboratories, -and as for themselves, we would ship them out so far that they -would never return. Whoever they might be. We would catch them -all, we would catch all who ever tried slug and isolate them, -too. Whoever they were. Then I would demand that I, too, be -isolated because I knew what slug was. Because I grasped what -sort of thought I had, because I was socially dangerous, just -as they all are. And all that would be only the beginning. The -beginning of all beginnings, and ahead would remain that which -was most important: to make it so that people would never, -never, wish to know what slug was. Probably that would be -outlandish. Probably many would say that it was too outlandish, -too harsh, too stupid -- but we would still have to do it if we -wanted mankind not to stop.... - The doctor, an old gray man, put down his white case, -leaned over Buba, looked him over, and said indifferently, -"Hopeless." - "Call the police," I said. - Slowly he put away his instruments. - "There is no need of that whatsoever," he said. "There's -no criminal content, here. It is a neurostimulator...." - "Yes, I know." - "There you are -- the second case this night. They just -don't know when to stop." - "When did it start?" - "Not very long ago... a few months." - "Then why in hell do you keep it quiet?" - "Keep it quiet? I don't understand. This is my sixth call -tonight, young man. The second case of nervous exhaustion and -four cases of brain fever. Are you a relative?" - "No." - "Well, all right, I'll send some men." He stood awhile, -looking at Peck. "Join some choruses," he said. "Enter the -League of Reformed Sluts..." - He was mumbling something else as he left, an old, bent, -uncaring man. I covered Peck with a sheet, pulled the drape, -and went out into the living room. The drunks were snoring -obscenely, filling the air with alcoholic fumes, and I took -them both by the heels and dragged them out in the yard, -leaving them in the puddle by the fountain. - Dawn was breaking once more and the stars were dimming in -the paling sky. I got into the taxi and dialed the old Subway -on the console. - It was full of people. It was impossible to get through to -the railing, although it seemed to me that only two or three -men were filling out the forms, while the rest were just -looking, stretching their necks eagerly. Neither the -round-headed man nor Eli were to be seen behind the barrier, -and no one knew where they could be found. Below, in the -cross-passages and tunnels, drunken, shouting, half-crazed men -and hysterical women were milling about. There were shots, -distant and muffled and some loud and close, the concrete -underfoot shook with the detonations, and a mixture of smells --- gunpowder, sweat, smoke, gasoline, perfume, and whiskey -- -coated in the air. - Squealing and arm-waving teenagers surrounded a big fellow -who dripped blood and whose pale face shone with a look of -triumph. Somewhere wild beasts roared menacingly. In the halls, -the audience was going wild in front of huge screens showing -somebody blindfolded, firing a spray of bullets from a machine -gun held against his belly, and someone else sat up to his -chest in some black and heavy liquid, blue from the cold and -smoking a crackling cigar, and another one with a -tension-twisted face, suspended as though cast in stone in some -sort of web of taut cords... - Then I found out where Eli was. I saw round-head by a -dirty room full of old sandbags. He stood in the doorway, his -face covered with soot, smelling of burnt gunpowder, the pupils -of his eyes fully distended. Every few seconds he bent down and -brushed his knees, not hearing me at all, so that I had to -shake him to make him take notice of me. - "There is no Eli," he barked. "Gone, do you understand? -Nothing but smoke -- get it? Twenty kilovolts, one hundred -amperes, see? He didn't leap far enough!" - He pushed me away vigorously and took off into the dirty -room, jumping over the sandbags. Elbowing the curious out of -the way, he got to a low metal door. - "Let me through," he howled. "Let me at it once more. God -favors a third time!" - The door shut heavily and the mob surged away, stumbling -and falling over the bags. I didn't wait for him to come out. -Or not to come out. He was no longer of any use to me. There -was only Rimeyer left. There was also Vousi, but I couldn't -count on her. So there was really only Rimeyer. I was not going -to wake him. I'd wait outside his room. - The sun was already up and the filthied streets were -empty. - The auto-streetcleaners were coming out of their -underground garages to do their job. All they knew was work; -they had no potentialities to be developed, but they also had -no primitive reflexes. Near the Olympic, I had to stop for a -long chain of red and green men followed by a string of people -enclosed in some sort of scales, who dragged their shuffling -feet from one street into the next, leaving behind a stench of -sweat and paint. I stood and waited for them to pass, while the -sun had already lit up the huge mass of the hotel and shone -gaily in the metallic face of Yurkovsky, who, as he had while -alive, looked out over the heads of all men. After they passed, -I went into the hotel. The clerk was dozing behind his counter. -Awaking, he smiled professionally and asked in a cheery voice, -"Would you like a room?" - "No," I replied, "I am visiting Rimeyer." - ' Rimeyer? Excuse me -- room 902?" - I stopped. - "I believe so. What's the matter?" - "I beg your pardon, but he is not in." - "What do you mean, not in?" - "He checked out." - "Can't be, he has been ill. You are not mistaken? Room -902?" - "Exactly right, 902, Rimeyer. Our perpetual client. It's -an hour and a half since he left. More accurately, flew away. -His friends helped him down and aboard a copter." - "What friends?" I asked hopelessly. - "Friends, as I said, but, excuse me, they were -acquaintances. There were three of them, two of whom I really -don't know. Just young athletic-looking men. But I do know Mr. -Pebblebridge, he was our permanent guest. But he signed out -- -today." - "Pebblebridge?" - "Exactly. Lately he has been meeting Rimeyer quite often, -so I concluded that they were quite well acquainted. He stayed -in room 817. A fairly imposing gentleman, middle-aged, -red-headed..." - "Oscar!" - "Exactly, Oscar Pebblebridge. - 'That makes sense," I said, trying to keep a hold on -myself. "You say they helped him?" - "That's right. He has been very sick and they even sent a -doctor up: to him yesterday. He was still very weak and the -young men held him up by his elbows, and almost carried him." - "And the nurse? He had an attendant nurse with him?" - "Yes, there was one. But she left right after them -- they -let her go." - "And what is your name?" - "Val, at your service." - "Listen, Val," I said. "You are sure it didn't look like -they were taking him away forcibly?" - I looked hard at him. He blinked in confusion. - "No," he said. "Although, now that you have mentioned -it..." - "All right," I said. "Give me the key to his room and come -with me." - Clerks are, as a rule, quite savvy types. Their sense of -smell, at least for certain things, is quite impressive. It was -perfectly obvious that he had guessed who I was. And maybe even -where I came from. He called a porter, whispered something to -him, and we went up to the ninth floor. - "What currency did he pay in?" I asked. - "Who? Pebblebridge?" - "Yes." - "I think... ah yes, marks, German marks." - "And when did he arrive here?" - "One minute... it will come to me... sixteen marks ... -precisely four days ago." - "Did he know that Rimeyer stayed with you?" - "Excuse me, but I can't say. But the day before yesterday, -they had dinner together. And yesterday, they had a long talk -in the foyer. Early in the morning while everybody was still -up." - It was unusually clean and tidy in Rimeyer's room. I -walked about looking over the place. Suitcases stood in the -closet. The bed was rumpled, but I could see no signs of -struggle. The bathroom also was clean and tidy. Boxes of Devon -were stacked on the shelf. - "What do you think -- should I call the police?" asked the -clerk. - "I don't know," I replied. "Check with your -administration." - "You understand that I am in doubt again. True, he didn't -say goodbye. But it all looked completely innocent. He could -have given me a sign, and I would have understood him -- we -have known each other a long time. He was pleading Mr. -Pebblebridge: 'The radio, please don't forget the radio.'" - The radio lay under the mirror, hidden by a negligently -thrown towel. - "Yes?" I said. "And what did Mr. Pebblebridge say to -that?" - Mr. Pebblebridge was soothing him, saying, "Of course, of -course, don't worry..." - I took the radio, and leaving the bathroom, sat down at -the desk. The clerk looked back and forth from the radio to me. - So, I thought, now he knows why I came here. I turned it -an. It moaned and howled. They all know about slug. No need for -Eli, nor Rimeyer; you can take anyone at random. This clerk, -for instance. Right now, for instance. I turned it off and -said, "Please be good enough to turn on the combo." - He ran over to it with mincing steps, turned it on, and -eyed me questioningly. - "Leave it on that station. A little softer. Thank you." - "So you don't advise me to call the police?" - "As you wish." - "It seemed you had something quite definite in mind when -you questioned me." - "It only seemed so," I said coldly. "It's just that I -dislike Mr. Pebblebridge. But that does not concern you." - The clerk bowed. - "I'll stay here for a while, Val," I said. "I have a -notion that this Mr. Pebblebridge will be back. It won't be -necessary to announce that I am here. In the meantime, you are -free to go." - "Yes, sir," he said. - When he left, I rang up the service bureau and dictated a -telegram; "Have found the meaning of life but am lonely brother -departed unexpectedly come at once Ivan." Then I turned on the -radio again, and again it howled and screeched. I took off the -back and pulled out the local oscillator-mixer. It was no -mixer. It was a slug. A beautiful precision subassembly, of -obviously mass-produced derivation, and the more I looked at -it, the more it seemed that somewhere, sometime, long before my -arrival here, and more than once, I had already seen these -components in some very familiar device. I attempted to -recollect where I had seen them, but instead, I remembered the -room clerk and his face with a weak smile and his -understanding, commiserating eyes. They are all infected. No, -they hadn't tried slug -- heaven forbid! They hadn't even seen -one! It is so indecent! It is the worst of the worst! Not so -loud, my dear, how can you say that in front of the boy... but -I've been told it's something out of this world.... Me?... How -can you think that, you must have a low opinion of me after -all.... I don't know, they say over at the Oasis, Buba has it, -but as for myself -- I don't know.... And why not? I am a -moderate man -- if I feel something is not right, I'll stop.... -Let me have five packets of Devon, we have made up a fishing -party (hee, hee!). Fifty thousand people. And their friends in -other towns. And a hundred thousand tourists every year. The -problem is not with the gang. That's the least of our worries, -for what does it take to scatter them? The problem is that they -are all ready, all eager, and there is not the slightest -prospect of the possibility to prove to them that it is -terribly frightening, that it is the end, that it is the last -debasement. - I clasped the slug in my fist, propped up my head on it, -and stared at Rimeyer's dress jacket with the ribbon bar on it, -hanging on the back of the chair. Just like me, he must have -sat in this chair a few months ago, and also held the slug and -radio for the second time, and the same warm flick of desire -wandered through the depths of his consciousness: there is -nothing to worry about, because now there is light in any -darkness, sweetness in any grief, joy in any pain.... - ...There, there, said Rimeyer. Now you have got it. You -just have to be honest with yourself. It is a little shameful -at first, and then you begin to understand how much time you -have lost for nothing.... ...Rimeyer, I said, I wasted time not -for myself. This cannot be done, it simply cannot, it is -destruction for everyone, you can't replace life with -dreams.... ...Zhilin, said Rimeyer, when man does something, it -is always for himself. There may be absolute egotists in this -world, but perfect altruists are just impossible. If you are -thinking of death in a bathtub, then, in the first place, we -are all mortal, and in the second place, if science gave us -slug, it will see to it that it will be rendered harmless. And -in the meantime, all that is required is moderation. And don't -talk to me of the substitution of reality with dreams. You are -no novice, you know perfectly well that these dreams are also -part of reality. They constitute an entire world. Why do you -then call this acquisition ruin?... ...Rimeyer, I said, because -this world is still illusory, it's all within you, not outside -of you, and everything you do in it remains in yourself. It is -the opposite of the real world, it is antagonistic to it. -People who escape into this illusory world cease to exist in -the real world. They become as dead. And when everyone enters -the illusory world -- and you know it could end thus -- the -history of man will terminate.... ...Zhilin, said Rimeyer, -history is the history of people. Every man wants to live a -life which has not been in vain, and slug gives you such a -life.... Yes, I know that you consider your life as not having -been in vain without slug, but, admit it, you have never lived -so luminously, so fully as you have today in the tub. You are a -bit ashamed to recollect it, and you wouldn't risk recounting -it to others. Don't. They have their life, you have yours.... -...Rimeyer, I said, all that is true. But the past! Space, -schools, the struggle with fascists, gangsters -- is all that -for naught? Forty years for nothing? And the others -- they did -it all for nothing, too?... ...Zhilin, said Rimeyer, nothing is -for nothing in history. Some fought and did not live long -enough to have slug. You fought and lived long enough.... -...Rimeyer, I said, I fear for mankind. This is really the end. -It's the end of man interacting with nature, the end of the -interplay of man with society, the end of liaisons among -individuals, the end of progress, Rimeyer. AU these billions of -people submerged in. hot water and in themselves... only in -themselves.... ... Zhilin, said Rimeyer, it's frightening -because it's unfamiliar. And as for progress -- it will come to -an end only for the real society, only for the real progress. -But each separate man will lose nothing, he will only gain, -since his world will become infinitely brighter, his ties with -nature, illusory though they may be, will become more -multifaceted; and ties with society, also illusory but not so -known to him, will become more powerful and fruitful. And you -don't have to mourn the end of progress. You do know that -everything comes to an end. So now comes the end of progress in -the objective world. Heretofore, we didn't know how if, would -end, But we know now. We hadn't had time to realize all the -potential intensity of objective existence, it could be that we -would have reached such knowledge in a few hundred years, but -now it has been put in our grasp. Slug brings a gift of -understanding of our remotest ancestors which you cannot ever -have in real life. You are simply the prisoner of an obsolete -ideal, but be logical, the ideal which slug offers you is just -as beautiful. Hadn't you always dreamed of man with the -greatest scope of fantasy and gigantic imagination.... -...Rimeyer, I replied, if you only knew how tired I am of -arguing. All my life I have argued with myself and with others. -I have always loved to argue, because otherwise life is not -worth living. But I am tired right now and don't wish to argue -over slug, of all things.... ...Then go on, Ivan, said -Rimeyer.... - I inserted the slug into the radio. As he had then, I got -up. As he did then, I was past thought, past belonging in this -world, but I still heard him say: don't forget to lock the door -tight so that you won't be disturbed. - And then I sat down. ...So that's the way of it, Rimeyer! -said I. So that's how it went. You surrendered. You closed the -door tight. And then you sent lying reports to your friends -that there wasn't any slug. And then again, after hesitating -but a moment, you sent me to my death so that I wouldn't -disturb you. Your ideal, Rimeyer, is offal. If man has to -perform what is base in the name of an ideal, then the worth of -such ideal is -- less than dross.... - I glanced at the watch and shoved the radio in my pocket. -I was past waiting for Oscar. I was hungry. And beyond that I -had the feeling that for once I had done something useful in -this town. I left my phone number with the room clerk -- in -case Oscar or Rimeyer should return -- and went out onto the -plaza. I did not believe that Rimeyer would come back or even -that I would ever see him again, but Oscar could hold to his -promise, though more likely, I would have to seek him out. And -probably not alone. And probably not here. - -

    Chapter TWELVE

- - There was but one visitor in the automated cafe. -Barricaded behind bottles and hors d'oeuvres at a corner table -sat a dark man of oriental cast, magnificently but outlandishly -dressed. I took some yogurt and blintzes with sour cream and -set to, glancing at him now and then. He ate and drank much and -avidly, his face shiny with sweat, hot inside his ridiculous -formal clothes. He sighed, leaning back in his chair and -loosening his belt. The motion exposed a long yellow holster -glistening in the sunlight under the clothing. - I was on my way into the last of the blintzes when he -hailed me: "Hello," he said. "Are you a native here?" - "No," I said. "A tourist." - "So that means you don't understand anything either." - I went to the bar, threw a juice cocktail together, and -approached him. - "Why is it empty here?" he continued. He had a lively -spare face and a bold gaze. "Where are the inhabitants? Why is -everything closed up? Everyone is asleep, you can't get any -service." - "You just arrived?" - "Yes." - He pushed an empty plate away, moved up a full one, and -gulped some light beer. - "Where are you from?" I asked. He glared at me menacingly, -and I added quickly, "If it's not a secret, of course." - "No," he said, "it's not a secret," and went back to his -eating. - I finished the juice and got ready to leave. Then he said, -"They live well, the dogs. Such food and as much as you want, -and all for free." - "Well, not quite for free," I contradicted. - "Ninety dollars! Pennies! I'll show them how to eat ninety -dollars within three days!" His eyes stopped roving -momentarily, "D-dogs!" he muttered and fell to again. - I was quite familiar with such types. They came from -minuscule, totally milked kingdoms and prefectdoms, reduced to -utter poverty, and greedily ate and drank, mindful of the hot -dusty streets of their home towns, where in the niggardly -ribbons of shade, moribund men and women lay dying and -immobile, while children with distended bellies rummaged in the -garbage piles of foreign consulates. They were surcharged with -hatred and needed only two things -- food and weapons. Food for -their own gang, which was the opposition, and weapons to fight -the other gang, which was in power. They were the most flaming -patriots, who spoke hotly and effusively of their love for the -people, but resolutely refused all help from without, because -they loved nothing but their power and no one but themselves, -and were ready in the name of the people and the victory of -high principles to mortify the same people, right down to the -last man, if necessary, with hunger and machine gun. -Microhitlers! - "Weapons? Food?" I asked. - He grew wary. - "Yes," he said. "Food and weapons. Only without any silly -conditions. And as free as possible. Or on credit. True -patriots never have any money. While the ruling clique drowns -in luxury...." - "Famine?" I asked. - "Anything you want. While you here swim in luxury." He -gazed at me with hatred. "The whole world is drowning in wealth -and we alone are starving. But your hopes are in vain! The -revolution cannot be stopped!" - "Yes," I said. "And whom is the revolution against?" - "We are fighting the blood leeches of Boadshah! We are -against corruption and debauchery of the ruling top layer, we -are for freedom and true democracy. The people are with us, but -they have to be fed. And you tell us that you'll give us food -only after we disarm. And even threaten intervention.... What -filthy, lying demagogy! What deception of the revolutionary -masses! To disarm in the face of those bloodsuckers -- that -means to throw a hangman's noose over the heads of all the true -freedom fighters! We answer you -- no! You will not deceive the -people. Let Boadshah and his brutes disarm! Then we shall see -what needs doing!" - "Yes," I said. "But Boadshah also, in all probability, -does not wish a noose thrown over his neck." - He put the beer down savagely, and his hand moved toward -the holster in a habitual gesture. But then he quickly caught -himself. - "I should have known you don't understand a damn thing," -he said. "You who are well fed have grown drowsy from a full -stomach, you are too conceited to understand us. You wouldn't -have dared to talk to me like that in the jungle." - In the jungle, I would have talked differently to you, -bandit, I thought, and said: - "I really don't understand many things. For instance, I -don't understand what will happen when you gain the upper hand. -Let us imagine that you have won, Boadshah has been hanged, if -be, in his turn, hasn't fled to seek food and weapons --" - "He won't get away. He'll get his just deserts. The -revolutionary people will tear him to shreds. That's when we'll -go to work. We will regain the territory seized from us by -affluent neighbors, we will carry out the entire program which -the lying Boadshah constantly shouts about to deceive the -people.... I'll show them how to strike! They'll learn about -strikes with me on top -- there'll be no strikes! They'll all -go under arms and forward march! We will win and then..." - He shut his eyes and moaned a bit, shaking his head. - "And then you will be well fed, you will swim in luxury -and sleep till noon?" - He laughed. - "I deserve that. The people deserve it. No one will dare -reproach us. We will eat and drink as much as we wish, we will -live in real houses, we will say to the people: now you are -free -- divert yourselves!" - "And don't think about a thing," I added. "But don't you -think that all that could come out badly for you?" - "Forget it," he said. "That's sheer demagogy. You are a -demagogue. Also a dogmatist. We too have all kinds of -dogmatists similar to yourself. Man, they say, will lose the -meaning of life. No, we reply, man will lose nothing. Man will -acquire and not lose. You have to feel the people. You have to -be from the people yourself. The people don't like sophists. -What the hell for do I let myself be fed on by wood leeches and -feed on worms myself?" Suddenly he smiled amiably. "You must -have taken offense at me a bit, for calling you well fed and -other things. Please don't. Affluence is bad when you don't -have it, but your neighbor does. But achieved affluence -- -that's a great thing! It's worth fighting for. Everybody fought -for it. It must be obtained with weapons in hand, and not -traded for freedom and democracy." - "So your final goal is still abundance? Just abundance?" - "Obviously! The final objective always is abundance. The -difference is that we are choosy about the means to get it." - "I have already grasped that. But what about man?" - "What do you mean, man?" - I did understand that it was futile to argue. - "You have never been here before?" I asked. - "Why?" - "Look into it, I said. This town gives excellent practical -lessons in abundance." - He shrugged his shoulders. - "So far, I like it here." Again he pushed away an empty -plate and replaced it with a full one. "These hors d'oeuvres -are strange to me.... Everything is tasty and cheap.... It's -enviable." He swallowed a few forkfuls of salad and growled. -"We know that all great revolutionaries fought for abundance. -We don't have time to theorize, but there is no need for it, -anyway. There are enough theories without us. Furthermore, -abundance is in no way threatening us. It won't threaten us for -quite a while yet. We have much more pressing problems." - "To hang Boadshah," I said. - "Yes -- to begin with. Next we will need to do away with -the dogmatists. I can perceive that even now. Next comes the -realization of our legitimate claims. After that, something -else will come up. And only then, and after many other things, -will abundance arrive. I am an optimist, but I don't believe I -will live to see it. Don't you worry -- we'll manage somehow. -If we can stand hunger then we can take abundance for sure.... -The dogmatists prattle that abundance is not an end, but a -means. We reply that every means was once an goal. Today, -abundance is a goal. Tomorrow, perhaps it may become a means." - I got up. - "Tomorrow may be too late," I said. "It is incorrect of -you to fall back on great revolutionaries. They would not have -accepted your shibboleth: now you are free -- enjoy yourselves. -They spoke otherwise: now that you are free -- work. After all, -they never fought for abundance for the belly, they were -interested in abundance for the soul and the mind." - His hand twitched toward the holster again, and again he -caught himself. - "A Marxist!" he said with astonishment. "But then again, -you are a visitor. We have almost no Marxists, we take them -and..." - I kept control of myself. - Passing by the window, I took another look at him. He sat -with his back to the street and ate and ate, his elbows stuck -out. - When I got home, the living room was already vacant. The -youngsters had piled the bedsheets and pillows in the corner. -There was a note under the telephone on the desk. Written in a -childish scrawl, it read: "Take care. She has plotted -something. She was fussing in the bedroom." I sighed and sat -down in the armchair. - There was still an hour until the meeting with Oscar, -assuming he came. There was no sense in going to sleep, but in -addition, it might not be safe -- Oscar could bring company, -and come earlier than expected, possibly not through the door. -I got the pistol out of the suitcase, put in a clip, and -dropped it in my side pocket. Next I climbed into the bar, -brewed myself some coffee, and went back to the study. - I took the slug out of my radio and the one out of -Rimeyer's, lay them down in front of me on the table, and -attempted again to recollect where indeed I had seen just such -components and why I thought that I had seen them before and -more than once. And then it came to me. I went into the bedroom -and brought in the phonor. I didn't even need a screwdriver. I -took the case off the phonor, stuck my index finger under the -odorizer horn, and, catching it with my finger nail, extracted -a vacuum tubusoid FX-92-U, four outputs, static field, capacity -equals two. Sold in consumer electronic stores at fifty cents -each. In local patois -- a slug. - It had to be, I thought. We are disoriented by -conversations about a new drug. We are constantly derailed by -talk about horrific new inventions. We have already made -several similar blunders. - There was the time when Alhagana and Burris served up a -complaint in the U.N. that the separatists were using a new -type of weapon -- freeze bombs. We threw ourselves furiously -into a search for underground laboratories and even arrested -two genuine underground inventors (sixteen and ninety-six years -old, respectively). And then it turned out that the inventors -were in no way connected, and the awful freeze bombs were -acquired by the separatists in Munich from a refrigerator -warehouse -- and were in fact reject super-freezers. True, the -effect of these super-freezers was indeed horrible. Used in -conjunction with molecular detonators (widely used by undersea -archaeologists in the Amazon for dispersing crocs and -piranhas), the super-freezers were capable of instantaneous -temperature depression of one hundred and fifty degrees -centigrade over a radius of twenty meters. Afterward, we spent -much effort indoctrinating ourselves with the concept that we -should keep in mind that in our times, literally every month, -masses of new inventions appear with the most peaceful of -applications, but with the most unexpected side effects. These -characteristics are often such that lawbreaking in the area of -weapons manufacture and stockpiling becomes meaningless. We -became extremely cautious about new types of armament, employed -by various extremists, and only a year later got caught by -another twist, when we went looking for a mysterious apparatus -with which poachers lured pterodactyls from the Uganda Preserve -at a great distance. We found a clever do-it-yourself -adaptation of the "Up-down" toy in combination with a fairly -generally available medical device. - And now we had caught slug -- a combination of a standard -radio with a standard tubusoid and a standard chemical and very -common plumbing-supplied hot water. - To make a long story short, there would be no need to -search for secret factories. We'd have to look for some very -adroit and unprincipled speculators who sensed very delicately -indeed that they found themselves in the Country of the -Boob.... They'd be like trichinae in a ham. Five or six -enterprising self-seekers. An innocent cottage somewhere in the -suburbs. Just go to a department store, buy the vacuum tubusoid -for fifty cents, peel off the plastic wrapping, and place in an -elegant box with a glassite cover. And then sell it for fifty -marks -- "only to you and only through friends." True, there -was still the inventor. Probably he was not alone, and most -certainly he was not the only one.... But probably they had not -survived; for this was nothing like a lure for pterodactyls. -Anyway, was the matter really one of speculators? Let them sell -another forty slugs, or a hundred. Even in the City of Boobs, -people had to figure out in the end what it was all about. And -when that happened, slug would spread like wildfire. - The first ones to see to that would be the moralists from -the Joy of Living. They would be followed by Dr. Opir, who -would sally forth and announce that according to scientific -endings, slug was conducive to clarity of thought and was -unsurpassed in the treatment of alcoholism and depression. In -general, the future ideal was a vast trough filled with hot -water. Then they would stop writing the word "slug" on the -fences. - That's who should be taken by the throat, I thought, if -anybody. The trouble is not the profiteers. The trouble is that -there exists this Country of the Boob, this filthy -misconstruction. It has taken the shivers under its wing and -can't wait to legalize slug.... - There was a knock on the door. Oscar came into the study, -and he was not alone. With him was Matia himself, stocky, gray, -with dark glasses and thick cane, as always, looking like a -veteran who has lost his sight. Oscar was smirking -self-satisfiedly. - "Hello, Ivan," said Matia. "Meet your back-up, Oscar -Pebblebridge, from the southwest section." - We shook hands. What I have always disliked about our -Security Council is the plethora of mossy traditions, and -especially infuriating is the idiotic system of -cross-investigation, due to which we are constantly tripping -over each other's sleuthing, busting each other's mugs, and not -uncommonly shooting each other with fair accuracy. I can hardly -see that as serious work -- more like adolescents playing at -detectives. Let them go soak their heads in a swamp. - "I was going to take you in today," confided Oscar. "Never -in my life have I seen such a suspicious character." - Without saying a word, I took the pistol out of my pocket, -unloaded it, and threw it in the desk drawer. Oscar followed my -actions with approval. I said, addressing Matia, "I guess that -the investigation would simply collapse, without getting -started, had I known about Oscar. But I must inform you that I -almost maimed him yesterday." - "I read you right," said Oscar smugly. - Grunting, Matia lowered himself into the armchair. - "I can't ever remember a situation," he said, "when Ivan -was pleased with everything. But conspiracy is the foundation -of our business.... Take a chair and sit down, both of you. -You, Oscar, had no right to be maimed, and you, Ivan, had no -right to be arrested. That's how you should regard it. And what -have you got here?" he said, taking off his dark glasses to -look at the slugs, "Taking up radio as a hobby in between your -work? Laudable, laudable!" - It was evident that they didn't know a thing. Oscar was -leafing through his notebook, where everything was encrypted in -his own personal code, and was apparently preparing himself to -make a report, while Matia scanned over the slugs with his -fleshy nose, holding the glasses aloft in his hand. There was -something symbolic in this spectacle. - "And so, agent Zhilin is enriching his leisure with radio -technology," continued Matia, restoring his glasses and leaning -back in his chair. "He has lots of free time, he has switched -to a four-hour day.... And bow do you stand on the question of -the meaning of life, agent Zhilin? It appears you may have -found it. I hope it won't be necessary to take you away like -agent Rimeyer?" - "It won't be required," I said. "I had not enough time to -become addicted. Did Rimeyer tell you anything?" - "But of course not," he said with vast sarcasm. "Why -should he do that? He was ordered to find the drug, and he did, -and he used it, and now he apparently considers his duty -discharged. He became an addict himself, don't you see. He is -silent. He is loaded with this brew up to his ears, and it's -useless to talk to him! He raves that he has murdered you and -constantly asks for his radio." Matia stopped short and gazed -at the radios. "Strange," he said and looked at me. "However, I -like orderliness. Oscar got here first, and he has certain -deductions both about the goodies and the conduct of the -operation. Let's begin with him." - I looked at Oscar. - "About what operation?" - "The devil knows," said Matia. - "The raiding of the center. You haven't located the center -yet?" - The hunt is on, I thought, and said, "No, I didn't. A -center I haven't latched on to. But --" - "All in good order, in proper order," said Matia severely -and banged the table with the flat of his hand. "Oscar, you may -begin, and as for you, Ivan, you listen attentively and make -your deductions. If you are still capable, that is." - Oscar began. Obviously he was a good worker. He moved -fast, energetically, and purposefully. True, Rimeyer had -twisted him around his finger as well as he had me. -Nevertheless, Oscar had been able to grasp much in spite of it. -He understood that the sought-for "goodies" were known locally -as "slug." Very rapidly he had grasped the connection between -slug and Devon. He divined that neither the Fishers, nor the -Perches, nor the Sorrowers had any relation to our problem. He -had deduced with superb insight that in this town it was -practically impossible to hide any secret. He had even been -able to insinuate himself into the confidence of the Intels, -and had established beyond any doubt that there were only two -truly secret societies -- the Art Patrons and the Intels. Since -the Art Patrons could be eliminated, that left only the -Intels.... - "It was not contrary to the conviction which I had -formed," said Oscar, "that the only people with access to -laboratories and capable of conducting scientific or -quasi-scientific research were the students and professors in -the university. It's true that the factories in the city also -have laboratories. There are only four of them, and I have -investigated them all. These laboratories are stringently -specialized and are loaded to the limit with ongoing work. As -the factories work around the clock, there is no basis -whatsoever to postulate that the industrial labs could become -centers of slug manufacture. On the other hand, out of the -seven university labs, two are obviously surrounded with an -atmosphere of mystery. I was unable to determine what goes on -in them, but I spotted three students, who, I believe, should -know for sure...." - I listened to him intently, amazed at how much he had been -able to accomplish here, but it was already all too clear to me -where his main error lay. I could see he was following a false -trail, and alongside of that, there grew within me a vague -feeling of an even more significant error, of a most important -error, the error in the underlying premises of the Council. - "I arrived at the visualization," he continued, "of a -gangsterlike organization of the vertical type with rigorously -separated functions in decentralized sections. The production -section is involved in the manufacture and perfection of the -slug.... I should inform you that slug, whatever it may be, is -being perfected: I was able to establish that in the beginning. -Devon was not employed at all.... Next, the marketing section -is concerned with expanding the slug distribution, while the -strong-arm section terrorizes the population and interdicts all -debate on that topic.... The intimidation of the people..." - Now I understood it all. - "Just a minute, Oscar," I said. "Can you guarantee that in -the entire city there are only two secret organizations?" - "Yes," he said. "Only the Art Patrons and the Intels." - "Please continue, Oscar," said Matia with displeasure. "I -would ask you not to interrupt, Ivan." - "Sorry," I said. Oscar continued to talk, but I was no -longer listening. Something flared in my mind. The traditional -initial model for all our undertakings, with its invariant -axiom predicating the existence of a ramified organization of -evildoers, had been shattered into dust, and I was only amazed -that I had failed heretofore to recognize its inane complexity -in the context of this simple-minded country. There were no -secret shops guarded by gloomy persons with brass knuckles, -there were no wary, unprincipled businessmen, there were no -traveling salesmen with double-walled shirt collars stuffed -with contraband, and it was quite for nothing that Oscar was -drafting the elegant chart of squares and circles, connected by -a confusion of lines, and inscribed with the words "center," -"staff," and numerous question marks. There was nothing to -demolish and be and no one to send off to Baffin Land.... But -there was modern industry involved in everyday trade, there -were state stores where slugs were sold for fifty cents apiece, -and there were -- but only in the beginning one or two -individuals not devoid of inventiveness and dying of inactivity -and thirsting for new sensations. And there was the -medium-sized country where, once upon a time, abundance and -affluence were the end to be attained, and they never did -become the means to another end. And that was all that was -needed. - Someone inserted a slug into a radio by mistake and lay -down in the bath to relax and maybe listen to some good music -or to hear the latest news -- and it started. The news oozed -and remnants of phonors found their way into the garbage ducts, -then someone figured out that slugs could be obtained not only -from phonors, but could simply be bought in stores. Someone was -inspired to use aromatic salts and someone employed Devon. -People started to die in their baths from nervous exhaustion, -and the statistical department of the Security Council -submitted a top secret report to the Presidium. It became -apparent at once that all such deaths occurred with people who -had come here as tourists. And furthermore, that there were far -more such deaths in this country than anywhere else on the -planet. As so often happens, a false theory was constructed on -well-verified facts, and we, one after another, well schooled -in conspiracy, were sent here to uncover the secret gang of -dealers in a new and unknown drug, and we arrived here and did -stupid things. But, as always, no labor goes for naught, and if -you must look for the guilty, then all were guilty, from the -mayor to Rimeyer, and if so, then no one was guilty, and now we -have to -- - "Ivan," said Matia irritably, "are you asleep?" - They were both looking at me. Oscar was extending me his -notebook with the diagrams. I took the notebook and threw it on -the table. - "Listen," I said. "Oscar has done wonders, of course, but -we have come a cropper again! Oscar, you have seen such a lot, -but you understood nothing. If there are any people in this -land who hate slug, it's the Intels. The Intels are not -gangsters, they are desperate men and patriots. They have but -one aim -- to stir this bog. By any means. To give this city -some kind of purpose, to force it away from the trough They are -sacrificing themselves, do you understand? They invite fire -upon themselves, they are attempting to arouse the town to come -sort of common emotion, even if it has to be hatred. Can it be -you haven't heard of the tear gas, the shooting up of the -shivers? They are not making slug in the laboratories, they are -building bombs and cooking tear gas ... and generally breaking -the laws on weapons technology. They are preparing a putsch for -the twenty-eighth, but as for slug -- here it is!" - I shoved one at each of them, and simultaneously expounded -everything I thought on the subject. - At first, they listened to me in disbelief. Then they -stared at the slugs, not taking their eyes off them until I'd -finished, and when I did, they were quiet for quite a while. -Matia held his slug as though it were a buzzing wasp. There was -displeasure written on his face. - "Vacuum tubusoid... Hmmm... In fact... and radios ... -there is something to it." - Matia stuck the slug in his shirt pocket and announced -decisively, "There is nothing in it. That is, of course, I am -very pleased with you, Ivan, since you have apparently found -that which was needed, but your work is in the Council and not -with the Commission of World Problems. They adore philosophy -there, and haven't done a single useful thing to date. As for -you, you have been working with us for ten years now, but you -still haven't grasped the simple truth: if there is a crime, -there must be a criminal." - 'That's not true," I said. - "That is true!" said Matia. "Don't start a debate with me! -You are eternally debating!... Be quiet, Oscar. It's my turn to -talk. I am asking you, Ivan, what is the worth of your version? -What do you propose to do? But be concrete, please! Be -concrete!" - "Concretely..." I faltered. - True enough, my version did not suit them. - They probably didn't even consider it a version. - For them it was just philosophizing. They were men, so to -say, of resolute action, knights of immediate decisive -measures., They let nothing slide. They cut through knots and -demounted Damocles' swords. They made rapid decisions, and -having made them, they no longer doubted. They didn't know how -to be otherwise. That was their world-view -- and I was the -only one to consider that their time had passed. Patience, I -thought. I am going to need an awful lot of patience. Suddenly, -I understood that life's logic was again ripping me away from -my best comrades, and that now it would be especially hard for -me, since the resolution of this argument would take a long -time, a very long time.... They were both looking at me. - "Concretely," I repeated. "Concretely I suggest a plan for -the development and spread of a humanistic viewpoint in this -country." - Oscar grimaced with distaste, and Matia said biliously: - "Nah! I am talking seriously." - "So am I. What we need is not detectives, nor squads armed -with machine pistols." - "We need a decision!" said Matia, "not conversations, but -decisions!" - 'That's precisely what I am proposing -- a decision." - Matia reddened - "We have to save people," he said. "Souls we can save -after we save the people.... Don't annoy me, Ivan!" - "While you are restructuring world-views," said Oscar, -"people will be dying or turning into idiots." - I didn't want to argue, but said anyway, "As long as -world-views are not restructured, people will be dying and -turning into idiots, and no squads will help. Remember -Rimeyer!" - "Rimeyer forgot his duty," raged Matia. - "Exactly," said I. - Matia slammed his mouth shut and, tearing off his glasses, -was silent for a while, his eyes rotating angrily. He was, -without a doubt, a man of iron; you could actually watch turn -drive his rage inward. In a minute he was entirely calm and -smiling placidly. - "Yes," he said. "It seems that I am forced to admit that -intelligence as a social institution has regressed to the -piteous end. Apparently we destroyed the last of the true -operatives in the time of the last putsches. "Knife" -- -Dannziger; "Bamboo" -- Savada; "Doll" -- Grover; "Ram" -- -Boas... True, they were bought and they were sold, they had no -country, they were scum, lumpens, but they worked! "Sirius" -- -Haram... worked for four intelligences and was a scoundrel. He -was a filthy animal. But if he gave information, it was real -information, clear, precise, and timely. I can recollect -ordering him hung without the slightest pity, but when I look -at my current co-workers, I can understand what a loss - that was.... Granted, a man can fail in the end and become -a drug addict, as "Bamboo" Savada did finally. But why write -lying reports? Rather resign, excuse yourself, don't write any -reports at all.... I arrive in this town in the profound -conviction that I know it through and through, because I have -had here for ten years an experienced, proved, resident agent. -And suddenly I determine that I know precisely nothing. Every -local kid knows who the Fishers are. But I don't know. I know -only that the KVS Society which occupied itself with about the -same things as the Fishers was disbanded and outlawed three -years ago. I know this from the reports of the resident. But at -the local police I am informed that the VAL Society was formed -two years ago, which I did not learn from the resident's -reports. I am employing a simplified example, since I really -don't give a damn about the Fishers, but this becomes -transformed into a general style of work. Reports are delayed, -reports lie, reports misinform... in the end reports are simply -invented. One man openly resigns from the Council and doesn't -consider it incumbent upon him to so inform his superior. He -has enough, you see; he had intentions to communicate but -somehow couldn't find the time.... Another, instead of fighting -the drug problem, becomes an addict himself.... And the third -philosophizes." - He nodded at me with regretful bitterness. - "Understand me correctly, Ivan," he continued. "I am not -opposed to philosophy. But philosophy is one thing and our work -altogether another. Judge for yourself, Ivan. If there is no -secret headquarters, if we are faced with a deluge of -do-it-yourself enterprise, then why all the secretiveness? All -this conspiratorial atmosphere? Why is slug enveloped in such -mystery? I allow that Rimeyer is silent because of pangs of -conscience in general and specifically on your account, Ivan. -But the rest? Slug is not illegal; everyone knows about it and -yet everyone keeps it a secret. Oscar, here, doesn't -philosophize; he postulates that the inhabitants are simply -terrorized. I can understand that. And what do you postulate, -Ivan?" - "In your pocket," I said, "there is a slug. Go in the -bathroom. There's Devon on the shelf -- one tablet orally, four -in the water. There's some whiskey in the medicine chest. Oscar -and I will wait. And then you can tell us aloud, so we can -hear, we your comrades in work and your underlings, about your -sensations and experiences. And we -- better it should be Oscar --- should listen, but as for me, I think I'll leave." - Matia put on his glasses and stared at me. - "You are implying that I won't tell? You propose that I, -too, will be derelict in my duty?" - "What you will learn will have no relation whatsoever to -your duty. That you will renege on subsequently. As did -Rimeyer. Comrades, this is slug. It's a cute device, which -awakens fantasy and directs it where it will, particularly -where you yourself subconsciously -- and I mean subconsciously --- would like to direct it. The further you are removed from -the animal, the more inoffensive would slug be, but the closer -to the animal, the more you would be impelled to adhere to the -conspiratorial way. The animals themselves are altogether -silent. They just know how to press the lever." - "What lever?" - I explained about the rats to them. - "Did you try it yourself?" asked Matia. - "Yes." - "And?" - "As you can see, I tend to silence." - Matia sibilated for some time and then said, "Well, I am -no nearer to the animal than you are. How do you put it in?" - I loaded the radio and handed it to him. Oscar was -following all this with interest. - "God be with me," said Matia, "Where is your bath? I'll -wash after my trip while I'm at it." - He locked himself in, and we could hear him dropping -things. - "Strange affair," said Oscar. - "It's really not an affair," I contradicted. "It's a piece -of history, Oscar, and you would like to fit it into a file and -tie it with a ribbon. But this is no gangster business. It -should be obvious to a hedgehog, as Yurkovsky used to say." - "Who?" - "Yurkovsky, Vladimir Sergeyevitch. There was such a -renowned planetologist. I worked with him." - "Aah," said Oscar, "By the way, on the plaza by the Hotel -Olympic there is a monument to a Yurkovsky." - "The very same man." - "Really?" said Oscar. "On the other hand, it's quite -possible. However, the monument was not put up because he was a -renowned planetologist. It's simply that for the first time in -the history of the city, he broke the electronic roulette bank. -It was decided to immortalize such a feat." - "I expected something of the sort," I murmured. I felt -depressed. - The shower began to hiss in the bathroom, and there was a -frightful roar from Matia, At first, I decided that he turned -on ice water instead of warm, but he kept yelling and then -began to curse in the most horrendous terms. Oscar and I -exchanged glances. He was generally calm, interpreting this as -the typical action of slug, and his face exhibited a -compassionate expression. The latch rattled wildly, the door -flew open with a crash. Bare heels slapped in the bedroom, and -a naked Matia rolled into the study. - "Are you some kind of an idiot?" he bellowed at me. "What -sort of filthy trick is this?" - I went numb. Matia resembled a grotesque zebra. His -well-fed body was covered with poison-green vertical stripes. -He reared and stamped his feet, spraying emerald drops. When we -regained our composure and investigated the site of the -accident, we learned that the shower head had been stuffed with -a sponge saturated with a green dye. I remembered Len's note -and guessed that Vousi was the culprit. It took a long while to -restore a normal atmosphere. Matia viewed the incident as a -boorish joke and an inadmissible disregard of subordinate -discipline and behavior. Oscar horse-laughed. I scrubbed Matia -with a brush and explained. Then Matia announced that from now -on he wouldn't trust anyone and would try out slug when he got -home. He dressed and went into conference with Oscar on the -plans for blockading the city. - I was cleaning up in the bath and thinking that with this, -my work in the Council was coming to an end, and another kind -of work was beginning -- which I did not know how to begin. I -would have liked to include myself in the blockade planning, -not because I considered it necessary, but because it was so -simple, so much more simple than to return to people their -souls which had been devoured by affluence, and to teach each -one to think of world problems in the same way as his own -personal ones. - "Isolate this pus bag from the rest of the world, isolate -it totally, that's the total of our philosophy," orated Matia. -That was aimed at me. But perhaps not even me. For Matia was a -brilliant mind. He understood too well that isolation was -always a defense, but here we had to attack. But he knew how to -advance only with squads, and this was embarrassing to him. - To rescue. For how long would you need rescuing? When -would you learn to rescue yourselves? Why were you eternally -harkening to priests, fascists, demagogues, and imbecile Opirs? -Why didn't you want to exert your brains? Why did you resist -thinking so? Why couldn't you understand that the world is -vast, complex, and fascinating? Why was everything simple and -boring tc you? In what way did your mind differ from the mind -of Rabelais, Swift, Lenin, Einstein, Makarenko, Hemingway, and -Strogoff? Someday I would grow tired of all this. Someday when -I had no more strength and conviction. For I was similar to -you. But I wanted to help you, and you didn't want to help -me.... - Reg and Len came over after school, and Len said, "We -have decided, Ivan. We will go to the Gobi Central." He had red -fuzz on his lip and huge red hands, and I could see that it -divas he who had thought up the Gobi trip, and quite recently --- not more than ten minutes ago. Reg, as usual, was silent, -chewing on a blade of grass and placidly studying me with his -calm gray eyes. He has become altogether a square, I thought, -and said, "Wonderful book, isn't it?" "Yes, indeed," said Len. -"We understood at once where we should go." Reg was quiet. -"Heat and stench are suspended in the shadow of these hard -laboring dragons," I said from memory. "They devour everything -under them -- the ancient Mongolian prayer gate, the bones of a -two-humped beast fallen in some sand storm..." "Yes," said Len, -while Reg went on chewing his blade of grass. "Every time," I -continued (now from Ichin-dagli), "that the sun arrives at a -mathematically precise required position, a strange mirage -blossoms out in the East -- of a strange city with white towers -which no one has yet seen in reality. " "One should see that -with his own eyes," said Len, and laughed. "Friend Len," I -said, "it's too fascinating and therefore too simple. You will -see that it's too simple yourself and it will become an -unpleasant disappointment." No, I hadn't said it right. "Friend -Len," I said, "what sort of a mirage is that? Here is one. -Seven years ago, in your mother's house, I saw a truly -marvelous mirage: both of you standing before me almost grown -up..." No -- I was saying that for myself, not for them. It -should be said differently. "Friend Len," I said, "seven years -ago you explained to me that your people were accursed. We came -here and removed the curse from you and Reg and from many other -children who had no parents. And now it's your turn to remove, -the curse, which..." - It will be very difficult, but I'll explain it to them. -One way or another, I'll get it across. We have known from -childhood how to remove the curses on the barricades and on -construction sites and in laboratories, and you will remove the -last of the curses, you will be the future teachers and -educators. In the last war -- the most bloodless and the most -difficult for its soldiers. - Upstairs Vousi screeched and Len started to cry piteously. -Oscar's voice boomed in the study. How well off he is, I -thought. Simple: slug is bad, harmful, unnatural. Therefore, it -must be destroyed, forbidden by law, and then you must watch -closely that the law is strictly enforced. Only Matia is -smarter than that, because he is older and more experienced. -Matia can still be pulled over to my side. My word doesn't mean -anything to him, but others will be found to whom he will -listen.... How wonderful that I can now cry out to the whole -world and be heard by millions of like-thinkers! - And then I thought that I would not leave this place. I -had been here only three days. It could not be that there was -no one here who would be with us. No one who hated all this -with a deadly hatred, who wanted to blast this dull sated world -out of its stasis. Such people always existed and always will. -Perhaps that bibliophile driver or that tall, harsh one of the -Intels... and who knew how many more. They stumbled about as -though they were blind. We would do everything in our power to -help them so that they would not waste their anger on trifles. -It was our place to be here now. And my place, too. - What a labor lies ahead, I thought, what a task! For the -time being, I didn't know where to begin in this Country of the -Boob, caught unprepared in a flood of affluence, but I knew -that I wouldn't leave here as long as the immigration laws -permitted. And when they stopped permitting it, I would break -them.... diff --git a/tests/hashing/city.cpp b/tests/hashing/city.cpp deleted file mode 100644 index 69ba0e6a..00000000 --- a/tests/hashing/city.cpp +++ /dev/null @@ -1,630 +0,0 @@ -// Copyright (c) 2011 Google, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// CityHash, by Geoff Pike and Jyrki Alakuijala -// -// This file provides CityHash64() and related functions. -// -// It's probably possible to create even faster hash functions by -// writing a program that systematically explores some of the space of -// possible hash functions, by using SIMD instructions, or by -// compromising on hash quality. - -//#include "config.h" -#include "city.h" -#if CDS_BUILD_BITS == 64 - -#include -#include // for memcpy and memset - -using namespace std; - -static uint64 UNALIGNED_LOAD64(const char *p) { - uint64 result; - memcpy(&result, p, sizeof(result)); - return result; -} - -static uint32 UNALIGNED_LOAD32(const char *p) { - uint32 result; - memcpy(&result, p, sizeof(result)); - return result; -} - -#ifdef _MSC_VER - -#include -#define bswap_32(x) _byteswap_ulong(x) -#define bswap_64(x) _byteswap_uint64(x) - -#elif defined(__APPLE__) - -// Mac OS X / Darwin features -#include -#define bswap_32(x) OSSwapInt32(x) -#define bswap_64(x) OSSwapInt64(x) - -#elif defined(__NetBSD__) - -#include -#include -#if defined(__BSWAP_RENAME) && !defined(__bswap_32) -#define bswap_32(x) bswap32(x) -#define bswap_64(x) bswap64(x) -#endif - -#else - -#include - -#endif - -#ifdef WORDS_BIGENDIAN -#define uint32_in_expected_order(x) (bswap_32(x)) -#define uint64_in_expected_order(x) (bswap_64(x)) -#else -#define uint32_in_expected_order(x) (x) -#define uint64_in_expected_order(x) (x) -#endif - -#if !defined(LIKELY) -#if HAVE_BUILTIN_EXPECT -#define LIKELY(x) (__builtin_expect(!!(x), 1)) -#else -#define LIKELY(x) (x) -#endif -#endif - -static uint64 Fetch64(const char *p) { - return uint64_in_expected_order(UNALIGNED_LOAD64(p)); -} - -static uint32 Fetch32(const char *p) { - return uint32_in_expected_order(UNALIGNED_LOAD32(p)); -} - -// Some primes between 2^63 and 2^64 for various uses. -static const uint64 k0 = 0xc3a5c85c97cb3127ULL; -static const uint64 k1 = 0xb492b66fbe98f273ULL; -static const uint64 k2 = 0x9ae16a3b2f90404fULL; - -// Magic numbers for 32-bit hashing. Copied from Murmur3. -static const uint32_t c1 = 0xcc9e2d51; -static const uint32_t c2 = 0x1b873593; - -// A 32-bit to 32-bit integer hash copied from Murmur3. -static uint32 fmix(uint32 h) -{ - h ^= h >> 16; - h *= 0x85ebca6b; - h ^= h >> 13; - h *= 0xc2b2ae35; - h ^= h >> 16; - return h; -} - -static uint32 Rotate32(uint32 val, int shift) { - // Avoid shifting by 32: doing so yields an undefined result. - return shift == 0 ? val : ((val >> shift) | (val << (32 - shift))); -} - -#undef PERMUTE3 -#define PERMUTE3(a, b, c) do { std::swap(a, b); std::swap(a, c); } while (0) - -static uint32 Mur(uint32 a, uint32 h) { - // Helper from Murmur3 for combining two 32-bit values. - a *= c1; - a = Rotate32(a, 17); - a *= c2; - h ^= a; - h = Rotate32(h, 19); - return h * 5 + 0xe6546b64; -} - -static uint32 Hash32Len13to24(const char *s, size_t len) { - uint32 a = Fetch32(s - 4 + (len >> 1)); - uint32 b = Fetch32(s + 4); - uint32 c = Fetch32(s + len - 8); - uint32 d = Fetch32(s + (len >> 1)); - uint32 e = Fetch32(s); - uint32 f = Fetch32(s + len - 4); - uint32 h = len; - - return fmix(Mur(f, Mur(e, Mur(d, Mur(c, Mur(b, Mur(a, h))))))); -} - -static uint32 Hash32Len0to4(const char *s, size_t len) { - uint32 b = 0; - uint32 c = 9; - for (int i = 0; i < len; i++) { - signed char v = s[i]; - b = b * c1 + v; - c ^= b; - } - return fmix(Mur(b, Mur(len, c))); -} - -static uint32 Hash32Len5to12(const char *s, size_t len) { - uint32 a = len, b = len * 5, c = 9, d = b; - a += Fetch32(s); - b += Fetch32(s + len - 4); - c += Fetch32(s + ((len >> 1) & 4)); - return fmix(Mur(c, Mur(b, Mur(a, d)))); -} - -uint32 CityHash32(const char *s, size_t len) { - if (len <= 24) { - return len <= 12 ? - (len <= 4 ? Hash32Len0to4(s, len) : Hash32Len5to12(s, len)) : - Hash32Len13to24(s, len); - } - - // len > 24 - uint32 h = len, g = c1 * len, f = g; - uint32 a0 = Rotate32(Fetch32(s + len - 4) * c1, 17) * c2; - uint32 a1 = Rotate32(Fetch32(s + len - 8) * c1, 17) * c2; - uint32 a2 = Rotate32(Fetch32(s + len - 16) * c1, 17) * c2; - uint32 a3 = Rotate32(Fetch32(s + len - 12) * c1, 17) * c2; - uint32 a4 = Rotate32(Fetch32(s + len - 20) * c1, 17) * c2; - h ^= a0; - h = Rotate32(h, 19); - h = h * 5 + 0xe6546b64; - h ^= a2; - h = Rotate32(h, 19); - h = h * 5 + 0xe6546b64; - g ^= a1; - g = Rotate32(g, 19); - g = g * 5 + 0xe6546b64; - g ^= a3; - g = Rotate32(g, 19); - g = g * 5 + 0xe6546b64; - f += a4; - f = Rotate32(f, 19); - f = f * 5 + 0xe6546b64; - size_t iters = (len - 1) / 20; - do { - uint32 a0 = Rotate32(Fetch32(s) * c1, 17) * c2; - uint32 a1 = Fetch32(s + 4); - uint32 a2 = Rotate32(Fetch32(s + 8) * c1, 17) * c2; - uint32 a3 = Rotate32(Fetch32(s + 12) * c1, 17) * c2; - uint32 a4 = Fetch32(s + 16); - h ^= a0; - h = Rotate32(h, 18); - h = h * 5 + 0xe6546b64; - f += a1; - f = Rotate32(f, 19); - f = f * c1; - g += a2; - g = Rotate32(g, 18); - g = g * 5 + 0xe6546b64; - h ^= a3 + a1; - h = Rotate32(h, 19); - h = h * 5 + 0xe6546b64; - g ^= a4; - g = bswap_32(g) * 5; - h += a4 * 5; - h = bswap_32(h); - f += a0; - PERMUTE3(f, h, g); - s += 20; - } while (--iters != 0); - g = Rotate32(g, 11) * c1; - g = Rotate32(g, 17) * c1; - f = Rotate32(f, 11) * c1; - f = Rotate32(f, 17) * c1; - h = Rotate32(h + g, 19); - h = h * 5 + 0xe6546b64; - h = Rotate32(h, 17) * c1; - h = Rotate32(h + f, 19); - h = h * 5 + 0xe6546b64; - h = Rotate32(h, 17) * c1; - return h; -} - -// Bitwise right rotate. Normally this will compile to a single -// instruction, especially if the shift is a manifest constant. -static uint64 Rotate(uint64 val, int shift) { - // Avoid shifting by 64: doing so yields an undefined result. - return shift == 0 ? val : ((val >> shift) | (val << (64 - shift))); -} - -static uint64 ShiftMix(uint64 val) { - return val ^ (val >> 47); -} - -static uint64 HashLen16(uint64 u, uint64 v) { - return Hash128to64(uint128(u, v)); -} - -static uint64 HashLen16(uint64 u, uint64 v, uint64 mul) { - // Murmur-inspired hashing. - uint64 a = (u ^ v) * mul; - a ^= (a >> 47); - uint64 b = (v ^ a) * mul; - b ^= (b >> 47); - b *= mul; - return b; -} - -static uint64 HashLen0to16(const char *s, size_t len) { - if (len >= 8) { - uint64 mul = k2 + len * 2; - uint64 a = Fetch64(s) + k2; - uint64 b = Fetch64(s + len - 8); - uint64 c = Rotate(b, 37) * mul + a; - uint64 d = (Rotate(a, 25) + b) * mul; - return HashLen16(c, d, mul); - } - if (len >= 4) { - uint64 mul = k2 + len * 2; - uint64 a = Fetch32(s); - return HashLen16(len + (a << 3), Fetch32(s + len - 4), mul); - } - if (len > 0) { - uint8 a = s[0]; - uint8 b = s[len >> 1]; - uint8 c = s[len - 1]; - uint32 y = static_cast(a) + (static_cast(b) << 8); - uint32 z = len + (static_cast(c) << 2); - return ShiftMix(y * k2 ^ z * k0) * k2; - } - return k2; -} - -// This probably works well for 16-byte strings as well, but it may be overkill -// in that case. -static uint64 HashLen17to32(const char *s, size_t len) { - uint64 mul = k2 + len * 2; - uint64 a = Fetch64(s) * k1; - uint64 b = Fetch64(s + 8); - uint64 c = Fetch64(s + len - 8) * mul; - uint64 d = Fetch64(s + len - 16) * k2; - return HashLen16(Rotate(a + b, 43) + Rotate(c, 30) + d, - a + Rotate(b + k2, 18) + c, mul); -} - -// Return a 16-byte hash for 48 bytes. Quick and dirty. -// Callers do best to use "random-looking" values for a and b. -static pair WeakHashLen32WithSeeds( - uint64 w, uint64 x, uint64 y, uint64 z, uint64 a, uint64 b) { - a += w; - b = Rotate(b + a + z, 21); - uint64 c = a; - a += x; - a += y; - b += Rotate(a, 44); - return make_pair(a + z, b + c); -} - -// Return a 16-byte hash for s[0] ... s[31], a, and b. Quick and dirty. -static pair WeakHashLen32WithSeeds( - const char* s, uint64 a, uint64 b) { - return WeakHashLen32WithSeeds(Fetch64(s), - Fetch64(s + 8), - Fetch64(s + 16), - Fetch64(s + 24), - a, - b); -} - -// Return an 8-byte hash for 33 to 64 bytes. -static uint64 HashLen33to64(const char *s, size_t len) { - uint64 mul = k2 + len * 2; - uint64 a = Fetch64(s) * k2; - uint64 b = Fetch64(s + 8); - uint64 c = Fetch64(s + len - 24); - uint64 d = Fetch64(s + len - 32); - uint64 e = Fetch64(s + 16) * k2; - uint64 f = Fetch64(s + 24) * 9; - uint64 g = Fetch64(s + len - 8); - uint64 h = Fetch64(s + len - 16) * mul; - uint64 u = Rotate(a + g, 43) + (Rotate(b, 30) + c) * 9; - uint64 v = ((a + g) ^ d) + f + 1; - uint64 w = bswap_64((u + v) * mul) + h; - uint64 x = Rotate(e + f, 42) + c; - uint64 y = (bswap_64((v + w) * mul) + g) * mul; - uint64 z = e + f + c; - a = bswap_64((x + z) * mul + y) + b; - b = ShiftMix((z + a) * mul + d + h) * mul; - return b + x; -} - -uint64 CityHash64(const char *s, size_t len) { - if (len <= 32) { - if (len <= 16) { - return HashLen0to16(s, len); - } else { - return HashLen17to32(s, len); - } - } else if (len <= 64) { - return HashLen33to64(s, len); - } - - // For strings over 64 bytes we hash the end first, and then as we - // loop we keep 56 bytes of state: v, w, x, y, and z. - uint64 x = Fetch64(s + len - 40); - uint64 y = Fetch64(s + len - 16) + Fetch64(s + len - 56); - uint64 z = HashLen16(Fetch64(s + len - 48) + len, Fetch64(s + len - 24)); - pair v = WeakHashLen32WithSeeds(s + len - 64, len, z); - pair w = WeakHashLen32WithSeeds(s + len - 32, y + k1, x); - x = x * k1 + Fetch64(s); - - // Decrease len to the nearest multiple of 64, and operate on 64-byte chunks. - len = (len - 1) & ~static_cast(63); - do { - x = Rotate(x + y + v.first + Fetch64(s + 8), 37) * k1; - y = Rotate(y + v.second + Fetch64(s + 48), 42) * k1; - x ^= w.second; - y += v.first + Fetch64(s + 40); - z = Rotate(z + w.first, 33) * k1; - v = WeakHashLen32WithSeeds(s, v.second * k1, x + w.first); - w = WeakHashLen32WithSeeds(s + 32, z + w.second, y + Fetch64(s + 16)); - std::swap(z, x); - s += 64; - len -= 64; - } while (len != 0); - return HashLen16(HashLen16(v.first, w.first) + ShiftMix(y) * k1 + z, - HashLen16(v.second, w.second) + x); -} - -uint64 CityHash64WithSeed(const char *s, size_t len, uint64 seed) { - return CityHash64WithSeeds(s, len, k2, seed); -} - -uint64 CityHash64WithSeeds(const char *s, size_t len, - uint64 seed0, uint64 seed1) { - return HashLen16(CityHash64(s, len) - seed0, seed1); -} - -// A subroutine for CityHash128(). Returns a decent 128-bit hash for strings -// of any length representable in signed long. Based on City and Murmur. -static uint128 CityMurmur(const char *s, size_t len, uint128 seed) { - uint64 a = Uint128Low64(seed); - uint64 b = Uint128High64(seed); - uint64 c = 0; - uint64 d = 0; - signed long l = len - 16; - if (l <= 0) { // len <= 16 - a = ShiftMix(a * k1) * k1; - c = b * k1 + HashLen0to16(s, len); - d = ShiftMix(a + (len >= 8 ? Fetch64(s) : c)); - } else { // len > 16 - c = HashLen16(Fetch64(s + len - 8) + k1, a); - d = HashLen16(b + len, c + Fetch64(s + len - 16)); - a += d; - do { - a ^= ShiftMix(Fetch64(s) * k1) * k1; - a *= k1; - b ^= a; - c ^= ShiftMix(Fetch64(s + 8) * k1) * k1; - c *= k1; - d ^= c; - s += 16; - l -= 16; - } while (l > 0); - } - a = HashLen16(a, c); - b = HashLen16(d, b); - return uint128(a ^ b, HashLen16(b, a)); -} - -uint128 CityHash128WithSeed(const char *s, size_t len, uint128 seed) { - if (len < 128) { - return CityMurmur(s, len, seed); - } - - // We expect len >= 128 to be the common case. Keep 56 bytes of state: - // v, w, x, y, and z. - pair v, w; - uint64 x = Uint128Low64(seed); - uint64 y = Uint128High64(seed); - uint64 z = len * k1; - v.first = Rotate(y ^ k1, 49) * k1 + Fetch64(s); - v.second = Rotate(v.first, 42) * k1 + Fetch64(s + 8); - w.first = Rotate(y + z, 35) * k1 + x; - w.second = Rotate(x + Fetch64(s + 88), 53) * k1; - - // This is the same inner loop as CityHash64(), manually unrolled. - do { - x = Rotate(x + y + v.first + Fetch64(s + 8), 37) * k1; - y = Rotate(y + v.second + Fetch64(s + 48), 42) * k1; - x ^= w.second; - y += v.first + Fetch64(s + 40); - z = Rotate(z + w.first, 33) * k1; - v = WeakHashLen32WithSeeds(s, v.second * k1, x + w.first); - w = WeakHashLen32WithSeeds(s + 32, z + w.second, y + Fetch64(s + 16)); - std::swap(z, x); - s += 64; - x = Rotate(x + y + v.first + Fetch64(s + 8), 37) * k1; - y = Rotate(y + v.second + Fetch64(s + 48), 42) * k1; - x ^= w.second; - y += v.first + Fetch64(s + 40); - z = Rotate(z + w.first, 33) * k1; - v = WeakHashLen32WithSeeds(s, v.second * k1, x + w.first); - w = WeakHashLen32WithSeeds(s + 32, z + w.second, y + Fetch64(s + 16)); - std::swap(z, x); - s += 64; - len -= 128; - } while (LIKELY(len >= 128)); - x += Rotate(v.first + z, 49) * k0; - y = y * k0 + Rotate(w.second, 37); - z = z * k0 + Rotate(w.first, 27); - w.first *= 9; - v.first *= k0; - // If 0 < len < 128, hash up to 4 chunks of 32 bytes each from the end of s. - for (size_t tail_done = 0; tail_done < len; ) { - tail_done += 32; - y = Rotate(x + y, 42) * k0 + v.second; - w.first += Fetch64(s + len - tail_done + 16); - x = x * k0 + w.first; - z += w.second + Fetch64(s + len - tail_done); - w.second += v.first; - v = WeakHashLen32WithSeeds(s + len - tail_done, v.first + z, v.second); - v.first *= k0; - } - // At this point our 56 bytes of state should contain more than - // enough information for a strong 128-bit hash. We use two - // different 56-byte-to-8-byte hashes to get a 16-byte final result. - x = HashLen16(x, v.first); - y = HashLen16(y + z, w.first); - return uint128(HashLen16(x + v.second, w.second) + y, - HashLen16(x + w.second, y + v.second)); -} - -uint128 CityHash128(const char *s, size_t len) { - return len >= 16 ? - CityHash128WithSeed(s + 16, len - 16, - uint128(Fetch64(s), Fetch64(s + 8) + k0)) : - CityHash128WithSeed(s, len, uint128(k0, k1)); -} - -#ifdef __SSE4_2__ -#include "citycrc.h" -#include - -// Requires len >= 240. -static void CityHashCrc256Long(const char *s, size_t len, - uint32 seed, uint64 *result) { - uint64 a = Fetch64(s + 56) + k0; - uint64 b = Fetch64(s + 96) + k0; - uint64 c = result[0] = HashLen16(b, len); - uint64 d = result[1] = Fetch64(s + 120) * k0 + len; - uint64 e = Fetch64(s + 184) + seed; - uint64 f = 0; - uint64 g = 0; - uint64 h = c + d; - uint64 x = seed; - uint64 y = 0; - uint64 z = 0; - - // 240 bytes of input per iter. - size_t iters = len / 240; - len -= iters * 240; - do { -#undef CHUNK -#define CHUNK(r) \ - PERMUTE3(x, z, y); \ - b += Fetch64(s); \ - c += Fetch64(s + 8); \ - d += Fetch64(s + 16); \ - e += Fetch64(s + 24); \ - f += Fetch64(s + 32); \ - a += b; \ - h += f; \ - b += c; \ - f += d; \ - g += e; \ - e += z; \ - g += x; \ - z = _mm_crc32_u64(z, b + g); \ - y = _mm_crc32_u64(y, e + h); \ - x = _mm_crc32_u64(x, f + a); \ - e = Rotate(e, r); \ - c += e; \ - s += 40 - - CHUNK(0); PERMUTE3(a, h, c); - CHUNK(33); PERMUTE3(a, h, f); - CHUNK(0); PERMUTE3(b, h, f); - CHUNK(42); PERMUTE3(b, h, d); - CHUNK(0); PERMUTE3(b, h, e); - CHUNK(33); PERMUTE3(a, h, e); - } while (--iters > 0); - - while (len >= 40) { - CHUNK(29); - e ^= Rotate(a, 20); - h += Rotate(b, 30); - g ^= Rotate(c, 40); - f += Rotate(d, 34); - PERMUTE3(c, h, g); - len -= 40; - } - if (len > 0) { - s = s + len - 40; - CHUNK(33); - e ^= Rotate(a, 43); - h += Rotate(b, 42); - g ^= Rotate(c, 41); - f += Rotate(d, 40); - } - result[0] ^= h; - result[1] ^= g; - g += h; - a = HashLen16(a, g + z); - x += y << 32; - b += x; - c = HashLen16(c, z) + h; - d = HashLen16(d, e + result[0]); - g += e; - h += HashLen16(x, f); - e = HashLen16(a, d) + g; - z = HashLen16(b, c) + a; - y = HashLen16(g, h) + c; - result[0] = e + z + y + x; - a = ShiftMix((a + y) * k0) * k0 + b; - result[1] += a + result[0]; - a = ShiftMix(a * k0) * k0 + c; - result[2] = a + result[1]; - a = ShiftMix((a + e) * k0) * k0; - result[3] = a + result[2]; -} - -// Requires len < 240. -static void CityHashCrc256Short(const char *s, size_t len, uint64 *result) { - char buf[240]; - memcpy(buf, s, len); - memset(buf + len, 0, 240 - len); - CityHashCrc256Long(buf, 240, ~static_cast(len), result); -} - -void CityHashCrc256(const char *s, size_t len, uint64 *result) { - if (LIKELY(len >= 240)) { - CityHashCrc256Long(s, len, 0, result); - } else { - CityHashCrc256Short(s, len, result); - } -} - -uint128 CityHashCrc128WithSeed(const char *s, size_t len, uint128 seed) { - if (len <= 900) { - return CityHash128WithSeed(s, len, seed); - } else { - uint64 result[4]; - CityHashCrc256(s, len, result); - uint64 u = Uint128High64(seed) + result[0]; - uint64 v = Uint128Low64(seed) + result[1]; - return uint128(HashLen16(u, v + result[2]), - HashLen16(Rotate(v, 32), u * k0 + result[3])); - } -} - -uint128 CityHashCrc128(const char *s, size_t len) { - if (len <= 900) { - return CityHash128(s, len); - } else { - uint64 result[4]; - CityHashCrc256(s, len, result); - return uint128(result[2], result[3]); - } -} - -#endif -#endif // #if CDS_BUILD_BITS == 64 diff --git a/tests/hashing/city.h b/tests/hashing/city.h deleted file mode 100644 index 5987470e..00000000 --- a/tests/hashing/city.h +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2011 Google, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// CityHash, by Geoff Pike and Jyrki Alakuijala -// -// http://code.google.com/p/cityhash/ -// -// This file provides a few functions for hashing strings. All of them are -// high-quality functions in the sense that they pass standard tests such -// as Austin Appleby's SMHasher. They are also fast. -// -// For 64-bit x86 code, on short strings, we don't know of anything faster than -// CityHash64 that is of comparable quality. We believe our nearest competitor -// is Murmur3. For 64-bit x86 code, CityHash64 is an excellent choice for hash -// tables and most other hashing (excluding cryptography). -// -// For 64-bit x86 code, on long strings, the picture is more complicated. -// On many recent Intel CPUs, such as Nehalem, Westmere, Sandy Bridge, etc., -// CityHashCrc128 appears to be faster than all competitors of comparable -// quality. CityHash128 is also good but not quite as fast. We believe our -// nearest competitor is Bob Jenkins' Spooky. We don't have great data for -// other 64-bit CPUs, but for long strings we know that Spooky is slightly -// faster than CityHash on some relatively recent AMD x86-64 CPUs, for example. -// Note that CityHashCrc128 is declared in citycrc.h. -// -// For 32-bit x86 code, we don't know of anything faster than CityHash32 that -// is of comparable quality. We believe our nearest competitor is Murmur3A. -// (On 64-bit CPUs, it is typically faster to use the other CityHash variants.) -// -// Functions in the CityHash family are not suitable for cryptography. -// -// Please see CityHash's README file for more details on our performance -// measurements and so on. -// -// WARNING: This code has been only lightly tested on big-endian platforms! -// It is known to work well on little-endian platforms that have a small penalty -// for unaligned reads, such as current Intel and AMD moderate-to-high-end CPUs. -// It should work on all 32-bit and 64-bit platforms that allow unaligned reads; -// bug reports are welcome. -// -// By the way, for some hash functions, given strings a and b, the hash -// of a+b is easily derived from the hashes of a and b. This property -// doesn't hold for any hash functions in this file. - -#ifndef CITY_HASH_H_ -#define CITY_HASH_H_ - -#include -#if CDS_BUILD_BITS == 64 - -#include // for size_t. -#include -#include - -typedef uint8_t uint8; -typedef uint32_t uint32; -typedef uint64_t uint64; -typedef std::pair uint128; - -inline uint64 Uint128Low64(const uint128& x) { return x.first; } -inline uint64 Uint128High64(const uint128& x) { return x.second; } - -// Hash function for a byte array. -uint64 CityHash64(const char *buf, size_t len); - -// Hash function for a byte array. For convenience, a 64-bit seed is also -// hashed into the result. -uint64 CityHash64WithSeed(const char *buf, size_t len, uint64 seed); - -// Hash function for a byte array. For convenience, two seeds are also -// hashed into the result. -uint64 CityHash64WithSeeds(const char *buf, size_t len, - uint64 seed0, uint64 seed1); - -// Hash function for a byte array. -uint128 CityHash128(const char *s, size_t len); - -// Hash function for a byte array. For convenience, a 128-bit seed is also -// hashed into the result. -uint128 CityHash128WithSeed(const char *s, size_t len, uint128 seed); - -// Hash function for a byte array. Most useful in 32-bit binaries. -uint32 CityHash32(const char *buf, size_t len); - -// Hash 128 input bits down to 64 bits of output. -// This is intended to be a reasonably good hash function. -inline uint64 Hash128to64(const uint128& x) { - // Murmur-inspired hashing. - const uint64 kMul = 0x9ddfea08eb382d69ULL; - uint64 a = (Uint128Low64(x) ^ Uint128High64(x)) * kMul; - a ^= (a >> 47); - uint64 b = (Uint128High64(x) ^ a) * kMul; - b ^= (b >> 47); - b *= kMul; - return b; -} - -#endif // #if CDS_BUILD_BITS == 64 -#endif // CITY_HASH_H_ diff --git a/tests/hashing/citycrc.h b/tests/hashing/citycrc.h deleted file mode 100644 index 054d188a..00000000 --- a/tests/hashing/citycrc.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2011 Google, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// CityHash, by Geoff Pike and Jyrki Alakuijala -// -// This file declares the subset of the CityHash functions that require -// _mm_crc32_u64(). See the CityHash README for details. -// -// Functions in the CityHash family are not suitable for cryptography. - -#ifndef CITY_HASH_CRC_H_ -#define CITY_HASH_CRC_H_ - -#include "city.h" - -// Hash function for a byte array. -uint128 CityHashCrc128(const char *s, size_t len); - -// Hash function for a byte array. For convenience, a 128-bit seed is also -// hashed into the result. -uint128 CityHashCrc128WithSeed(const char *s, size_t len, uint128 seed); - -// Hash function for a byte array. Sets result[0] ... result[3]. -void CityHashCrc256(const char *s, size_t len, uint64 *result); - -#endif // CITY_HASH_CRC_H_ diff --git a/tests/hashing/hash_func.h b/tests/hashing/hash_func.h deleted file mode 100644 index abbc7802..00000000 --- a/tests/hashing/hash_func.h +++ /dev/null @@ -1,108 +0,0 @@ -//$$CDS-header$$ - -#ifndef CDSUNIT_HASH_FUNC_H -#define CDSUNIT_HASH_FUNC_H - -#include - -#if CDS_BUILD_BITS == 64 -# include "hashing/city.h" -#endif - -namespace hashing { - -#if CDS_BUILD_BITS == 64 - class city32 { - public: - typedef uint32_t hash_type; - - hash_type operator()( void const * pBuf, size_t len ) - { - return CityHash32( reinterpret_cast( pBuf ), len ); - } - - hash_type operator()( std::string const& s ) - { - return CityHash32( s.c_str(), s.length() ); - } - - template - hash_type operator()( T const& s ) - { - return CityHash32( reinterpret_cast( &s ), sizeof(s)); - } - - struct less - { - bool operator()( hash_type lhs, hash_type rhs ) const - { - return lhs < rhs; - } - }; - }; - - class city64 { - public: - typedef uint64_t hash_type; - - hash_type operator()( void const * pBuf, size_t len ) - { - return CityHash64( reinterpret_cast( pBuf ), len ); - } - - hash_type operator()( std::string const& s ) - { - return CityHash64( s.c_str(), s.length() ); - } - - template - hash_type operator()( T const& s ) - { - return CityHash64( reinterpret_cast( &s ), sizeof(s)); - } - - struct less - { - bool operator()( hash_type lhs, hash_type rhs ) const - { - return lhs < rhs; - } - }; - }; - - class city128 { - public: - typedef uint128 hash_type; - - hash_type operator()( void const * pBuf, size_t len ) - { - return CityHash128( reinterpret_cast( pBuf ), len ); - } - - hash_type operator()( std::string const& s ) - { - return CityHash128( s.c_str(), s.length() ); - } - - template - hash_type operator()( T const& s ) - { - return CityHash128( reinterpret_cast( &s ), sizeof(s)); - } - - struct less - { - bool operator()( hash_type const& lhs, hash_type const& rhs ) const - { - if ( lhs.first != rhs.first ) - return lhs.second < rhs.second; - return lhs.first < rhs.first; - } - }; - }; -#endif // #if CDS_BUILD_BITS == 64 - - -} // namespace hashing - -#endif // #ifndef CDSUNIT_HASH_FUNC_H diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt deleted file mode 100644 index 81fe9e1d..00000000 --- a/tests/unit/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -set(PACKAGE_NAME cdsu-misc) - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - -set(CDSUNIT_MISC_SOURCES - alloc/hoard_threadtest.cpp - alloc/larson.cpp - alloc/linux_scale.cpp - alloc/michael_allocator.cpp - alloc/random.cpp - lock/spinlock.cpp) - -add_executable(${PACKAGE_NAME} ${CDSUNIT_MAP_SOURCES} $) -target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) -add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/map2) diff --git a/tests/unit/_template.cpp b/tests/unit/_template.cpp deleted file mode 100644 index 538c0354..00000000 --- a/tests/unit/_template.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include -#include - -#include "cppunit/cppunit_proxy.h" - -#if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) -using namespace std; -#endif - -// -// TestCase class -// -class Test : public CPPUNIT_NS::TestCase -{ - CPPUNIT_TEST_SUITE(Test); - CPPUNIT_TEST(test); - CPPUNIT_TEST_SUITE_END(); - -protected: - void test(); -}; - -CPPUNIT_TEST_SUITE_REGISTRATION(Test); - -// -// tests implementation -// -void Test::test() -{ - CPPUNIT_ASSERT(true); -} diff --git a/tests/unit/alloc/hoard_threadtest.cpp b/tests/unit/alloc/hoard_threadtest.cpp deleted file mode 100644 index 7b87bb49..00000000 --- a/tests/unit/alloc/hoard_threadtest.cpp +++ /dev/null @@ -1,206 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Hoard threadtest allocator test - -#include "alloc/michael_allocator.h" - -#include -#include - -#include "cppunit/thread.h" - -namespace memory { - - static size_t s_nPassCount = 1000; - static size_t s_nBlockCount = 10000; - static size_t s_nMinBlockSize = 16; - static size_t s_nMaxBlockSize = 1024; - static size_t s_nMaxThreadCount = 32; - - static size_t s_nPassPerThread; - - static size_t s_nCurBlockSize; - -# define TEST_ALLOC(X, CLASS) void X() { test< CLASS >( false ) ; } -# define TEST_ALLOC_STAT(X, CLASS) void X() { test< CLASS >( true ) ; } - - /* - In Threadtest, each thread performs s_nPassCount iterations of allocating s_nBlockCount - s_nCurBlockSize-byte blocks and then freeing them in order. The benchmarks capture - allocator latency and scalability under regular private allocation patterns. - */ - class Hoard_ThreadTest: public CppUnitMini::TestCase - { - template - class Thread: public CppUnitMini::TestThread - { - ALLOC& m_Alloc; - typedef typename ALLOC::value_type value_type; - value_type ** m_arr; - - virtual Thread * clone() - { - return new Thread( *this ); - } - public: - - public: - Thread( CppUnitMini::ThreadPool& pool, ALLOC& a ) - : CppUnitMini::TestThread( pool ) - , m_Alloc( a ) - {} - Thread( Thread& src ) - : CppUnitMini::TestThread( src ) - , m_Alloc( src.m_Alloc ) - {} - - Hoard_ThreadTest& getTest() - { - return reinterpret_cast( m_Pool.m_Test ); - } - - virtual void init() - { - cds::threading::Manager::attachThread(); - m_arr = new value_type *[s_nBlockCount]; - } - virtual void fini() - { - delete [] m_arr; - cds::threading::Manager::detachThread(); - } - - virtual void test() - { - size_t nSize = s_nCurBlockSize / sizeof(value_type); - for ( size_t nPass = 0; nPass < s_nPassPerThread; ++nPass ) { - value_type ** pCell = m_arr; - for ( size_t i = 0; i < s_nBlockCount; ++i, ++pCell ) { - *pCell = m_Alloc.allocate( nSize, nullptr ); - CPPUNIT_ASSERT( *pCell != nullptr ); - - if ( nSize < 32 ) - memset( *pCell, 0, nSize ); - else { - memset( *pCell, 0, 16 ); - memset( ((char *)(*pCell)) + nSize * sizeof(value_type) - 16, 0, 16 ); - } - - CPPUNIT_ASSERT( (reinterpret_cast(*pCell) & (ALLOC::alignment - 1)) == 0 ); - } - pCell = m_arr; - for ( size_t i = 0; i < s_nBlockCount; ++i, ++pCell ) { - m_Alloc.deallocate( *pCell, 1 ); - } - } - } - }; - - template - void test( size_t nThreadCount ) - { - ALLOC alloc; - cds::OS::Timer timer; - - CPPUNIT_MSG( "Thread count=" << nThreadCount ); - s_nPassPerThread = s_nPassCount / nThreadCount; - - CppUnitMini::ThreadPool pool( *this ); - pool.add( new Thread( pool, alloc ), nThreadCount ); - pool.run(); - CPPUNIT_MSG( " Duration=" << pool.avgDuration() ); - } - - template - void test( bool bStat) - { - s_nCurBlockSize = s_nMinBlockSize; - while ( s_nCurBlockSize <= s_nMaxBlockSize ) { - CPPUNIT_MSG( "Block size=" << s_nCurBlockSize << ", block count=" << s_nBlockCount << ", pass count=" << s_nPassCount << " per thread" ); - for ( size_t nThreadCount = 1; nThreadCount <= s_nMaxThreadCount; nThreadCount *= 2 ) { - summary_stat stBegin; - if ( bStat ) - ALLOC::stat(stBegin); - - test( nThreadCount ); - - summary_stat stEnd; - if ( bStat ) { - ALLOC::stat( stEnd ); - - std::cout << "\nStatistics:\n" - << stEnd; - stEnd -= stBegin; - std::cout << "\nDelta statistics:\n" - << stEnd; - } - } - s_nCurBlockSize *= 2; - } - } - - void setUpParams( const CppUnitMini::TestCfg& cfg ) - { - s_nPassCount = cfg.getULong( "PassCount", 1000 ); - s_nBlockCount = cfg.getULong( "BlockCount", 10000 ); - s_nMinBlockSize = cfg.getULong( "MinBlockSize", 16 ); - s_nMaxBlockSize = cfg.getULong( "MaxBlockSize", 1024 ); - s_nMaxThreadCount = cfg.getUInt( "MaxThreadCount", 32 ); - if ( s_nMaxThreadCount == 0 ) - s_nMaxThreadCount = cds::OS::topology::processor_count() * 2; - } - - typedef MichaelAlignHeap_Stat t_MichaelAlignHeap_Stat; - typedef MichaelAlignHeap_NoStat t_MichaelAlignHeap_NoStat; - typedef system_aligned_allocator t_system_aligned_allocator; - - TEST_ALLOC_STAT( michael_heap_stat, MichaelHeap_Stat ) - TEST_ALLOC( michael_heap_nostat, MichaelHeap_NoStat ) - TEST_ALLOC( std_alloc, std_allocator ) - - TEST_ALLOC_STAT( michael_alignheap_stat, t_MichaelAlignHeap_Stat ) - TEST_ALLOC( michael_alignheap_nostat, t_MichaelAlignHeap_NoStat ) - TEST_ALLOC( system_aligned_alloc, t_system_aligned_allocator ) - - CPPUNIT_TEST_SUITE( Hoard_ThreadTest ) - CPPUNIT_TEST( std_alloc ) - CPPUNIT_TEST( michael_heap_stat ) - CPPUNIT_TEST( michael_heap_nostat ) - - CPPUNIT_TEST( system_aligned_alloc ) - CPPUNIT_TEST( michael_alignheap_stat ) - CPPUNIT_TEST( michael_alignheap_nostat ) - - CPPUNIT_TEST_SUITE_END(); - }; - -} // namespace memory -CPPUNIT_TEST_SUITE_REGISTRATION( memory::Hoard_ThreadTest ); diff --git a/tests/unit/alloc/larson.cpp b/tests/unit/alloc/larson.cpp deleted file mode 100644 index cbd142b1..00000000 --- a/tests/unit/alloc/larson.cpp +++ /dev/null @@ -1,228 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Larson allocator test - -#include "alloc/michael_allocator.h" -#include "alloc/random_gen.h" - -#include -#include - -#include "cppunit/thread.h" - -namespace memory { - - static size_t s_nMaxThreadCount = 32; - static unsigned int s_nMinBlockSize = 8; - static unsigned int s_nMaxBlockSize = 1024; - static size_t s_nBlocksPerThread = 1000; - static size_t s_nPassCount = 100000; - - static size_t s_nPassPerThread; - - -# define TEST_ALLOC(X, CLASS) void X() { test< CLASS >(false) ; } -# define TEST_ALLOC_STAT(X, CLASS) void X() { test< CLASS >(true) ; } - - /* - In this test, initially one thread allocates and frees random - sized blocks (s_nMinBlockSize to s_nMaxBlockSize bytes) in random order, then an - equal number of blocks (s_nBlocksPerThread) is handed over to each of the - remaining threads. In the parallel phase, each thread randomly selects a block and - frees it, then allocates a new random-sized block in its place. - The benchmark measures the duration of s_nPassCount free/malloc pairs - during the parallel phase. Larson captures the robustness of malloc’s latency - and scalability under irregular allocation patterns with respect to block-size - and order of deallocation over a long period of time. - */ - class Larson: public CppUnitMini::TestCase - { - typedef char ** thread_data; - - thread_data * m_aThreadData; - - - template - class Thread: public CppUnitMini::TestThread - { - ALLOC& m_Alloc; - typedef typename ALLOC::value_type value_type; - - virtual Thread * clone() - { - return new Thread( *this ); - } - - randomGen m_rndGen; - public: - thread_data m_arr; - - public: - Thread( CppUnitMini::ThreadPool& pool, ALLOC& a ) - : CppUnitMini::TestThread( pool ) - , m_Alloc( a ) - {} - Thread( Thread& src ) - : CppUnitMini::TestThread( src ) - , m_Alloc( src.m_Alloc ) - {} - - Larson& getTest() - { - return reinterpret_cast( m_Pool.m_Test ); - } - - virtual void init() { cds::threading::Manager::attachThread() ; } - virtual void fini() { cds::threading::Manager::detachThread() ; } - - virtual void test() - { - for ( size_t nPass = 0; nPass < s_nPassPerThread; ++nPass ) { - size_t nItem = m_rndGen( size_t(1), s_nBlocksPerThread ) - 1; - m_Alloc.deallocate( reinterpret_cast(m_arr[nItem]), 1 ); - m_arr[nItem] = reinterpret_cast(m_Alloc.allocate( m_rndGen( s_nMinBlockSize, s_nMaxBlockSize ), nullptr )); - CPPUNIT_ASSERT( (reinterpret_cast(m_arr[nItem]) & (ALLOC::alignment - 1)) == 0 ); - } - } - }; - - template - void test( size_t nThreadCount ) - { - ALLOC alloc; - - CPPUNIT_MSG( "Thread count=" << nThreadCount ); - CPPUNIT_MSG("Initialize data..." ); - - randomGen rndGen; - - s_nPassPerThread = s_nPassCount / nThreadCount; - - size_t nThread; - m_aThreadData = new thread_data[ nThreadCount ]; - for ( nThread = 0; nThread < nThreadCount; ++nThread ) { - thread_data thData - = m_aThreadData[nThread] - = new char *[ s_nBlocksPerThread ]; - for ( size_t i = 0; i < s_nBlocksPerThread; ++i ) { - thData[i] = reinterpret_cast(alloc.allocate( rndGen( s_nMinBlockSize, s_nMaxBlockSize ), nullptr )); - CPPUNIT_ASSERT( (reinterpret_cast(thData[i]) & (ALLOC::alignment - 1)) == 0 ); - } - } - CPPUNIT_MSG("Initializatin done" ); - - CppUnitMini::ThreadPool pool( *this ); - pool.add( new Thread( pool, alloc ), nThreadCount ); - nThread = 0; - for ( CppUnitMini::ThreadPool::iterator it = pool.begin(); it != pool.end(); ++it ) - static_cast *>(*it)->m_arr = m_aThreadData[nThread++]; - - cds::OS::Timer timer; - pool.run(); - CPPUNIT_MSG( " Duration=" << pool.avgDuration() ); - - for ( nThread = 0; nThread < nThreadCount; ++nThread ) { - thread_data thData = m_aThreadData[nThread]; - for ( size_t i = 0; i < s_nBlocksPerThread; ++i ) { - alloc.deallocate( reinterpret_cast(thData[i]), 1 ); - } - delete [] thData; - } - delete [] m_aThreadData; - } - - template - void test( bool bStat ) - { - CPPUNIT_MSG( "Block size=" << s_nMinBlockSize << "-" << s_nMaxBlockSize - << ", block count per thread=" << s_nBlocksPerThread << ", pass count=" << s_nPassCount ); - - for ( size_t nThreadCount = 2; nThreadCount <= s_nMaxThreadCount; nThreadCount *= 2 ) { - summary_stat stBegin; - if ( bStat ) - ALLOC::stat(stBegin); - - test( nThreadCount ); - - summary_stat stEnd; - if ( bStat ) { - ALLOC::stat( stEnd ); - - std::cout << "\nStatistics:\n" - << stEnd; - stEnd -= stBegin; - std::cout << "\nDelta statistics:\n" - << stEnd; - } - } - } - - void setUpParams( const CppUnitMini::TestCfg& cfg ) - { - s_nPassCount = cfg.getULong( "PassCount", 100000 ); - s_nMinBlockSize = cfg.getUInt( "MinBlockSize", 8 ); - s_nMaxBlockSize = cfg.getUInt( "MaxBlockSize", 1024 ); - s_nBlocksPerThread = cfg.getUInt( "BlocksPerThread", 10000 ); - s_nMaxThreadCount = cfg.getUInt( "MaxThreadCount", 32 ); - if ( s_nMaxThreadCount == 0 ) - s_nMaxThreadCount = cds::OS::topology::processor_count() * 2; - if ( s_nMaxThreadCount < 2 ) - s_nMaxThreadCount = 2; - if ( s_nPassCount < s_nBlocksPerThread ) - s_nBlocksPerThread = s_nPassCount; - } - - typedef MichaelAlignHeap_Stat t_MichaelAlignHeap_Stat; - typedef MichaelAlignHeap_NoStat t_MichaelAlignHeap_NoStat; - typedef system_aligned_allocator t_system_aligned_allocator; - - TEST_ALLOC_STAT( michael_heap_stat, MichaelHeap_Stat ) - TEST_ALLOC( michael_heap_nostat, MichaelHeap_NoStat ) - TEST_ALLOC( std_alloc, std_allocator ) - - TEST_ALLOC_STAT( michael_alignheap_stat, t_MichaelAlignHeap_Stat ) - TEST_ALLOC( michael_alignheap_nostat, t_MichaelAlignHeap_NoStat ) - TEST_ALLOC( system_aligned_alloc, t_system_aligned_allocator ) - - CPPUNIT_TEST_SUITE( Larson ) - CPPUNIT_TEST( michael_heap_stat ) - CPPUNIT_TEST( michael_heap_nostat ) - CPPUNIT_TEST( std_alloc ) - - CPPUNIT_TEST( system_aligned_alloc ) - CPPUNIT_TEST( michael_alignheap_stat ) - CPPUNIT_TEST( michael_alignheap_nostat ) - - CPPUNIT_TEST_SUITE_END(); - }; - -} // namespace memory -CPPUNIT_TEST_SUITE_REGISTRATION( memory::Larson ); diff --git a/tests/unit/alloc/linux_scale.cpp b/tests/unit/alloc/linux_scale.cpp deleted file mode 100644 index b534a5d3..00000000 --- a/tests/unit/alloc/linux_scale.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Linux scalability allocator test - -#include "alloc/michael_allocator.h" - -#include -#include - -#include "cppunit/thread.h" - -namespace memory { - - static size_t s_nPassCount = 10000000; - static size_t s_nMaxBlockSize = 64 * 1024 - 16; - static size_t s_nMaxThreadCount = 64; - - static size_t s_nPassPerThread; - -# define TEST_ALLOC(X, CLASS) void X() { test< CLASS >(false) ; } -# define TEST_ALLOC_STAT(X, CLASS) void X() { test< CLASS >(true) ; } - - class Linux_Scale: public CppUnitMini::TestCase - { - template - class Thread: public CppUnitMini::TestThread - { - ALLOC& m_Alloc; - size_t m_nSize; - - virtual Thread * clone() - { - return new Thread( *this ); - } - public: - - public: - Thread( CppUnitMini::ThreadPool& pool, ALLOC& a, size_t nSize ) - : CppUnitMini::TestThread( pool ) - , m_Alloc( a ) - , m_nSize( nSize ) - {} - Thread( Thread& src ) - : CppUnitMini::TestThread( src ) - , m_Alloc( src.m_Alloc ) - , m_nSize( src.m_nSize ) - {} - - Linux_Scale& getTest() - { - return reinterpret_cast( m_Pool.m_Test ); - } - - virtual void init() { cds::threading::Manager::attachThread() ; } - virtual void fini() { cds::threading::Manager::detachThread() ; } - - virtual void test() - { - for ( size_t i = 0; i < s_nPassPerThread; ++i ) { - typename ALLOC::value_type * p = m_Alloc.allocate( m_nSize / sizeof( typename ALLOC::value_type ), nullptr ); - CPPUNIT_ASSERT( p != nullptr ); - if ( m_nSize < 32 ) - memset( p, 0, m_nSize ); - else { - memset( p, 0, 16 ); - memset( ((char *)p) + m_nSize * sizeof(*p) - 16, 0, 16 ); - } - CPPUNIT_ASSERT( (reinterpret_cast(p) & (ALLOC::alignment - 1)) == 0 ); - m_Alloc.deallocate( p, 1 ); - } - } - }; - - template - void test( size_t nThreadCount, size_t nSize ) - { - cds::OS::Timer timer; - - ALLOC alloc; - - CPPUNIT_MSG( " Block size=" << nSize ); - s_nPassPerThread = s_nPassCount / nThreadCount; - - CppUnitMini::ThreadPool pool( *this ); - pool.add( new Thread( pool, alloc, nSize ), nThreadCount ); - pool.run(); - CPPUNIT_MSG( " Duration=" << pool.avgDuration() ); - } - - template - void test( size_t nThreadCount ) - { - CPPUNIT_MSG( "Thread count=" << nThreadCount ); - for ( size_t sz = 1; sz < s_nMaxBlockSize; sz *= 2 ) { - test( nThreadCount, sz ); - } - } - - template - void test( bool bStat ) - { - for ( size_t nThreadCount = 1; nThreadCount <= s_nMaxThreadCount; nThreadCount *= 2 ) { - summary_stat stBegin; - if ( bStat ) - ALLOC::stat(stBegin); - - test( nThreadCount ); - - summary_stat stEnd; - if ( bStat ) { - ALLOC::stat( stEnd ); - - std::cout << "\nStatistics:\n" - << stEnd; - stEnd -= stBegin; - std::cout << "\nDelta statistics:\n" - << stEnd; - } - } - } - - void setUpParams( const CppUnitMini::TestCfg& cfg ) - { - s_nPassCount = cfg.getULong( "PassCount", 10000000 ); - s_nMaxBlockSize = cfg.getULong( "MaxBlockSize", 64 * 1024 - 16 ); - s_nMaxThreadCount = cfg.getUInt( "MaxThreadCount", 64 ); - if ( s_nMaxThreadCount == 0 ) - s_nMaxThreadCount = cds::OS::topology::processor_count() * 2; - } - - typedef MichaelAlignHeap_Stat t_MichaelAlignHeap_Stat; - typedef MichaelAlignHeap_NoStat t_MichaelAlignHeap_NoStat; - typedef system_aligned_allocator t_system_aligned_allocator; - - TEST_ALLOC_STAT( michael_heap_stat, MichaelHeap_Stat ) - TEST_ALLOC( michael_heap_nostat, MichaelHeap_NoStat ) - TEST_ALLOC( std_alloc, std_allocator ) - - TEST_ALLOC_STAT( michael_alignheap_stat, t_MichaelAlignHeap_Stat ) - TEST_ALLOC( michael_alignheap_nostat, t_MichaelAlignHeap_NoStat ) - TEST_ALLOC( system_aligned_alloc, t_system_aligned_allocator ) - - CPPUNIT_TEST_SUITE( Linux_Scale ) - CPPUNIT_TEST( michael_heap_nostat ) - CPPUNIT_TEST( michael_heap_stat ) - CPPUNIT_TEST( std_alloc ) - - CPPUNIT_TEST( system_aligned_alloc ) - CPPUNIT_TEST( michael_alignheap_stat ) - CPPUNIT_TEST( michael_alignheap_nostat ) - CPPUNIT_TEST_SUITE_END(); - }; - -} // namespace memory -CPPUNIT_TEST_SUITE_REGISTRATION( memory::Linux_Scale ); diff --git a/tests/unit/alloc/michael_allocator.cpp b/tests/unit/alloc/michael_allocator.cpp deleted file mode 100644 index 2ea04f29..00000000 --- a/tests/unit/alloc/michael_allocator.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "alloc/michael_allocator.h" - -namespace memory { - t_MichaelHeap_NoStat s_MichaelHeap_NoStat; - t_MichaelHeap_Stat s_MichaelHeap_Stat; -} diff --git a/tests/unit/alloc/michael_allocator.h b/tests/unit/alloc/michael_allocator.h deleted file mode 100644 index fe5dcb7a..00000000 --- a/tests/unit/alloc/michael_allocator.h +++ /dev/null @@ -1,225 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include -#include - -namespace memory { - namespace ma = cds::memory::michael; - - typedef ma::Heap< - ma::opt::procheap_stat, - ma::opt::os_allocated_stat, - ma::opt::check_bounds - > t_MichaelHeap_NoStat; - - typedef ma::Heap< - ma::opt::procheap_stat, - ma::opt::os_allocated_stat, - ma::opt::check_bounds - > t_MichaelHeap_Stat; - - typedef ma::summary_stat summary_stat; - - extern t_MichaelHeap_NoStat s_MichaelHeap_NoStat; - extern t_MichaelHeap_Stat s_MichaelHeap_Stat; - - template - class MichaelHeap_NoStat - { - public: - typedef T value_type; - typedef T * pointer; - - enum { - alignment = 1 - }; - - - pointer allocate( size_t nSize, const void * /*pHint*/ ) - { - return reinterpret_cast( s_MichaelHeap_NoStat.alloc( sizeof(T) * nSize ) ); - } - - void deallocate( pointer p, size_t /*nCount*/ ) - { - s_MichaelHeap_NoStat.free( p ); - } - - static void stat(summary_stat& s) - { - s_MichaelHeap_NoStat.summaryStat(s); - } - }; - - template - class std_allocator: public std::allocator - { - public: - enum { - alignment = 1 - }; - - static void stat(summary_stat& /*s*/) - {} - }; - - template - class MichaelHeap_Stat - { - public: - typedef T value_type; - typedef T * pointer; - - enum { - alignment = 1 - }; - - pointer allocate( size_t nSize, const void * /*pHint*/ ) - { - return reinterpret_cast( s_MichaelHeap_Stat.alloc( sizeof(T) * nSize ) ); - } - - void deallocate( pointer p, size_t /*nCount*/ ) - { - s_MichaelHeap_Stat.free( p ); - } - - static void stat(summary_stat& s) - { - s_MichaelHeap_Stat.summaryStat(s); - } - }; - - template - class MichaelAlignHeap_NoStat - { - public: - typedef T value_type; - typedef T * pointer; - - enum { - alignment = ALIGN - }; - - pointer allocate( size_t nSize, const void * /*pHint*/ ) - { - return reinterpret_cast( s_MichaelHeap_NoStat.alloc_aligned( sizeof(T) * nSize, ALIGN ) ); - } - - void deallocate( pointer p, size_t /*nCount*/ ) - { - s_MichaelHeap_NoStat.free_aligned( p ); - } - - static void stat(summary_stat& s) - { - s_MichaelHeap_NoStat.summaryStat(s); - } - }; - - template - class MichaelAlignHeap_Stat { - public: - typedef T value_type; - typedef T * pointer; - - enum { - alignment = ALIGN - }; - - pointer allocate( size_t nSize, const void * /*pHint*/ ) - { - return reinterpret_cast( s_MichaelHeap_Stat.alloc_aligned( sizeof(T) * nSize, ALIGN ) ); - } - - void deallocate( pointer p, size_t /*nCount*/ ) - { - s_MichaelHeap_Stat.free_aligned( p ); - } - - static void stat(summary_stat& s) - { - s_MichaelHeap_Stat.summaryStat(s); - } - }; - - template - class system_aligned_allocator - { - public: - typedef T value_type; - typedef T * pointer; - - enum { - alignment = ALIGN - }; - - pointer allocate( size_t nSize, const void * /*pHint*/ ) - { - return reinterpret_cast( cds::OS::aligned_malloc( sizeof(T) * nSize, ALIGN ) ); - } - - void deallocate( pointer p, size_t /*nCount*/ ) - { - cds::OS::aligned_free( p ); - } - - static void stat(summary_stat& /*s*/) - {} - }; - - static inline std::ostream& operator <<(std::ostream& os, const summary_stat& s) - { - os << "\t alloc from active: " << s.nAllocFromActive << "\n" - << "\t alloc from partial: " << s.nAllocFromPartial << "\n" - << "\t alloc from new: " << s.nAllocFromNew << "\n" - << "\t free call count: " << s.nFreeCount << "\n" - << "\t superblock allocated: " << s.nPageAllocCount << "\n" - << "\t superblock deallocated: " << s.nPageDeallocCount << "\n" - << "\t superblock desc allocated: " << s.nDescAllocCount << "\n" - << "\t superblock full desc: " << s.nDescFull << "\n" - << "\t total allocated bytes: " << s.nBytesAllocated << "\n" - << "\t total deallocated bytes: " << s.nBytesDeallocated << "\n" - << "\tOS-allocated large blocks\n" - << "\t alloc call count: " << s.nSysAllocCount << "\n" - << "\t free call count: " << s.nSysFreeCount << "\n" - << "\t total allocated bytes: " << s.nSysBytesAllocated << "\n" - << "\t total deallocated bytes: " << s.nSysBytesDeallocated << "\n" - << "\tCAS contention indicators\n" - << "\t updating active field of active block: " << s.nActiveDescCASFailureCount << "\n" - << "\t updating anchor field of active block: " << s.nActiveAnchorCASFailureCount << "\n" - << "\tupdating active field of partial block: " << s.nPartialDescCASFailureCount << "\n" - << "\tupdating anchor field of partial block: " << s.nPartialAnchorCASFailureCount - << std::endl; - - return os; - } -} diff --git a/tests/unit/alloc/random.cpp b/tests/unit/alloc/random.cpp deleted file mode 100644 index 9edc05a9..00000000 --- a/tests/unit/alloc/random.cpp +++ /dev/null @@ -1,228 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Random allocator test - -#include "alloc/michael_allocator.h" -#include "alloc/random_gen.h" - -#include -#include - -#include "cppunit/thread.h" - -namespace memory { - - static size_t s_nMaxThreadCount = 32; - static unsigned int s_nMinBlockSize = 8; - static unsigned int s_nMaxBlockSize = 1024; - //static size_t s_nBlocksPerThread = 1000; - static size_t s_nPassCount = 100000; - static size_t s_nDataSize = 1000; - - static size_t s_nPassPerThread; - - struct Item { - cds::sync::spin m_access; - char * m_pszBlock; - - Item() - : m_access( false ) - , m_pszBlock( nullptr ) - {} - - Item& operator =(Item const& i) - { - m_pszBlock = i.m_pszBlock; - return *this; - } - }; - typedef std::vector item_array; - -# define TEST_ALLOC(X, CLASS) void X() { test< CLASS >(false); } -# define TEST_ALLOC_STAT(X, CLASS) void X() { test< CLASS >(true) ; } - - class Random_Alloc: public CppUnitMini::TestCase - { - item_array m_Data; - - template - class Thread: public CppUnitMini::TestThread - { - ALLOC& m_Alloc; - typedef typename ALLOC::value_type value_type; - - randomGen m_rndGen; - - virtual Thread * clone() - { - return new Thread( *this ); - } - - public: - Thread( CppUnitMini::ThreadPool& pool, ALLOC& a ) - : CppUnitMini::TestThread( pool ) - , m_Alloc( a ) - {} - Thread( Thread& src ) - : CppUnitMini::TestThread( src ) - , m_Alloc( src.m_Alloc ) - {} - - Random_Alloc& getTest() - { - return reinterpret_cast( m_Pool.m_Test ); - } - - virtual void init() { cds::threading::Manager::attachThread() ; } - virtual void fini() { cds::threading::Manager::detachThread() ; } - - virtual void test() - { - item_array& arr = getTest().m_Data; - for ( size_t nPass = 0; nPass < s_nPassPerThread; ) { - size_t nIdx = m_rndGen( size_t(0), s_nDataSize - 1 ); - Item & item = arr.at(nIdx); - if ( item.m_access.try_lock() ) { - if ( item.m_pszBlock ) { - m_Alloc.deallocate( item.m_pszBlock, 1 ); - item.m_pszBlock = nullptr; - } - else { - size_t nSize; - item.m_pszBlock = m_Alloc.allocate( nSize = m_rndGen( s_nMinBlockSize, s_nMaxBlockSize ), nullptr ); - - if ( nSize < 32 ) - memset( item.m_pszBlock, 0, nSize ); - else { - memset( item.m_pszBlock, 0, 16 ); - memset( ((char *) item.m_pszBlock) + nSize * sizeof(*item.m_pszBlock) - 16, 0, 16 ); - } - } - item.m_access.unlock(); - - ++nPass; - } - } - } - }; - - template - void test( size_t nThreadCount ) - { - ALLOC alloc; - - CPPUNIT_MSG( "Thread count=" << nThreadCount ); - s_nPassPerThread = s_nPassCount / nThreadCount; - - CppUnitMini::ThreadPool pool( *this ); - pool.add( new Thread( pool, alloc ), nThreadCount ); - - cds::OS::Timer timer; - pool.run(); - CPPUNIT_MSG( " Duration=" << pool.avgDuration() ); - - for ( size_t i = 0; i < m_Data.size(); ++i ) { - if ( m_Data[i].m_pszBlock ) { - alloc.deallocate( m_Data[i].m_pszBlock, 1 ); - m_Data[i].m_pszBlock = nullptr; - } - } - } - - template - void test( bool bStat ) - { - CPPUNIT_MSG( "Block size=" << s_nMinBlockSize << "-" << s_nMaxBlockSize - << ", pass count=" << s_nPassCount << ", data size=" << s_nDataSize ); - - m_Data.resize( s_nDataSize ); - - for ( size_t nThreadCount = 2; nThreadCount <= s_nMaxThreadCount; nThreadCount *= 2 ) { - summary_stat stBegin; - if ( bStat ) - ALLOC::stat( stBegin ); - - test( nThreadCount ); - - summary_stat stEnd; - if ( bStat ) { - ALLOC::stat( stEnd ); - - std::cout << "\nStatistics:\n" - << stEnd; - stEnd -= stBegin; - std::cout << "\nDelta statistics:\n" - << stEnd; - } - } - - m_Data.resize(0); - } - - void setUpParams( const CppUnitMini::TestCfg& cfg ) - { - s_nDataSize = cfg.getULong( "DataSize", 1000 ); - s_nPassCount = cfg.getULong( "PassCount", 100000 ); - s_nMinBlockSize = cfg.getUInt( "MinBlockSize", 8 ); - s_nMaxBlockSize = cfg.getUInt( "MaxBlockSize", 1024 ); - s_nMaxThreadCount = cfg.getUInt( "MaxThreadCount", 32 ); - if ( s_nMaxThreadCount == 0 ) - s_nMaxThreadCount = cds::OS::topology::processor_count() * 2; - if ( s_nMaxThreadCount < 2 ) - s_nMaxThreadCount = 2; - } - - typedef MichaelAlignHeap_Stat t_MichaelAlignHeap_Stat; - typedef MichaelAlignHeap_NoStat t_MichaelAlignHeap_NoStat; - typedef system_aligned_allocator t_system_aligned_allocator; - - TEST_ALLOC_STAT( michael_heap_stat, MichaelHeap_Stat ) - TEST_ALLOC( michael_heap_nostat, MichaelHeap_NoStat ) - TEST_ALLOC( std_alloc, std_allocator ) - - TEST_ALLOC_STAT( michael_alignheap_stat,t_MichaelAlignHeap_Stat ) - TEST_ALLOC( michael_alignheap_nostat, t_MichaelAlignHeap_NoStat ) - TEST_ALLOC( system_aligned_alloc, t_system_aligned_allocator ) - - CPPUNIT_TEST_SUITE( Random_Alloc ) - CPPUNIT_TEST( michael_heap_stat ) - CPPUNIT_TEST( michael_heap_nostat ) - CPPUNIT_TEST( std_alloc ) - - CPPUNIT_TEST( system_aligned_alloc ) - CPPUNIT_TEST( michael_alignheap_stat ) - CPPUNIT_TEST( michael_alignheap_nostat ) - - CPPUNIT_TEST_SUITE_END(); - }; - -} // namespace memory -CPPUNIT_TEST_SUITE_REGISTRATION( memory::Random_Alloc ); diff --git a/tests/unit/alloc/random_gen.h b/tests/unit/alloc/random_gen.h deleted file mode 100644 index d764537f..00000000 --- a/tests/unit/alloc/random_gen.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Random number geerator - -#ifndef CPPUNIT_MEMORY_RANDOM_GEN_H -#define CPPUNIT_MEMORY_RANDOM_GEN_H - - -#include -#include -#include - -namespace memory { - template - class randomGen - { - boost::mt19937 m_rndGen; - public: - typedef T random_type; - - randomGen() - {} - - random_type gen( random_type nMin, random_type nMax ) - { - boost::uniform_int dist(nMin, nMax); - return boost::variate_generator >(m_rndGen, dist)(); - } - - /* - random_type operator()() - { - return gen( s_nMinBlockSize, s_nMaxBlockSize ); - } - */ - - random_type operator()( random_type nMin, random_type nMax ) - { - return gen( nMin, nMax ); - } - }; -} // namespace memory - -#endif // CPPUNIT_MEMORY_RANDOM_GEN_H diff --git a/tests/unit/ellen_bintree_update_desc_pool.cpp b/tests/unit/ellen_bintree_update_desc_pool.cpp deleted file mode 100644 index a8db9220..00000000 --- a/tests/unit/ellen_bintree_update_desc_pool.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "ellen_bintree_update_desc_pool.h" - -namespace ellen_bintree_pool { - update_desc_pool_type s_UpdateDescPool; - - bounded_update_desc_pool_type s_BoundedUpdateDescPool; - - cds::atomicity::event_counter internal_node_counter::m_nAlloc; - cds::atomicity::event_counter internal_node_counter::m_nFree; -} diff --git a/tests/unit/ellen_bintree_update_desc_pool.h b/tests/unit/ellen_bintree_update_desc_pool.h deleted file mode 100644 index bd199c94..00000000 --- a/tests/unit/ellen_bintree_update_desc_pool.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSUNIT_ELLEN_BINTREE_UPDATE_DESC_POOL_H -#define CDSUNIT_ELLEN_BINTREE_UPDATE_DESC_POOL_H - -#include -#include -#include -#include - -namespace ellen_bintree_pool { - typedef cds::container::ellen_bintree::node_types< cds::urcu::gc< cds::urcu::general_instant<> >, int > node_types; // fake - typedef node_types::leaf_node_type leaf_node; - typedef node_types::internal_node_type internal_node; - typedef node_types::update_desc_type update_desc; - - // Update descriptor pool based on Vyukov's queue - struct update_desc_pool_traits : public cds::memory::vyukov_queue_pool_traits - { - typedef cds::opt::v::static_buffer< cds::any_type, 4096 > buffer; - }; - - typedef cds::memory::vyukov_queue_pool< update_desc, update_desc_pool_traits > update_desc_pool_type; - extern update_desc_pool_type s_UpdateDescPool; - - struct update_desc_pool_accessor { - typedef update_desc_pool_type::value_type value_type; - - update_desc_pool_type& operator()() const - { - return s_UpdateDescPool; - } - }; - - // Update descriptor pool based on bounded Vyukov's queue - struct bounded_update_desc_pool_traits : public cds::memory::vyukov_queue_pool_traits - { - typedef cds::opt::v::static_buffer< cds::any_type, 4096 > buffer; - }; - typedef cds::memory::bounded_vyukov_queue_pool< update_desc, bounded_update_desc_pool_traits > bounded_update_desc_pool_type; - extern bounded_update_desc_pool_type s_BoundedUpdateDescPool; - - struct bounded_update_desc_pool_accessor { - typedef bounded_update_desc_pool_type::value_type value_type; - - bounded_update_desc_pool_type& operator()() const - { - return s_BoundedUpdateDescPool; - } - }; - - - // Internal node allocator - struct internal_node_counter - { - static cds::atomicity::event_counter m_nAlloc; - static cds::atomicity::event_counter m_nFree; - - static void onAlloc() - { - ++m_nAlloc; - } - static void onFree() - { - ++m_nFree; - } - - static void reset() - { - m_nAlloc.reset(); - m_nFree.reset(); - } - }; - - template - class internal_node_allocator - : public Alloc::template rebind< T >::other - , internal_node_counter - { - typedef typename Alloc::template rebind< T >::other base_class; - public: - template - struct rebind { - typedef internal_node_allocator< Other, Alloc > other; - }; - - T * allocate( size_t n, void const * pHint = nullptr ) - { - internal_node_counter::onAlloc(); - T * p = base_class::allocate( n, pHint ); - return p; - } - - void deallocate( T * p, size_t n ) - { - internal_node_counter::onFree(); - return base_class::deallocate( p, n ); - } - }; - -} // namespace ellen_bintree_pool - -#endif // #ifndef CDSUNIT_ELLEN_BINTREE_UPDATE_DESC_POOL_H diff --git a/tests/unit/lock/nolock.h b/tests/unit/lock/nolock.h deleted file mode 100644 index 896d0670..00000000 --- a/tests/unit/lock/nolock.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSUNIT_LOCK_NOLOCK_H -#define CDSUNIT_LOCK_NOLOCK_H - -namespace lock { - // Win32 critical section - class NoLock { - public: - void lock() {} - void unlock() {} - bool try_lock() { return true; } - }; -} - -#endif // #ifndef CDSUNIT_LOCK_NOLOCK_H diff --git a/tests/unit/lock/spinlock.cpp b/tests/unit/lock/spinlock.cpp deleted file mode 100644 index a2e6cfa8..00000000 --- a/tests/unit/lock/spinlock.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "cppunit/thread.h" - -#include - -// Multi-threaded stack test for push operation -namespace lock { - -#define TEST_CASE( N, L ) void N() { test(); } - - namespace { - static size_t s_nThreadCount = 8; - static size_t s_nLoopCount = 1000000 ; // loop count per thread - - static size_t s_nSharedInt; - } - - class Spinlock_MT: public CppUnitMini::TestCase - { - template - class Thread: public CppUnitMini::TestThread - { - virtual TestThread * clone() - { - return new Thread( *this ); - } - public: - LOCK& m_Lock; - double m_fTime; - - public: - Thread( CppUnitMini::ThreadPool& pool, LOCK& l ) - : CppUnitMini::TestThread( pool ) - , m_Lock( l ) - {} - Thread( Thread& src ) - : CppUnitMini::TestThread( src ) - , m_Lock( src.m_Lock ) - {} - - Spinlock_MT& getTest() - { - return reinterpret_cast( m_Pool.m_Test ); - } - - virtual void init() - {} - virtual void fini() - {} - - virtual void test() - { - m_fTime = m_Timer.duration(); - - for ( size_t i = 0; i < s_nLoopCount; ++i ) { - m_Lock.lock(); - ++s_nSharedInt; - m_Lock.unlock(); - } - - m_fTime = m_Timer.duration() - m_fTime; - } - }; - - protected: - void setUpParams( const CppUnitMini::TestCfg& cfg ) { - s_nThreadCount = cfg.getULong("ThreadCount", 8 ); - s_nLoopCount = cfg.getULong("LoopCount", 1000000 ); - } - - template - void test() - { - LOCK testLock; - - for ( size_t nThreadCount = 1; nThreadCount <= s_nThreadCount; nThreadCount *= 2 ) { - s_nSharedInt = 0; - - CppUnitMini::ThreadPool pool( *this ); - pool.add( new Thread( pool, testLock ), nThreadCount ); - - CPPUNIT_MSG( " Lock test, thread count=" << nThreadCount - << " loop per thread=" << s_nLoopCount - << "..."); - cds::OS::Timer timer; - pool.run(); - CPPUNIT_MSG( " Duration=" << timer.duration() ); - - CPPUNIT_ASSERT_EX( s_nSharedInt == nThreadCount * s_nLoopCount, - "Expected=" << nThreadCount * s_nLoopCount - << " real=" << s_nSharedInt ); - } - } - - typedef cds::sync::spin_lock > Spinlock_exp; - - typedef cds::sync::reentrant_spin_lock > reentrantSpin_exp; - typedef cds::sync::reentrant_spin_lock reentrantSpin_yield; - typedef cds::sync::reentrant_spin_lock reentrantSpin_hint; - typedef cds::sync::reentrant_spin_lock reentrantSpin_empty; - - TEST_CASE(spinLock_exp, Spinlock_exp ); - TEST_CASE(spinLock_yield, cds::sync::spin_lock ); - TEST_CASE(spinLock_hint, cds::sync::spin_lock ); - TEST_CASE(spinLock_empty, cds::sync::spin_lock ); - TEST_CASE( spinLock_yield_lock, cds::lock::Spinlock ); - TEST_CASE( spinLock_hint_lock, cds::lock::Spinlock ); - TEST_CASE( spinLock_empty_lock, cds::lock::Spinlock ); - - TEST_CASE( reentrantSpinLock32, cds::sync::reentrant_spin32 ); - TEST_CASE( reentrantSpinLock64, cds::sync::reentrant_spin64 ); - TEST_CASE( reentrantSpinLock32_lock, cds::lock::ReentrantSpin32 ); - TEST_CASE( reentrantSpinLock64_lock, cds::lock::ReentrantSpin64 ); - - TEST_CASE(reentrantSpinlock_exp, reentrantSpin_exp ); - TEST_CASE(reentrantSpinlock_yield, reentrantSpin_yield ); - TEST_CASE(reentrantSpinlock_hint, reentrantSpin_hint ); - TEST_CASE(reentrantSpinlock_empty, reentrantSpin_empty ); - - protected: - CPPUNIT_TEST_SUITE(Spinlock_MT) - CPPUNIT_TEST(spinLock_exp); - CPPUNIT_TEST(spinLock_yield); - CPPUNIT_TEST(spinLock_hint); - CPPUNIT_TEST(spinLock_empty); - - CPPUNIT_TEST(reentrantSpinLock32); - CPPUNIT_TEST(reentrantSpinLock64); - - CPPUNIT_TEST(reentrantSpinlock_exp) - CPPUNIT_TEST(reentrantSpinlock_yield) - CPPUNIT_TEST(reentrantSpinlock_hint) - CPPUNIT_TEST(reentrantSpinlock_empty) - CPPUNIT_TEST_SUITE_END(); - }; - -} // namespace lock - -CPPUNIT_TEST_SUITE_REGISTRATION(lock::Spinlock_MT); diff --git a/tests/unit/lock/win32_lock.h b/tests/unit/lock/win32_lock.h deleted file mode 100644 index db57d329..00000000 --- a/tests/unit/lock/win32_lock.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSUNIT_LOCK_WIN32_LOCK_H -#define CDSUNIT_LOCK_WIN32_LOCK_H - -#if defined(_WIN32) || defined(_WIN64) -#define NOMINMAX -#include - -#define UNIT_LOCK_WIN_CS - -namespace lock { - namespace win { - // Win32 critical section - class CS { - CRITICAL_SECTION m_cs; - - public: - CS() { ::InitializeCriticalSection( &m_cs ) ; } - ~CS() { ::DeleteCriticalSection( &m_cs ) ; } - - void lock() { ::EnterCriticalSection( &m_cs ) ; } - void unlock() { ::LeaveCriticalSection( &m_cs) ; } - bool try_lock() { return ::TryEnterCriticalSection( &m_cs ) != 0 ; } - }; - - class Mutex { - HANDLE m_hMutex; - public: - - Mutex() { m_hMutex = ::CreateMutex( nullptr, false, nullptr ); } - ~Mutex() { ::CloseHandle( m_hMutex ) ; } - - void lock() { ::WaitForSingleObject( m_hMutex, INFINITE ); } - void unlock() { ::ReleaseMutex( m_hMutex ); } - bool try_lock() { return ::WaitForSingleObject( m_hMutex, 0) == WAIT_OBJECT_0; } - }; - - } // namespace win -} // namespace lock - -#endif // defined(_WIN32) || defined(_WIN64) -#endif // #ifndef CDSUNIT_LOCK_WIN32_LOCK_H diff --git a/tests/unit/michael_alloc.cpp b/tests/unit/michael_alloc.cpp deleted file mode 100644 index ec6e3aa8..00000000 --- a/tests/unit/michael_alloc.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "michael_alloc.h" - -namespace memory { - michael_heap s_MichaelHeap; -} diff --git a/tests/unit/michael_alloc.h b/tests/unit/michael_alloc.h deleted file mode 100644 index ddaed85c..00000000 --- a/tests/unit/michael_alloc.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSUNIT_MICHAEL_ALLOC_H -#define CDSUNIT_MICHAEL_ALLOC_H - -#include -#include - -namespace memory { - - typedef cds::memory::michael::Heap< - cds::memory::michael::opt::check_bounds< cds::memory::michael::debug_bound_checking > - > michael_heap; - extern michael_heap s_MichaelHeap; - - template - class MichaelAllocator - { - typedef std::allocator std_allocator; - public: - // Declare typedefs from std::allocator - typedef typename std_allocator::const_pointer const_pointer; - typedef typename std_allocator::pointer pointer; - typedef typename std_allocator::const_reference const_reference; - typedef typename std_allocator::reference reference; - typedef typename std_allocator::difference_type difference_type; - typedef typename std_allocator::size_type size_type; - typedef typename std_allocator::value_type value_type; - - // Allocation function - pointer allocate( size_type _Count, const void* /*_Hint*/ = nullptr ) - { - return reinterpret_cast( s_MichaelHeap.alloc( sizeof(T) * _Count )); - } - - // Deallocation function - void deallocate( pointer _Ptr, size_type /*_Count*/ ) - { - s_MichaelHeap.free( _Ptr ); - } - - pointer address( reference r ) const - { - return &r; - } - const_pointer address( const_reference r ) const - { - return &r; - } - void construct( pointer p, const T& val ) - { - return new( p ) T( val ); - } - void destroy( pointer p ) - { - p->T::~T(); - } - - // Rebinding allocator to other type - template - struct rebind { - typedef MichaelAllocator other; - }; - }; -} // namespace memory - -#endif // #ifndef CDSUNIT_MICHAEL_ALLOC_H diff --git a/tests/unit/nonconcurrent_iterator_sequence.h b/tests/unit/nonconcurrent_iterator_sequence.h deleted file mode 100644 index 3da63583..00000000 --- a/tests/unit/nonconcurrent_iterator_sequence.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSUNIT_NONCONCURRENT_ITERATOR_SEQUENCE_H -#define CDSUNIT_NONCONCURRENT_ITERATOR_SEQUENCE_H - -#include -#include -#include // std::sort - -namespace map { namespace nonconcurrent_iterator { - - class Sequence - { - public: - typedef int TKey; - struct TValue { - TKey keyControl ; // èñïîëüçóåòñÿ äëÿ êîíòðîëÿ, ÷òî äàííûå îòíîñÿòñÿ ê êëþ÷ó - int nShuffle ; // ñëó÷àéíîå çíà÷åíèå, èñïîëüçóåìîå äëÿ ñîðòèðîâêè - TValue * pOrigItem ; // óêàçàòåëü íà ýëåìåíò â ìàññèâå; òàê êàê ñïèñîê õðàíèò êîïèè, - // òî ñ ïîìîùüþ ýòîãî ïîëÿ îðãàíèçóåòñÿ äîñòóï ê èñõîäíîìó ýëåìåíòó - - cds::atomics::item_counter nAccess ; // ñ÷åò÷èê äîñòóïà ïðè îáõîäå ñïèñêà ïî èòåðàòîðàì - // (Atomic, òàê êàê âîçìîæåí ïàðàëëåüíûé äîñòóï) - - TValue() - { - ++nConstructCount; - } - TValue( const TValue& v ) - { - memcpy( this, &v, sizeof(*this) ); - ++nConstructCount; - } - ~TValue() - { - ++nDestructCount; - } - }; - - struct Data { - TKey key; - TValue value; - }; - - protected: - static size_t nConstructCount; - static size_t nDestructCount; - - public: - typedef cds::details::BoundedArray TDataArray; - typedef TDataArray::const_iterator const_iterator; - - TDataArray arrData; - - const_iterator begin() const { return arrData.begin(); } - const_iterator end() const { return arrData.end(); } - - public: - Sequence( size_t nSize ) - : arrData( nSize ) - {} - - static unsigned int Rand( unsigned int nMax ) - { - double rnd = double( rand() ) / double( RAND_MAX ); - unsigned int n = (unsigned int) (rnd * nMax); - return n < nMax ? n : (n-1); - } - - void generateSequence() - { - // Ãåíåðèðóåì òåñòîâûé ìàññèâ äàííûõ. Ìàññèâ äîëæåí áûòü ïåðåìåøàí ñëó÷àéíûì îáðàçîì, ïîýòîìó - // â êà÷åñòâå çíà÷åíèÿ ïîëÿ value.nShuffle èñïîëüçóåì ñëó÷àéíîå, è ñîðòèðóåì ìàññèâ - // ïî ýòîìó ñëó÷àéíîìó çíà÷åíèþ - - size_t nMax = arrData.capacity(); - for ( size_t i = 0; i < nMax; ++i ) { - arrData[i].key = (unsigned int) i; - arrData[i].value.keyControl = (unsigned int) i; - arrData[i].value.nShuffle = Rand( (unsigned int) nMax ); - arrData[i].value.pOrigItem = &(arrData[i].value); - arrData[i].value.nAccess.reset( cds::membar_relaxed::order ); - } - } - - void restoreLinks() - { - size_t nMax = arrData.capacity(); - for ( size_t i = 0; i < nMax; ++i ) - arrData[i].value.pOrigItem = &(arrData[i].value); - } - - static bool sortValue( const Data& p1, const Data&p2 ) - { - return p1.value.nShuffle < p2.value.nShuffle; - } - - void makeRandomSortedSequence() - { - std::sort( arrData.begin(), arrData.end(), sortValue ); - restoreLinks(); - } - - static bool sortAsc( const Data& p1, const Data&p2 ) - { - return p1.key < p2.key; - } - - void makeAscSortedSequence() - { - // Ñîðòèðóåò ìàññèâ â ïîðÿäêå âîçðàñòàíèÿ êëþ÷åé - std::sort( arrData.begin(), arrData.end(), sortAsc ); - restoreLinks(); - } - - static bool sortDesc( const Data& p1, const Data&p2 ) - { - return p2.key < p1.key; - } - - void makeDescSortedSequence() - { - // Ñîðòèðóåò ìàññèâ â ïîðÿäêå óáûâàíèÿ êëþ÷åé - std::sort( arrData.begin(), arrData.end(), sortDesc ); - restoreLinks(); - } - - void clearAccess() - { - size_t nMax = arrData.capacity(); - for ( size_t i = 0; i < nMax; ++i ) - arrData[i].value.nAccess.reset( cds::membar_relaxed::order ); - } - }; - -} } // namespace map::nonconcurrent_iterator - -#endif // #ifndef CDSUNIT_NONCONCURRENT_ITERATOR_SEQUENCE_H diff --git a/tests/unit/print_bronsonavltree_stat.h b/tests/unit/print_bronsonavltree_stat.h deleted file mode 100644 index a34c592c..00000000 --- a/tests/unit/print_bronsonavltree_stat.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSUNIT_PRINT_BRONSONAVLTREE_STAT_H -#define CDSUNIT_PRINT_BRONSONAVLTREE_STAT_H - -#include - -namespace std { - - static inline ostream& operator <<( ostream& o, cds::container::bronson_avltree::empty_stat const& /*s*/ ) - { - return o; - } - - static inline ostream& operator <<(ostream& o, cds::container::bronson_avltree::stat<> const& s) - { - return o << "\nBronsonAVLTree statistics [cds::container::bronson_avltree::stat]:\n" - << "\t\t m_nFindSuccess: " << s.m_nFindSuccess.get() << "\n" - << "\t\t m_nFindFailed: " << s.m_nFindFailed.get() << "\n" - << "\t\t m_nFindRetry: " << s.m_nFindRetry.get() << "\n" - << "\t\t m_nFindWaitShrinking: " << s.m_nFindWaitShrinking.get() << "\n" - << "\t\t m_nInsertSuccess: " << s.m_nInsertSuccess.get() << "\n" - << "\t\t m_nInsertFailed: " << s.m_nInsertFailed.get() << "\n" - << "\t\t m_nRelaxedInsertFailed: " << s.m_nRelaxedInsertFailed.get() << "\n" - << "\t\t m_nInsertRetry: " << s.m_nInsertRetry.get() << "\n" - << "\t\t m_nUpdateWaitShrinking: " << s.m_nUpdateWaitShrinking.get() << "\n" - << "\t\t m_nUpdateRetry: " << s.m_nUpdateRetry.get() << "\n" - << "\t\t m_nUpdateRootWaitShrinking: " << s.m_nUpdateRootWaitShrinking.get() << "\n" - << "\t\t m_nUpdateSuccess: " << s.m_nUpdateSuccess.get() << "\n" - << "\t\t m_nUpdateUnlinked: " << s.m_nUpdateUnlinked.get() << "\n" - << "\t\t m_nRemoveSuccess: " << s.m_nRemoveSuccess.get() << "\n" - << "\t\t m_nRemoveFailed: " << s.m_nRemoveFailed.get() << "\n" - << "\t\t m_nRemoveRetry: " << s.m_nRemoveRetry.get() << "\n" - << "\t\t m_nExtractSuccess: " << s.m_nExtractSuccess.get() << "\n" - << "\t\t m_nExtractFailed: " << s.m_nExtractFailed.get() << "\n" - << "\t\t m_nRemoveWaitShrinking: " << s.m_nRemoveWaitShrinking.get() << "\n" - << "\t\t m_nRemoveRootWaitShrinking: " << s.m_nRemoveRootWaitShrinking.get() << "\n" - << "\t\t m_nMakeRoutingNode: " << s.m_nMakeRoutingNode.get() << "\n" - << "\t\t m_nDisposedValue: " << s.m_nDisposedValue.get() << "\n" - << "\t\t m_nDisposedNode: " << s.m_nDisposedNode.get() << "\n" - << "\t\t m_nExtractedValue: " << s.m_nExtractedValue.get() << "\n" - << "\t\t m_nRightRotation: " << s.m_nRightRotation.get() << "\n" - << "\t\t m_nLeftRotation: " << s.m_nLeftRotation.get() << "\n" - << "\t\t m_nLeftRightRotation: " << s.m_nLeftRightRotation.get() << "\n" - << "\t\t m_nRightLeftRotation: " << s.m_nRightLeftRotation.get() << "\n" - << "\t\t m_nInsertRebalanceReq: " << s.m_nInsertRebalanceReq.get() << "\n" - << "\t\t m_nRemoveRebalanceReq: " << s.m_nRemoveRebalanceReq.get() << "\n" - << "\t\tm_nRotateAfterRightRotation: " << s.m_nRotateAfterRightRotation.get() << "\n" - << "\t\tm_nRemoveAfterRightRotation: " << s.m_nRemoveAfterRightRotation.get() << "\n" - << "\t\tm_nDamageAfterRightRotation: " << s.m_nDamageAfterRightRotation.get() << "\n" - << "\t\t m_nRotateAfterLeftRotation: " << s.m_nRotateAfterLeftRotation.get() << "\n" - << "\t\t m_nRemoveAfterLeftRotation: " << s.m_nRemoveAfterLeftRotation.get() << "\n" - << "\t\t m_nDamageAfterLeftRotation: " << s.m_nDamageAfterLeftRotation.get() << "\n" - << "\t\t m_nRotateAfterRLRotation: " << s.m_nRotateAfterRLRotation.get() << "\n" - << "\t\t m_nRemoveAfterRLRotation: " << s.m_nRemoveAfterRLRotation.get() << "\n" - << "\t\t m_nRotateAfterLRRotation: " << s.m_nRotateAfterLRRotation.get() << "\n" - << "\t\t m_nRemoveAfterLRRotation: " << s.m_nRemoveAfterLRRotation.get() << "\n"; - } -} //namespace std - -#endif // #ifndef CDSUNIT_PRINT_ELLENBINTREE_STAT_H diff --git a/tests/unit/print_cuckoo_stat.h b/tests/unit/print_cuckoo_stat.h deleted file mode 100644 index 246599a7..00000000 --- a/tests/unit/print_cuckoo_stat.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSUNIT_PRINT_CUCKOO_STAT_H -#define CDSUNIT_PRINT_CUCKOO_STAT_H - -#include -#include - -namespace std { - - static inline ostream& operator <<( ostream& o, cds::intrusive::cuckoo::striping_stat const& s ) - { - return o << "\tStriping statistis [cds::intrusive::cuckoo::striping_stat]:\n" - << "\t\t m_nCellLockCount: " << s.m_nCellLockCount.get() << "\n" - << "\t\t m_nCellTryLockCount: " << s.m_nCellTryLockCount.get() << "\n" - << "\t\t m_nFullLockCount: " << s.m_nFullLockCount.get() << "\n" - << "\t\t m_nResizeLockCount: " << s.m_nResizeLockCount.get() << "\n" - << "\t\t m_nResizeCount: " << s.m_nResizeCount.get() << "\n" -; - } - static inline ostream& operator <<( ostream& o, cds::intrusive::cuckoo::empty_striping_stat const& /*s*/ ) - { - return o; - } - - static inline ostream& operator <<( ostream& o, cds::intrusive::cuckoo::refinable_stat const& s ) - { - return o << "\tRefinable statistics [cds::intrusive::cuckoo::refinable_stat]:\n" - << "\t\t m_nCellLockCount: " << s.m_nCellLockCount.get() << "\n" - << "\t\t m_nCellLockWaitResizing: " << s.m_nCellLockWaitResizing.get() << "\n" - << "\t\t m_nCellLockArrayChanged: " << s.m_nCellLockArrayChanged.get() << "\n" - << "\t\t m_nCellLockFailed: " << s.m_nCellLockFailed.get() << "\n" - << "\t\t m_nSecondCellLockCount: " << s.m_nSecondCellLockCount.get() << "\n" - << "\t\t m_nSecondCellLockFailed: " << s.m_nSecondCellLockFailed.get() << "\n" - << "\t\t m_nFullLockCount: " << s.m_nFullLockCount.get() << "\n" - << "\t\t m_nFullLockIter: " << s.m_nFullLockIter.get() << "\n" - << "\t\t m_nResizeLockCount: " << s.m_nResizeLockCount.get() << "\n" - << "\t\t m_nResizeLockIter: " << s.m_nResizeLockIter.get() << "\n" - << "\t\t m_nResizeLockArrayChanged: " << s.m_nResizeLockArrayChanged.get() << "\n" - << "\t\t m_nResizeCount: " << s.m_nResizeCount.get() << "\n" -; - } - static inline ostream& operator <<( ostream& o, cds::intrusive::cuckoo::empty_refinable_stat const& /*s*/ ) - { - return o; - } - - static inline ostream& operator <<( ostream& o, cds::intrusive::cuckoo::stat const& s ) - { - return o << "\tCuckoo stat [cds::intrusive::cuckoo::stat]:\n" - << "\t\t m_nRelocateCallCount: " << s.m_nRelocateCallCount.get() << "\n" - << "\t\t m_nRelocateRoundCount: " << s.m_nRelocateRoundCount.get() << "\n" - << "\t\t m_nFalseRelocateCount: " << s.m_nFalseRelocateCount.get() << "\n" - << "\t\t m_nSuccessRelocateCount: " << s.m_nSuccessRelocateCount.get() << "\n" - << "\t\t m_nRelocateAboveThresholdCount: " << s.m_nRelocateAboveThresholdCount.get() << "\n" - << "\t\t m_nFailedRelocateCount: " << s.m_nFailedRelocateCount.get() << "\n" - << "\t\t m_nResizeCallCount: " << s.m_nResizeCallCount.get() << "\n" - << "\t\t m_nFalseResizeCount: " << s.m_nFalseResizeCount.get() << "\n" - << "\t\t m_nResizeSuccessNodeMove: " << s.m_nResizeSuccessNodeMove.get() << "\n" - << "\t\t m_nResizeRelocateCall: " << s.m_nResizeRelocateCall.get() << "\n" - << "\t\t m_nInsertSuccess: " << s.m_nInsertSuccess.get() << "\n" - << "\t\t m_nInsertFailed: " << s.m_nInsertFailed.get() << "\n" - << "\t\t m_nInsertResizeCount: " << s.m_nInsertResizeCount.get() << "\n" - << "\t\t m_nInsertRelocateCount: " << s.m_nInsertRelocateCount.get() << "\n" - << "\t\t m_nInsertRelocateFault: " << s.m_nInsertRelocateFault.get() << "\n" - << "\t\t m_nUpdateExistCount: " << s.m_nUpdateExistCount.get() << "\n" - << "\t\t m_nUpdateSuccessCount: " << s.m_nUpdateSuccessCount.get() << "\n" - << "\t\t m_nUpdateResizeCount: " << s.m_nUpdateResizeCount.get() << "\n" - << "\t\t m_nUpdateRelocateCount: " << s.m_nUpdateRelocateCount.get() << "\n" - << "\t\t m_nUpdateRelocateFault: " << s.m_nUpdateRelocateFault.get() << "\n" - << "\t\t m_nUnlinkSuccess: " << s.m_nUnlinkSuccess.get() << "\n" - << "\t\t m_nUnlinkFailed: " << s.m_nUnlinkFailed.get() << "\n" - << "\t\t m_nEraseSuccess: " << s.m_nEraseSuccess.get() << "\n" - << "\t\t m_nEraseFailed: " << s.m_nEraseFailed.get() << "\n" - << "\t\t m_nFindSuccess: " << s.m_nFindSuccess.get() << "\n" - << "\t\t m_nFindFailed: " << s.m_nFindFailed.get() << "\n" - << "\t\t m_nFindWithSuccess: " << s.m_nFindWithSuccess.get() << "\n" - << "\t\t m_nFindWithFailed: " << s.m_nFindWithFailed.get() << "\n" -; - } - - static inline ostream& operator <<( ostream& o, cds::intrusive::cuckoo::empty_stat const& /*s*/ ) - { - return o; - } - -} // namespace std - -#endif // #ifndef CDSUNIT_PRINT_CUCKOO_STAT_H diff --git a/tests/unit/print_ellenbintree_stat.h b/tests/unit/print_ellenbintree_stat.h deleted file mode 100644 index b48e938b..00000000 --- a/tests/unit/print_ellenbintree_stat.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSUNIT_PRINT_ELLENBINTREE_STAT_H -#define CDSUNIT_PRINT_ELLENBINTREE_STAT_H - -#include "ellen_bintree_update_desc_pool.h" -#include - -namespace std { - static inline ostream& operator <<( ostream& o, cds::intrusive::ellen_bintree::empty_stat const& /*s*/ ) - { - return o; - } - - static inline ostream& operator <<( ostream& o, cds::intrusive::ellen_bintree::stat<> const& s ) - { - return o << "\nEllenBinTree statistics [cds::intrusive::ellen_bintree::stat]:\n" - << "\t\t Internal node allocated: " << ellen_bintree_pool::internal_node_counter::m_nAlloc.get() << "\n" - << "\t\t Internal node freed: " << ellen_bintree_pool::internal_node_counter::m_nFree.get() << "\n" - << "\t\t m_nInternalNodeCreated: " << s.m_nInternalNodeCreated.get() << "\n" - << "\t\t m_nInternalNodeDeleted: " << s.m_nInternalNodeDeleted.get() << "\n" - << "\t\t m_nUpdateDescCreated: " << s.m_nUpdateDescCreated.get() << "\n" - << "\t\t m_nUpdateDescDeleted: " << s.m_nUpdateDescDeleted.get() << "\n" - << "\t\t m_nInsertSuccess: " << s.m_nInsertSuccess.get() << "\n" - << "\t\t m_nInsertFailed: " << s.m_nInsertFailed.get() << "\n" - << "\t\t m_nInsertRetries: " << s.m_nInsertRetries.get() << "\n" - << "\t\t m_nUpdateExist: " << s.m_nUpdateExist.get() << "\n" - << "\t\t m_nUpdateNew: " << s.m_nUpdateNew.get() << "\n" - << "\t\t m_nUpdateRetries: " << s.m_nUpdateRetries.get() << "\n" - << "\t\t m_nEraseSuccess: " << s.m_nEraseSuccess.get() << "\n" - << "\t\t m_nEraseFailed: " << s.m_nEraseFailed.get() << "\n" - << "\t\t m_nEraseRetries: " << s.m_nEraseRetries.get() << "\n" - << "\t\t m_nFindSuccess: " << s.m_nFindSuccess.get() << "\n" - << "\t\t m_nFindFailed: " << s.m_nFindFailed.get() << "\n" - << "\t\t m_nExtractMinSuccess: " << s.m_nExtractMinSuccess.get() << "\n" - << "\t\t m_nExtractMinFailed: " << s.m_nExtractMinFailed.get() << "\n" - << "\t\t m_nExtractMinRetries: " << s.m_nExtractMinRetries.get() << "\n" - << "\t\t m_nExtractMaxSuccess: " << s.m_nExtractMaxSuccess.get() << "\n" - << "\t\t m_nExtractMaxFailed: " << s.m_nExtractMaxFailed.get() << "\n" - << "\t\t m_nExtractMaxRetries: " << s.m_nExtractMaxRetries.get() << "\n" - << "\t\t m_nSearchRetry: " << s.m_nSearchRetry.get() << "\n" - << "\t\t m_nHelpInsert: " << s.m_nHelpInsert.get() << "\n" - << "\t\t m_nHelpDelete: " << s.m_nHelpDelete.get() << "\n" - << "\t\t m_nHelpMark: " << s.m_nHelpMark.get() << "\n" - << "\t\t m_nHelpGuardSuccess: " << s.m_nHelpGuardSuccess.get() << "\n" - << "\t\t m_nHelpGuardFailed: " << s.m_nHelpGuardFailed.get() << "\n"; - } -} - -#endif // #ifndef CDSUNIT_PRINT_ELLENBINTREE_STAT_H diff --git a/tests/unit/print_feldman_hashset_stat.h b/tests/unit/print_feldman_hashset_stat.h deleted file mode 100644 index 8007dc58..00000000 --- a/tests/unit/print_feldman_hashset_stat.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSUNIT_PRINT_FELDMAN_HASHSET_STAT_H -#define CDSUNIT_PRINT_FELDMAN_HASHSET_STAT_H - -#include -#include -#include - -namespace std { - - static inline ostream& operator <<( ostream& o, cds::intrusive::feldman_hashset::stat<> const& s ) - { - return - o << "Stat [cds::intrusive::feldman_hashset::stat]\n" - << "\t\t m_nInsertSuccess: " << s.m_nInsertSuccess.get() << "\n" - << "\t\t m_nInsertFailed: " << s.m_nInsertFailed.get() << "\n" - << "\t\t m_nInsertRetry: " << s.m_nInsertRetry.get() << "\n" - << "\t\t m_nUpdateNew: " << s.m_nUpdateNew.get() << "\n" - << "\t\t m_nUpdateExisting: " << s.m_nUpdateExisting.get() << "\n" - << "\t\t m_nUpdateFailed: " << s.m_nUpdateFailed.get() << "\n" - << "\t\t m_nUpdateRetry: " << s.m_nUpdateRetry.get() << "\n" - << "\t\t m_nEraseSuccess: " << s.m_nEraseSuccess.get() << "\n" - << "\t\t m_nEraseFailed: " << s.m_nEraseFailed.get() << "\n" - << "\t\t m_nEraseRetry: " << s.m_nEraseRetry.get() << "\n" - << "\t\t m_nFindSuccess: " << s.m_nFindSuccess.get() << "\n" - << "\t\t m_nFindFailed: " << s.m_nFindFailed.get() << "\n" - << "\t\t m_nExpandNodeSuccess: " << s.m_nExpandNodeSuccess.get() << "\n" - << "\t\t m_nExpandNodeFailed: " << s.m_nExpandNodeFailed.get() << "\n" - << "\t\t m_nSlotChanged: " << s.m_nSlotChanged.get() << "\n" - << "\t\t m_nSlotConverting: " << s.m_nSlotConverting.get() << "\n" - << "\t\t m_nArrayNodeCount: " << s.m_nArrayNodeCount.get() << "\n" - << "\t\t m_nHeight: " << s.m_nHeight.get() << "\n"; - } - - static inline ostream& operator <<( ostream& o, cds::intrusive::feldman_hashset::empty_stat const& /*s*/ ) - { - return o; - } - - static inline ostream& operator<<( ostream& o, std::vector< cds::intrusive::feldman_hashset::level_statistics > const& level_stat ) - { - o << "Level statistics, height=" << level_stat.size() << "\n"; - size_t i = 0; - o << " i node_count capacity data_cell array_cell empty_cell\n"; - for ( auto it = level_stat.begin(); it != level_stat.end(); ++it, ++i ) { - o << std::setw( 3 ) << i << std::setw( 0 ) << " " - << std::setw( 12 ) << it->array_node_count << std::setw( 0 ) << " " - << std::setw( 8 ) << it->node_capacity << std::setw( 0 ) << " " - << std::setw( 12 ) << it->data_cell_count << std::setw( 0 ) << " " - << std::setw( 12 ) << it->array_cell_count << std::setw( 0 ) << " " - << std::setw( 12 ) << it->empty_cell_count << std::setw( 0 ) - << "\n"; - } - return o; - } - -} // namespace std - -#endif // #ifndef CDSUNIT_PRINT_FELDMAN_HASHSET_STAT_H diff --git a/tests/unit/print_mspriorityqueue_stat.h b/tests/unit/print_mspriorityqueue_stat.h deleted file mode 100644 index 37393d04..00000000 --- a/tests/unit/print_mspriorityqueue_stat.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSUNIT_PRINT_MSPRIORITYQUEUE_STAT_H -#define CDSUNIT_PRINT_MSPRIORITYQUEUE_STAT_H - -#include - -namespace std { - static inline ostream& operator <<( ostream& o, cds::container::mspriority_queue::empty_stat const& /*s*/ ) - { - return o; - } - - static inline ostream& operator <<( ostream& o, cds::container::mspriority_queue::stat<> const& s ) - { - return o << "\nMSPriorityQueue statistis [cds::container::mspriority_queue::stat]:\n" - << "\t\t Success push count: " << s.m_nPushCount.get() << "\n" - << "\t\t Success pop count: " << s.m_nPopCount.get() << "\n" - << "\t\tFailed push count (full queue): " << s.m_nPushFailCount.get() << "\n" - << "\t\tFailed pop count (empty queue): " << s.m_nPopFailCount.get() << "\n" - << "\t\t Heapify swap on push: " << s.m_nPushHeapifySwapCount.get() << "\n" - << "\t\t Heapify swap on pop: " << s.m_nPopHeapifySwapCount.get() << "\n"; - } -} - -#endif // #ifndef CDSUNIT_PRINT_MSPRIORITYQUEUE_STAT_H diff --git a/tests/unit/print_segmentedqueue_stat.h b/tests/unit/print_segmentedqueue_stat.h deleted file mode 100644 index ab9737b1..00000000 --- a/tests/unit/print_segmentedqueue_stat.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSUNIT_PRINT_SEGMENTEDQUEUE_STAT_H -#define CDSUNIT_PRINT_SEGMENTEDQUEUE_STAT_H - -#include - -namespace std { - static inline std::ostream& operator <<( std::ostream& o, cds::intrusive::segmented_queue::stat<> const& s ) - { - return o << "\tStatistics:\n" - << "\t Push: " << s.m_nPush.get() << "\n" - << "\t Push populated: " << s.m_nPushPopulated.get() << "\n" - << "\tPush failed (contention): " << s.m_nPushContended.get() << "\n" - << "\t Pop: " << s.m_nPop.get() << "\n" - << "\t Pop empty: " << s.m_nPopEmpty.get() << "\n" - << "\t Pop failed (contention): " << s.m_nPopContended.get() << "\n" - << "\t Segment create requests: " << s.m_nCreateSegmentReq.get() << "\n" - << "\t Segment delete requests: " << s.m_nDeleteSegmentReq.get() << "\n" - << "\t Segment created: " << s.m_nSegmentCreated.get() << "\n" - << "\t Segment deleted: " << s.m_nSegmentDeleted.get() << "\n"; - } - - static inline ostream& operator <<( ostream& o, cds::intrusive::segmented_queue::empty_stat const& /*s*/ ) - { - return o; - } - -} // namespace std - -#endif // #ifndef CDSUNIT_PRINT_SEGMENTEDQUEUE_STAT_H diff --git a/tests/unit/print_skip_list_stat.h b/tests/unit/print_skip_list_stat.h deleted file mode 100644 index 03bff5de..00000000 --- a/tests/unit/print_skip_list_stat.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSUNIT_PRINT_SKIP_LIST_STAT_H -#define CDSUNIT_PRINT_SKIP_LIST_STAT_H - -#include -#include - -namespace std { - - static inline ostream& operator <<( ostream& o, cds::intrusive::skip_list::stat<> const& s ) - { - o << "Skip-list stat [cds::intrusive::skip_list::stat]\n" - << "\t\t node height (add/delete):\n"; - - for ( unsigned int i = 0; i < 9; ++i ) - o << "\t\t\t[ " << (i + 1) << "]: " << s.m_nNodeHeightAdd[i].get() << '/' << s.m_nNodeHeightDel[i].get() << "\n"; - for ( unsigned int i = 9; i < sizeof(s.m_nNodeHeightAdd) / sizeof(s.m_nNodeHeightAdd[0] ); ++i ) - o << "\t\t\t[" << (i + 1) << "]: " << s.m_nNodeHeightAdd[i].get() << '/' << s.m_nNodeHeightDel[i].get() << "\n"; - - return o - << "\t\t m_nInsertSuccess: " << s.m_nInsertSuccess.get() << "\n" - << "\t\t m_nInsertFailed: " << s.m_nInsertFailed.get() << "\n" - << "\t\t m_nInsertRetries: " << s.m_nInsertRetries.get() << "\n" - << "\t\t m_nUpdateExist: " << s.m_nUpdateExist.get() << "\n" - << "\t\t m_nUpdateNew: " << s.m_nUpdateNew.get() << "\n" - << "\t\t m_nUnlinkSuccess: " << s.m_nUnlinkSuccess.get() << "\n" - << "\t\t m_nUnlinkFailed: " << s.m_nUnlinkFailed.get() << "\n" - << "\t\t m_nExtractSuccess: " << s.m_nExtractSuccess.get() << "\n" - << "\t\t m_nExtractFailed: " << s.m_nExtractFailed.get() << "\n" - << "\t\t m_nExtractRetries: " << s.m_nExtractRetries.get() << "\n" - << "\t\t m_nExtractMinSuccess: " << s.m_nExtractMinSuccess.get() << "\n" - << "\t\t m_nExtractMinFailed: " << s.m_nExtractMinFailed.get() << "\n" - << "\t\t m_nExtractMinRetries: " << s.m_nExtractMinRetries.get() << "\n" - << "\t\t m_nExtractMaxSuccess: " << s.m_nExtractMaxSuccess.get() << "\n" - << "\t\t m_nExtractMaxFailed: " << s.m_nExtractMaxFailed.get() << "\n" - << "\t\t m_nExtractMaxRetries: " << s.m_nExtractMaxRetries.get() << "\n" - << "\t\t m_nEraseSuccess: " << s.m_nEraseSuccess.get() << "\n" - << "\t\t m_nEraseFailed: " << s.m_nEraseFailed.get() << "\n" - << "\t\t m_nEraseRetry: " << s.m_nEraseRetry.get() << "\n" - << "\t\t m_nFindFastSuccess: " << s.m_nFindFastSuccess.get() << "\n" - << "\t\t m_nFindFastFailed: " << s.m_nFindFastFailed.get() << "\n" - << "\t\t m_nFindSlowSuccess: " << s.m_nFindSlowSuccess.get() << "\n" - << "\t\t m_nFindSlowFailed: " << s.m_nFindSlowFailed.get() << "\n" - << "\t\t m_nRenewInsertPosition: " << s.m_nRenewInsertPosition.get() << "\n" - << "\t\t m_nLogicDeleteWhileInsert: " << s.m_nLogicDeleteWhileInsert.get() << "\n" - << "\t\t m_nNotFoundWhileInsert: " << s.m_nNotFoundWhileInsert.get() << "\n" - << "\t\t m_nFastErase: " << s.m_nFastErase.get() << "\n" - << "\t\t m_nSlowErase: " << s.m_nSlowErase.get() << "\n" - << "\t\t m_nFastExtract: " << s.m_nFastExtract.get() << "\n" - << "\t\t m_nSlowExtract: " << s.m_nSlowExtract.get() << "\n" - << "\t\t m_nEraseWhileFind: " << s.m_nEraseWhileFind.get() << "\n" - << "\t\t m_nExtractWhileFind: " << s.m_nExtractWhileFind.get() << "\n"; - } - - static inline ostream& operator <<( ostream& o, cds::intrusive::skip_list::empty_stat const& /*s*/ ) - { - return o; - } - -} // namespace std - -#endif // #ifndef CDSUNIT_PRINT_SKIP_LIST_STAT_H diff --git a/tests/unit/print_split_list_stat.h b/tests/unit/print_split_list_stat.h deleted file mode 100644 index a69bb854..00000000 --- a/tests/unit/print_split_list_stat.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSUNIT_PRINT_SPLIT_LIST_STAT_H -#define CDSUNIT_PRINT_SPLIT_LIST_STAT_H - -#include -#include - -namespace std { - - static inline ostream& operator <<( ostream& o, cds::intrusive::split_list::stat<> const& s ) - { - return - o << "Split-list stat [cds::intrusive::split_list::stat]\n" - << "\t\t m_nInsertSuccess: " << s.m_nInsertSuccess.get() << "\n" - << "\t\t m_nInsertFailed: " << s.m_nInsertFailed.get() << "\n" - << "\t\t m_nUpdateExist: " << s.m_nUpdateExist.get() << "\n" - << "\t\t m_nUpdateNew: " << s.m_nUpdateNew.get() << "\n" - << "\t\t m_nEraseSuccess: " << s.m_nEraseSuccess.get() << "\n" - << "\t\t m_nEraseFailed: " << s.m_nEraseFailed.get() << "\n" - << "\t\t m_nExtractSuccess: " << s.m_nExtractSuccess.get() << "\n" - << "\t\t m_nExtractFailed: " << s.m_nExtractFailed.get() << "\n" - << "\t\t m_nFindSuccess: " << s.m_nFindSuccess.get() << "\n" - << "\t\t m_nHeadNodeAllocated: " << s.m_nHeadNodeAllocated.get() << "\n" - << "\t\t m_nHeadNodeFreed: " << s.m_nHeadNodeFreed.get() << "\n" - << "\t\t m_nBucketCount: " << s.m_nBucketCount.get() << "\n" - << "\t\t m_nInitBucketRecursive: " << s.m_nInitBucketRecursive.get() << "\n" - << "\t\t m_nInitBucketContention: " << s.m_nInitBucketContention.get() << "\n" - << "\t\t m_nBusyWaitBucketInit: " << s.m_nBusyWaitBucketInit.get() << "\n"; - } - - static inline ostream& operator <<( ostream& o, cds::intrusive::split_list::empty_stat const& /*s*/ ) - { - return o; - } - -} // namespace std - -#endif // #ifndef CDSUNIT_PRINT_SKIP_LIST_STAT_H diff --git a/tests/unit/print_sync_monitor_stat.h b/tests/unit/print_sync_monitor_stat.h deleted file mode 100644 index d1c15617..00000000 --- a/tests/unit/print_sync_monitor_stat.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#if defined(CDSLIB_SYNC_INJECTING_MONITOR_H) && !defined(CDSUNIT_PRINT_INJECTING_MONITOR_STAT_H) -#define CDSUNIT_PRINT_INJECTING_MONITOR_STAT_H - -namespace std { - static inline ostream& operator <<( ostream& o, cds::sync::injecting_monitor_traits::empty_stat const& /*s*/ ) - { - return o; - } -} -#endif - -#if defined(CDSLIB_SYNC_POOL_MONITOR_H) && !defined(CDSUNIT_PRINT_POOL_MONITOR_STAT_H) -#define CDSUNIT_PRINT_POOL_MONITOR_STAT_H - -namespace std { - static inline ostream& operator <<( ostream& o, cds::sync::pool_monitor_traits::empty_stat const& /*s*/ ) - { - return o; - } - - static inline ostream& operator <<( ostream& o, cds::sync::pool_monitor_traits::stat<> const& s ) - { - return o << "cds::sync::pool_monitor statistics:\n" - << "\t\t m_nLockCount: " << s.m_nLockCount.get() << "\n" - << "\t\t m_nUnlockCount: " << s.m_nUnlockCount.get() << "\n" - << "\t\t m_nMaxLocked: " << s.m_nMaxLocked.get() << "\n" - << "\t\t m_nLockContention: " << s.m_nLockContention.get() << "\n" - << "\t\t m_nUnlockContention: " << s.m_nUnlockContention.get() << "\n" - << "\t\t m_nLockAllocation: " << s.m_nLockAllocation.get() << "\n" - << "\t\t m_nLockDeallocation: " << s.m_nLockDeallocation.get() << "\n" - << "\t\t m_nMaxAllocated: " << s.m_nMaxAllocated.get() << "\n"; - } -} -#endif -- 2.34.1