Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
333 changed files
with
1,716 additions
and
3,337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
## | ||
## SPIRAL License | ||
## | ||
## Copyright (c) 2018, Carnegie Mellon University | ||
## All rights reserved. | ||
## | ||
## See LICENSE file for full information | ||
## | ||
|
||
cmake_minimum_required(VERSION ${CMAKE_MINIMUM_REQUIRED_VERSION}) | ||
|
||
## Determine various configuration properties to create necessary inputs for launch/batch scripts | ||
|
||
string (COMPARE EQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}" "AMD64" INTEL_WIN) | ||
string (COMPARE EQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}" "x86_64" INTEL_LINUX) | ||
string (COMPARE EQUAL "${CMAKE_HOST_SYSTEM_PROCESSOR}" "armv7l" ARM_LINUX) | ||
|
||
|
||
if (${INTEL_WIN} OR ${INTEL_LINUX}) | ||
## Intel architecture, SupportedCPU = Core_AVX | ||
set (CPU_ARCH_TYPE "Core_AVX") | ||
set (CPU_FREQUENCY 2195) | ||
set (SPIRAL_MEMORY_POOL "2048m") | ||
elseif (${ARM_LINUX}) | ||
## Raspberry Pi, SupportedCPU = armv7l | ||
set (CPU_ARCH_TYPE "ARMV7L") | ||
set (CPU_FREQUENCY 1500) | ||
set (SPIRAL_MEMORY_POOL "1024m") | ||
elseif (${CMAKE_HOST_APPLE}) | ||
## Apple ... MacBook | ||
set (CPU_ARCH_TYPE "Core_AVX") | ||
set (CPU_FREQUENCY 2195) | ||
set (SPIRAL_MEMORY_POOL "2048m") | ||
endif () | ||
|
||
if (WIN32) | ||
## Windows ... now determine which C compiler we're using... | ||
string (COMPARE EQUAL "${CMAKE_C_COMPILER_ID}" "Intel" ICC_COMPILER) | ||
string (COMPARE EQUAL "${CMAKE_C_COMPILER_ID}" "GNU" GCC_COMPILER) | ||
set(SPIRAL_OS_NAME "Windows8") | ||
if (${ICC_COMPILER}) | ||
## Intel ICC compiler | ||
set (USE_COMPILER_ICC "true") | ||
set (USE_COMPILER_GCC "false") | ||
set (PROFILER_TARGET "win-x64-icc") | ||
elseif (${GNU_COMPILER}) | ||
## GNU C compiler | ||
set (USE_COMPILER_ICC "false") | ||
set (USE_COMPILER_GCC "true") | ||
set (PROFILER_TARGET "win-x86-gcc") | ||
else () | ||
## Default to Visual Studio | ||
set (USE_COMPILER_ICC "false") | ||
set (USE_COMPILER_GCC "false") | ||
set (PROFILER_TARGET "win-x86-vcc") | ||
endif () | ||
|
||
elseif (${ARM_LINUX}) | ||
## Raspberry Pi | ||
## Use GDB as debugger, --args ==> arguments after program name are for debugged process | ||
set (PROFILER_TARGET "linux-arm-gcc") | ||
set (PROFILE_TARGET_ID "linux_arm_gcc") | ||
set (SPIRAL_OS_NAME "ArmLinux") | ||
set (SPIRAL_COMPILER_NAME "GnuC_ARM") | ||
set (SPIRAL_DEBUGGER_NAME "gdb --args") | ||
|
||
elseif (${CMAKE_HOST_APPLE}) | ||
## Apple ... MacBook | ||
## Use LLDB as debugger, requires --arch, and "--" after program name to identify program arguments | ||
set (PROFILER_TARGET "darwin-x86") | ||
set (PROFILE_TARGET_ID "linux_x86_gcc") | ||
set (SPIRAL_OS_NAME "Linux64") | ||
set (SPIRAL_COMPILER_NAME "GnuC") | ||
set (SPIRAL_DEBUGGER_NAME "lldb --arch x86_64") | ||
set (SPIRAL_CMD_ARGS_FLAG "--") | ||
|
||
elseif (${INTEL_WIN} OR ${INTEL_LINUX}) | ||
## Linux ... | ||
## Use GDB as debugger, --args ==> arguments after program name are for debugged process | ||
set (PROFILER_TARGET "linux-x86") | ||
set (PROFILE_TARGET_ID "linux_x86_gcc") | ||
set (SPIRAL_OS_NAME "Linux64") | ||
set (SPIRAL_COMPILER_NAME "GnuC") | ||
set (SPIRAL_DEBUGGER_NAME "gdb --args") | ||
|
||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
## | ||
## SPIRAL License | ||
## | ||
## Copyright (c) 2018, Carnegie Mellon University | ||
## All rights reserved. | ||
## | ||
## See LICENSE file for full information | ||
## | ||
|
||
cmake_minimum_required(VERSION ${CMAKE_MINIMUM_REQUIRED_VERSION}) | ||
|
||
## include(FindUnixCommands) | ||
|
||
## GAP shell script name | ||
if (WIN32) | ||
file (TO_NATIVE_PATH ${SPIRAL_SOURCE_DIR}/spiral.bat TEST_GAP_EXEC_NAME) | ||
else () | ||
include(FindUnixCommands) | ||
file (TO_NATIVE_PATH ${SPIRAL_SOURCE_DIR}/spiral TEST_GAP_EXEC_NAME ) | ||
endif () | ||
|
||
## Define a function to add a test target, given a test name. The assumption | ||
## is that all targets are executed by invoking Spiral, redirecting input | ||
## from a test file and waiting until its done. The test script source file | ||
## is assumed to be in the [current] subdirectory (parameter subdir) and has | ||
## the same name as the test, appended with ".g". | ||
|
||
function (my_add_test_target testname subdir) | ||
file (TO_NATIVE_PATH ${TESTS_SOURCE_DIR}/${subdir}/${testname}.g _scrpt) | ||
if (BASH) | ||
add_test (NAME ${testname} | ||
COMMAND ${BASH} -c "${TEST_GAP_EXEC_NAME} < ${_scrpt}" | ||
) | ||
else () | ||
if (WIN32) | ||
add_test (NAME ${testname} | ||
COMMAND ${TEST_GAP_EXEC_NAME} < ${_scrpt} | ||
) | ||
else () | ||
message(FATAL_ERROR "Unknown shell command for ${CMAKE_HOST_SYSTEM_NAME}") | ||
endif () | ||
endif () | ||
|
||
endfunction () | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# This file is generated by CMake and will be overwritten if you | ||
# re-run make install | ||
|
||
if not IsBound(LocalConfig) then | ||
#Print("\nLoading spiral\n"); | ||
Load(spiral); | ||
fi; | ||
|
||
LoadPackage("arep"); | ||
|
||
LocalConfig.cpuinfo := CopyFields(SupportedCPUs.@CPU_ARCH_TYPE@, rec( | ||
freq := @CPU_FREQUENCY@ | ||
)); | ||
|
||
LocalConfig.osinfo := SupportedOSs.@SPIRAL_OS_NAME@; | ||
|
||
SpiralDefaults.profile := spiral.profiler.default_profiles.@PROFILE_TARGET_ID@; | ||
|
||
LocalConfig.compilerinfo := SupportedCompilers.@SPIRAL_COMPILER_NAME@; | ||
|
Oops, something went wrong.