Skip to content

Commit 5cb2de3

Browse files
author
Roscoe A. Bartlett
committed
Initial move of files into new tribits directory (broken)
This commit is just to provide a basic for doing diffs between commits to see the changes needed to convert to the TriBITS system.
0 parents  commit 5cb2de3

File tree

164 files changed

+35737
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+35737
-0
lines changed

checkin-test.py

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
#!/usr/bin/env python
2+
3+
# @HEADER
4+
# ************************************************************************
5+
#
6+
# Trilinos: An Object-Oriented Solver Framework
7+
# Copyright (2001) Sandia Corporation
8+
#
9+
#
10+
# Copyright (2001) Sandia Corporation. Under the terms of Contract
11+
# DE-AC04-94AL85000, there is a non-exclusive license for use of this
12+
# work by or on behalf of the U.S. Government. Export of this program
13+
# may require a license from the United States Government.
14+
#
15+
# 1. Redistributions of source code must retain the above copyright
16+
# notice, this list of conditions and the following disclaimer.
17+
#
18+
# 2. Redistributions in binary form must reproduce the above copyright
19+
# notice, this list of conditions and the following disclaimer in the
20+
# documentation and/or other materials provided with the distribution.
21+
#
22+
# 3. Neither the name of the Corporation nor the names of the
23+
# contributors may be used to endorse or promote products derived from
24+
# this software without specific prior written permission.
25+
#
26+
# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27+
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29+
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30+
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32+
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33+
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34+
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35+
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37+
#
38+
# NOTICE: The United States Government is granted for itself and others
39+
# acting on its behalf a paid-up, nonexclusive, irrevocable worldwide
40+
# license in this data to reproduce, prepare derivative works, and
41+
# perform publicly and display publicly. Beginning five (5) years from
42+
# July 25, 2001, the United States Government is granted for itself and
43+
# others acting on its behalf a paid-up, nonexclusive, irrevocable
44+
# worldwide license in this data to reproduce, prepare derivative works,
45+
# distribute copies to the public, perform publicly and display
46+
# publicly, and to permit others to do so.
47+
#
48+
# NEITHER THE UNITED STATES GOVERNMENT, NOR THE UNITED STATES DEPARTMENT
49+
# OF ENERGY, NOR SANDIA CORPORATION, NOR ANY OF THEIR EMPLOYEES, MAKES
50+
# ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR
51+
# RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY
52+
# INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS
53+
# THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
54+
#
55+
# ************************************************************************
56+
# @HEADER
57+
58+
"""
59+
Script for doing checkin testing of Trilinos. Please run checkin-test.py -h
60+
for details
61+
"""
62+
63+
64+
#
65+
# Import commands
66+
#
67+
68+
69+
import sys
70+
import os
71+
import traceback
72+
73+
scriptsDir = os.path.abspath(os.path.dirname(sys.argv[0]))+"/cmake/python"
74+
sys.path.insert(0, scriptsDir)
75+
76+
from GeneralScriptSupport import *
77+
78+
#
79+
# Read in the commandline arguments
80+
#
81+
82+
#print "sys.argv:", sys.argv
83+
84+
# Create a deep copy of the commandline arguments
85+
cmndLineArgs = []
86+
cmndLineArgs.extend(sys.argv)
87+
88+
# See if the help option is set or not
89+
helpOpt = len( set(cmndLineArgs) & set(("--help", "-h")) ) > 0
90+
91+
# See if --show-defaults was set or not
92+
showDefaultsOpt = len( set(cmndLineArgs) & set(("--show-defaults", "dummy")) ) > 0
93+
94+
#
95+
# Forward the options but tee the output
96+
#
97+
98+
if (not helpOpt) and (not showDefaultsOpt):
99+
logFileName = "checkin-test.out"
100+
else:
101+
logFileName = ""
102+
103+
cmnd = scriptsDir+"/checkin-test-impl.py " + requoteCmndLineArgs(sys.argv[1:])
104+
105+
if logFileName:
106+
cmnd = cmnd + " 2>&1 | tee "+logFileName
107+
108+
# This return value is always 0 even if it fails?
109+
rtnVal = echoRunSysCmnd(cmnd, throwExcept=False)
110+
111+
# Grep the output to determine success or failure
112+
success = True
113+
if logFileName and getCmndOutput("grep 'REQUESTED ACTIONS: PASSED' "+logFileName, True, False)=="":
114+
success = False
115+
116+
if success:
117+
sys.exit(0)
118+
else:
119+
sys.exit(1)

config_tests/BLASMangling.cmake

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# @HEADER
2+
# ************************************************************************
3+
#
4+
# Trilinos: An Object-Oriented Solver Framework
5+
# Copyright (2001) Sandia Corporation
6+
#
7+
#
8+
# Copyright (2001) Sandia Corporation. Under the terms of Contract
9+
# DE-AC04-94AL85000, there is a non-exclusive license for use of this
10+
# work by or on behalf of the U.S. Government. Export of this program
11+
# may require a license from the United States Government.
12+
#
13+
# 1. Redistributions of source code must retain the above copyright
14+
# notice, this list of conditions and the following disclaimer.
15+
#
16+
# 2. Redistributions in binary form must reproduce the above copyright
17+
# notice, this list of conditions and the following disclaimer in the
18+
# documentation and/or other materials provided with the distribution.
19+
#
20+
# 3. Neither the name of the Corporation nor the names of the
21+
# contributors may be used to endorse or promote products derived from
22+
# this software without specific prior written permission.
23+
#
24+
# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
25+
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27+
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
28+
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30+
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31+
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32+
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33+
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35+
#
36+
# NOTICE: The United States Government is granted for itself and others
37+
# acting on its behalf a paid-up, nonexclusive, irrevocable worldwide
38+
# license in this data to reproduce, prepare derivative works, and
39+
# perform publicly and display publicly. Beginning five (5) years from
40+
# July 25, 2001, the United States Government is granted for itself and
41+
# others acting on its behalf a paid-up, nonexclusive, irrevocable
42+
# worldwide license in this data to reproduce, prepare derivative works,
43+
# distribute copies to the public, perform publicly and display
44+
# publicly, and to permit others to do so.
45+
#
46+
# NEITHER THE UNITED STATES GOVERNMENT, NOR THE UNITED STATES DEPARTMENT
47+
# OF ENERGY, NOR SANDIA CORPORATION, NOR ANY OF THEIR EMPLOYEES, MAKES
48+
# ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR
49+
# RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY
50+
# INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS
51+
# THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
52+
#
53+
# ************************************************************************
54+
# @HEADER
55+
56+
# Function that defines variables describing the BLAS name mangling convention
57+
#
58+
# Sets the following outputs on success:
59+
#
60+
# BLAS_FN_CASE
61+
# "UPPER" if names are translated to upper-case,
62+
# "LOWER" otherwise.
63+
#
64+
# BLAS_FN_UNDERSCORE
65+
# "NO_UNDER" if nothing is appended, "UNDER" if
66+
# one underscore is appended, and "SECOND_UNDER"
67+
# if a function with an underscore has a second
68+
# appended.
69+
#
70+
# BLAS_FUNC_DEFAULT
71+
# The default mange mangling for Fortran functions
72+
# that do not contain an underscore.
73+
#
74+
# The Fortran 2003 name binding facilities and ISO_C_BINDING module
75+
# should be preferred over cpp macro trickery whenever possible.
76+
#
77+
FUNCTION(BLAS_MANGLING)
78+
79+
IF(NOT DEFINED BLAS_FN_CASE)
80+
81+
IF (Trilinos_VERBOSE_CONFIGURE)
82+
MESSAGE("BLAS_MANGLING: Testing name Mangling Schemes!\n")
83+
ENDIF()
84+
85+
FIND_FILE(_blascmakelists blasmangle/ ${CMAKE_MODULE_PATH})
86+
IF (NOT _blascmakelists)
87+
MESSAGE(STATUS "Error, the file blasmangle could not be found so we can not determine Fortran name mangling!")
88+
RETURN()
89+
ENDIF()
90+
91+
SET(_fcmangledir ${PROJECT_BINARY_DIR}/CMakeFiles/CMakeTmp/blasmangle)
92+
FILE(MAKE_DIRECTORY ${_fcmangledir})
93+
94+
FOREACH(cdef LOWER UPPER)
95+
96+
FOREACH(udef UNDER NO_UNDER)
97+
98+
IF (Trilinos_VERBOSE_CONFIGURE)
99+
MESSAGE("BLAS_MANGLING: Testing ${cdef} ${udef}\n\n")
100+
ENDIF()
101+
102+
SET(_fcmangledir_case "${_fcmangledir}/${cdef}/${udef}")
103+
FILE(MAKE_DIRECTORY "${_fcmangledir}/${cdef}")
104+
FILE(MAKE_DIRECTORY ${_fcmangledir_case})
105+
106+
TRY_COMPILE(_blasmngl ${_fcmangledir_case} ${_blascmakelists} blasmangle
107+
CMAKE_FLAGS "-DMANGLE_FLAGS:STRING=-DFC_FN_${cdef};-DFC_FN_${udef}"
108+
OUTPUT_VARIABLE _blasmngl_output
109+
)
110+
IF (Trilinos_VERBOSE_CONFIGURE)
111+
MESSAGE("${_blasmngl_output}\n\n")
112+
ENDIF()
113+
114+
IF(_blasmngl)
115+
IF (Trilinos_VERBOSE_CONFIGURE)
116+
MESSAGE("BLAS_MANGLING: Bingo! ${cdef} ${udef} is the correct BLAS name mangling!\n")
117+
ENDIF()
118+
SET(BLAS_FN_CASE ${cdef} CACHE INTERNAL
119+
"Case used by Fortran functions" FORCE)
120+
SET(BLAS_FN_UNDERSCORE ${udef} CACHE INTERNAL
121+
"Underscore convention used by Fortran functions" FORCE)
122+
BREAK()
123+
ENDIF()
124+
125+
ENDFOREACH()
126+
127+
IF(_blasmngl)
128+
BREAK()
129+
ENDIF()
130+
131+
ENDFOREACH()
132+
133+
IF(_blasmngl)
134+
MESSAGE(STATUS "BLAS name mangling: ${BLAS_FN_CASE} ${BLAS_FN_UNDERSCORE}")
135+
ELSE()
136+
MESSAGE(STATUS "Warning, cannot automatically determine BLAS mangling.")
137+
ENDIF()
138+
139+
ENDIF()
140+
141+
IF (BLAS_FN_CASE STREQUAL LOWER)
142+
SET(BLAS_NAME_NAME name)
143+
ELSEIF (BLAS_FN_CASE STREQUAL UPPER)
144+
SET(BLAS_NAME_NAME NAME)
145+
ENDIF()
146+
147+
IF (BLAS_FN_UNDERSCORE)
148+
IF(BLAS_FN_UNDERSCORE STREQUAL "UNDER")
149+
SET(BLAS_FUNC_DEFAULT "(name,NAME) ${BLAS_NAME_NAME} ## _" CACHE INTERNAL "")
150+
ELSE()
151+
SET(BLAS_FUNC_DEFAULT "(name,NAME) ${BLAS_NAME_NAME}" CACHE INTERNAL "")
152+
ENDIF()
153+
ENDIF()
154+
155+
ENDFUNCTION()

0 commit comments

Comments
 (0)