<commit_before>PROJECT(ROSS_TOP)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
ENABLE_TESTING()

SET(CMAKE_INSTALL_PREFIX /)

INCLUDE(CTest)

INCLUDE(CheckTypeSize)
CHECK_TYPE_SIZE("short"         SIZEOF_SHORT       )
CHECK_TYPE_SIZE("int"           SIZEOF_INT         )
CHECK_TYPE_SIZE("float"         SIZEOF_FLOAT       )
CHECK_TYPE_SIZE("double"        SIZEOF_DOUBLE      )
CHECK_TYPE_SIZE("long"          SIZEOF_LONG        )
CHECK_TYPE_SIZE("long int"      SIZEOF_LONG_INT    )
CHECK_TYPE_SIZE("long long"     SIZEOF_LONG_LONG   )
CHECK_TYPE_SIZE("uint"          SIZEOF_UINT        )
CHECK_TYPE_SIZE("void *"        SIZEOF_VPTR        )

#SET(QUEUE      calendar) #Calendar Queue
#SET(QUEUE      heap) #Push/Down Heap
SET(QUEUE       splay) #Splay Tree

#SET(MAPPING      none)
#SET(MAPPING       linear)
#SET(MAPPING      rrobin)

SET(RAND           clcg4)
OPTION(RAND_NORMAL "Turn on state for normal distribution" ON)

#MEMORY is either on or off depending on whether or not we desire
#memory buffers.  If it's not set to YES, it defaults to NO
OPTION(MEMORY	  "ROSS Memory Buffers (membufs)"     ON)
SET(MEMORY        YES)

OPTION(TIMING	   "Perform ROSS timings"	ON)

OPTION(WITH_NETDMF "NetDMF support"             OFF)

OPTION(WITH_ROSSNET "Build ROSS.Net?"		OFF)

SET(NETWORK       mpi)
#SET(NETWORK      tcp)
#SET(NETWORK      none)

# Pthread support is depreciate!
#SET(THREAD       pthread)
#SET(THREAD        none)

SET(GVT           mpi_allreduce)
#SET(GVT          7oclock)
#SET(GVT          none)

SET(VALID_ARCH NO)
SET(ARCH $ENV{ARCH} CACHE STRING "Target architecture")
MARK_AS_ADVANCED(ARCH)
IF(NOT ARCH)
	MESSAGE(FATAL_ERROR
		"ARCH not defined!\n"
		"Please set ARCH to be one of (i386 | bgl | bgp | x86_64 | ppc64)")
ENDIF(NOT ARCH)

IF(ARCH STREQUAL i386)
        SET(VALID_ARCH YES)
        #SET(CC	 mpicc)
        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall")
        ADD_DEFINITIONS(-D_GNU_SOURCE)
        SET(CLOCK       i386)
ENDIF(ARCH STREQUAL i386)

IF(ARCH STREQUAL bgl)
       SET(VALID_ARCH YES)
       #SET(CC   mpixlc)
       #SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0")
       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qflag=i:i -qattr=full -O5")
       SET(OPTIONS "-qtune=440 -qarch=440d")
       SET(CLOCK   bgl)
ENDIF(ARCH STREQUAL bgl)

IF(ARCH STREQUAL bgp)
       SET(VALID_ARCH YES)
       #SET(CC   mpixlc)
       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qflag=i:i -qattr=full -O5")
       SET(OPTIONS "-qtune=450 -qarch=450d")
       SET(CLOCK   bgl)
ENDIF(ARCH STREQUAL bgp)

IF(ARCH STREQUAL ppc64)
       SET(VALID_ARCH YES)
       #SET(CC   mpicc)
       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall")
       ADD_DEFINITIONS(-D_GNU_SOURCE)
       # For using Unity on a 64-bit platform
       ADD_DEFINITIONS(-DUNITY_INCLUDE_64)
       SET(CLOCK       ppc)
ENDIF(ARCH STREQUAL ppc64)

IF(ARCH STREQUAL x86_64)
        SET(VALID_ARCH YES)
        #SET(CC	 mpicc)
        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O6 -Wall")
        SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
        ADD_DEFINITIONS(-D_GNU_SOURCE)
        # For using Unity on a 64-bit platform
        ADD_DEFINITIONS(-DUNITY_INCLUDE_64)	
        SET(CLOCK       amd64)
ENDIF(ARCH STREQUAL x86_64)

IF(NOT VALID_ARCH)
       MESSAGE(FATAL_ERROR
		"ARCH not valid!\n"<commit_msg>This is a slightly cleaner way to do what we want I think.<commit_after>PROJECT(ROSS_TOP)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
ENABLE_TESTING()

SET(CMAKE_INSTALL_PREFIX /)

INCLUDE(CTest)

INCLUDE(CheckTypeSize)
CHECK_TYPE_SIZE("short"         SIZEOF_SHORT       )
CHECK_TYPE_SIZE("int"           SIZEOF_INT         )
CHECK_TYPE_SIZE("float"         SIZEOF_FLOAT       )
CHECK_TYPE_SIZE("double"        SIZEOF_DOUBLE      )
CHECK_TYPE_SIZE("long"          SIZEOF_LONG        )
CHECK_TYPE_SIZE("long int"      SIZEOF_LONG_INT    )
CHECK_TYPE_SIZE("long long"     SIZEOF_LONG_LONG   )
CHECK_TYPE_SIZE("uint"          SIZEOF_UINT        )
CHECK_TYPE_SIZE("void *"        SIZEOF_VPTR        )

#SET(QUEUE      calendar) #Calendar Queue
#SET(QUEUE      heap) #Push/Down Heap
SET(QUEUE       splay) #Splay Tree

#SET(MAPPING      none)
#SET(MAPPING       linear)
#SET(MAPPING      rrobin)

SET(RAND           clcg4)
OPTION(RAND_NORMAL "Turn on state for normal distribution" ON)

#MEMORY is either on or off depending on whether or not we desire
#memory buffers.  If it's not set to YES, it defaults to NO
OPTION(MEMORY	  "ROSS Memory Buffers (membufs)"     ON)
SET(MEMORY        YES)

OPTION(TIMING	   "Perform ROSS timings"	ON)

OPTION(WITH_NETDMF "NetDMF support"             OFF)

OPTION(WITH_ROSSNET "Build ROSS.Net?"		OFF)

SET(NETWORK       mpi)
#SET(NETWORK      tcp)
#SET(NETWORK      none)

# Pthread support is depreciate!
#SET(THREAD       pthread)
#SET(THREAD        none)

SET(GVT           mpi_allreduce)
#SET(GVT          7oclock)
#SET(GVT          none)

SET(VALID_ARCH NO)
SET(ARCH $ENV{ARCH} CACHE STRING "Target architecture")
MARK_AS_ADVANCED(ARCH)
IF(NOT ARCH)
	MESSAGE(FATAL_ERROR
		"ARCH not defined!\n"
		"Please set ARCH to be one of (i386 | bgl | bgp | x86_64 | ppc64)")
ENDIF(NOT ARCH)

IF(ARCH STREQUAL i386)
        SET(VALID_ARCH YES)
        #SET(CC	 mpicc)
        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall")
        ADD_DEFINITIONS(-D_GNU_SOURCE)
        SET(CLOCK       i386)
ENDIF(ARCH STREQUAL i386)

IF(ARCH STREQUAL bgl)
       SET(VALID_ARCH YES)
       #SET(CC   mpixlc)
       #SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0")
       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qflag=i:i -qattr=full -O5")
       SET(OPTIONS "-qtune=440 -qarch=440d")
       SET(CLOCK   bgl)
ENDIF(ARCH STREQUAL bgl)

IF(ARCH STREQUAL bgp)
       SET(VALID_ARCH YES)
       #SET(CC   mpixlc)
       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qflag=i:i -qattr=full -O5")
       SET(OPTIONS "-qtune=450 -qarch=450d")
       SET(CLOCK   bgl)
ENDIF(ARCH STREQUAL bgp)

IF(ARCH STREQUAL ppc64)
       SET(VALID_ARCH YES)
       #SET(CC   mpicc)
       SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall")
       ADD_DEFINITIONS(-D_GNU_SOURCE)
       # For using Unity on a 64-bit platform
       ADD_DEFINITIONS(-DUNITY_INCLUDE_64)
       SET(CLOCK       ppc)
ENDIF(ARCH STREQUAL ppc64)

IF(ARCH STREQUAL x86_64)
        SET(VALID_ARCH YES)
        #SET(CC	 mpicc)
        #SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O6 -Wall")
        SET(CMAKE_BUILD_TYPE Release)
        SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
        ADD_DEFINITIONS(-D_GNU_SOURCE)
        # For using Unity on a 64-bit platform
        ADD_DEFINITIONS(-DUNITY_INCLUDE_64)	
        SET(CLOCK       amd64)
ENDIF(ARCH STREQUAL x86_64)

IF(NOT VALID_ARCH)
       MESSAGE(FATAL_ERROR
		"ARCH not valid!\n"
{'fraction_non_alphanumeric': 0.09945750452079566, 'fraction_numerical': 0.018083182640144666, 'mean_word_length': 2.805619266055046, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3546214', 'n_tokens_mistral': 2732, 'n_tokens_neox': 2503, 'n_words': 551}