diff --git a/cmake/OpenfastFortranOptions.cmake b/cmake/OpenfastFortranOptions.cmake index b4cc263b36..61d3ce6e01 100644 --- a/cmake/OpenfastFortranOptions.cmake +++ b/cmake/OpenfastFortranOptions.cmake @@ -158,7 +158,11 @@ macro(set_fast_intel_fortran_posix) # Deal with Double/Single precision if (DOUBLE_PRECISION) add_definitions(-DOPENFAST_DOUBLE_PRECISION) - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -double_size 128") + if("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_GREATER "19") + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -double-size 128") + else() + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -double_size 128") + endif() endif (DOUBLE_PRECISION) # debug flags @@ -204,7 +208,11 @@ macro(set_fast_intel_fortran_windows) # Deal with Double/Single precision if (DOUBLE_PRECISION) add_definitions(-DOPENFAST_DOUBLE_PRECISION) - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /real_size:64 /double_size:128") + if("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_GREATER "19") + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /real-size:64 /double-size:128") + else() + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /real_size:64 /double_size:128") + endif() endif (DOUBLE_PRECISION) # increase the default 2MB stack size to 16 MB diff --git a/modules/aerodyn/src/FVW_Wings.f90 b/modules/aerodyn/src/FVW_Wings.f90 index 431ab3403b..bad06fbce5 100644 --- a/modules/aerodyn/src/FVW_Wings.f90 +++ b/modules/aerodyn/src/FVW_Wings.f90 @@ -175,9 +175,13 @@ subroutine Wings_Panelling(Meshes, p, m, ErrStat, ErrMsg ) DP1 = P6-P8 DP2 = P10-P9 DP3 = P7-P5 + + ! NOTE: The denominator below has seg-faulted with Intel Fortran in Release mode, possibly due to nuances in copmiler optimizations. + ! This code was previously after the m%Norm calculations, but moving it up "fixes" the bug. + m%Tang(1:3,iSpan,iW) = (DP1)/TwoNorm(DP1) ! tangential unit vector, along chord + m%Norm(1:3,iSpan,iW) = cross_product(DP1,DP2) m%Norm(1:3,iSpan,iW) = m%Norm(1:3,iSpan,iW)/TwoNorm(m%Norm(1:3,iSpan,iW)) - m%Tang(1:3,iSpan,iW) = (DP1)/TwoNorm(DP1) ! tangential unit vector, along chord ! m%Tscoord(1:3,iSpan) = (DP3)/norm2(DP3) ! tangential unit vector, along span, follows ref line m%dl (1:3,iSpan,iW) = DP2 m%Orth(1:3,iSpan,iW) = cross_product(m%Norm(1:3,iSpan,iW),m%Tang(1:3,iSpan,iW)) ! orthogonal vector to N and T diff --git a/reg_tests/executeOpenfastLinearRegressionCase.py b/reg_tests/executeOpenfastLinearRegressionCase.py index 11c7671e11..d23937bbfd 100644 --- a/reg_tests/executeOpenfastLinearRegressionCase.py +++ b/reg_tests/executeOpenfastLinearRegressionCase.py @@ -164,6 +164,9 @@ def isclose(a, b, rel_tol=1e-09, abs_tol=0.0): ### Get a list of all the files in the baseline directory baselineOutFiles = os.listdir(targetOutputDirectory) +# Drop the log file, if its listed +if caseName + '.log' in baselineOutFiles: + baselineOutFiles.remove(caseName + '.log') # these should all exist in the local outputs directory localFiles = os.listdir(testBuildDirectory) diff --git a/reg_tests/manualRegressionTest.py b/reg_tests/manualRegressionTest.py index ef63ddfac9..f51b1e5a5c 100644 --- a/reg_tests/manualRegressionTest.py +++ b/reg_tests/manualRegressionTest.py @@ -65,14 +65,20 @@ def strFormat(string): else: with open(os.path.join("r-test", "glue-codes", "openfast", "CaseList.md")) as listfile: caselist = listfile.readlines() +# allow comments with '#' casenames = [c.rstrip("\n\r").strip() for c in caselist if "#" not in c] +# allow empty lines +casenames = [c for c in casenames if len(c.strip()) > 0] results = [] prefix, passString, failString = "executing", "PASS", "FAIL" longestName = max(casenames, key=len) for case in casenames: print(strFormat(prefix).format(prefix), strFormat(longestName+" ").format(case), end="", flush=True) - command = "\"{}\" executeOpenfastRegressionCase.py {} {} {} {} {} {} {} {} {}".format(pythonCommand, case, openfast_executable, sourceDirectory, buildDirectory, tolerance, machine, compiler, plotFlag, noExecFlag) + if "linear" in case.lower(): + command = "\"{}\" executeOpenfastLinearRegressionCase.py {} {} {} {} {} {} {} {} {}".format(pythonCommand, case, openfast_executable, sourceDirectory, buildDirectory, tolerance, machine, compiler, plotFlag, noExecFlag) + else: + command = "\"{}\" executeOpenfastRegressionCase.py {} {} {} {} {} {} {} {} {}".format(pythonCommand, case, openfast_executable, sourceDirectory, buildDirectory, tolerance, machine, compiler, plotFlag, noExecFlag) returnCode = subprocess.call(command, stdout=outstd, shell=True) resultString = passString if returnCode == 0 else failString results.append((case, resultString)) diff --git a/reg_tests/r-test b/reg_tests/r-test index 01f51597b8..4fdfdecfce 160000 --- a/reg_tests/r-test +++ b/reg_tests/r-test @@ -1 +1 @@ -Subproject commit 01f51597b8f058d6f08ec67d7b9aeb4a2ffccaad +Subproject commit 4fdfdecfce5be5da8ee5a37c837804948e6962a7