From e48f7c45e2d96610b7a2f7d76cf1262f242490fd Mon Sep 17 00:00:00 2001 From: benoit128 Date: Fri, 7 Feb 2025 11:13:49 +0100 Subject: [PATCH] CPlot: corr. mesh style, KCore: prep pour tsan --- Cassiopee/CPlot/CPlot/Tk.py | 3 ++- Cassiopee/KCore/Dist.py | 22 +++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Cassiopee/CPlot/CPlot/Tk.py b/Cassiopee/CPlot/CPlot/Tk.py index 20e9d30c6..b19e8721b 100644 --- a/Cassiopee/CPlot/CPlot/Tk.py +++ b/Cassiopee/CPlot/CPlot/Tk.py @@ -892,11 +892,12 @@ def setPrefs(): elif val == 'Scalar': CPlot.setState(mode=3) elif val == 'Vector': CPlot.setState(mode=4) elif i == 'tkViewMeshStyle': + print('val=%s'%val) if val == 'Red wires+solid': style = 0 elif val == 'Multicolor wireframes': style = 1 elif val == 'Multicolor wires+solid': style = 2 elif val == 'Black wires+solid': style = 3 - elif val == 'Multicolor wires+solid2': style = 4 + elif val == 'Black wires+solid2': style = 4 else: style = 0 CPlot.setState(meshStyle=style) elif i == 'tkViewSolidStyle': diff --git a/Cassiopee/KCore/Dist.py b/Cassiopee/KCore/Dist.py index c3dfc7a81..aa9536e5c 100755 --- a/Cassiopee/KCore/Dist.py +++ b/Cassiopee/KCore/Dist.py @@ -2,7 +2,7 @@ import os, sys, distutils.sysconfig, platform, glob, subprocess # Toggle to True for compiling for debug (valgrind, inspector, sanitizer) -DEBUG = False +DEBUG = True # Toggle to True for compiling Cassiopee in i8 EDOUBLEINT = False @@ -896,8 +896,10 @@ def getCArgs(): elif Cppcompiler.find("gcc") == 0 or Cppcompiler.find("g++") == 0: if DEBUG: options += ['-g', '-O0', '-Wall', '-pedantic', '-D_GLIBCXX_DEBUG_PEDANTIC'] - options += ['-ggdb', '-fsanitize=address'] - if mySystem[0] == 'mingw': options.remove('-fsanitize=address') # no asan on mingw + options += ['-ggdb'] + if mySystem[0] != 'mingw': # no asan on mingw + options += ['-fsanitize=address'] + #options += ['-fsanitize=thread'] else: options += ['-DNDEBUG', '-O3', '-Wall', '-Werror=return-type'] if useOMP() == 1: options += ['-fopenmp'] if useStatic() == 1: options += ['--static', '-static-libstdc++', '-static-libgcc'] @@ -980,10 +982,8 @@ def getCppArgs(): opt = getCArgs() try: from KCore.config import Cppcompiler except: from config import Cppcompiler - if Cppcompiler == "icl.exe": - opt += ["/std=c++11"] - else: - opt += ["-std=c++11"] + if Cppcompiler == "icl.exe": opt += ["/std=c++11"] + else: opt += ["-std=c++11"] return opt #============================================================================== @@ -1437,13 +1437,13 @@ def checkElsa(): a2 = os.access(kvar+"/Kernel/lib/"+pvar+'/elsA.x', os.F_OK) b1 = os.access(kvar+"/Dist/include", os.F_OK) b2 = os.access(kvar+"/Dist/bin/"+pvar+'/elsAc.x', os.F_OK) - if (a1 and a2): + if a1 and a2: elsA = True elsAUseMpi = True elsAIncDir = kvar + "/Kernel/include" elsALibDir = kvar + "/Kernel/lib/" + pvar - elif (b1 and b2): + elif b1 and b2: elsA = True elsAUseMpi = True elsAIncDir = kvar + "/Dist/include" @@ -2179,6 +2179,10 @@ def checkCppLibs(additionalLibs=[], additionalLibPaths=[], Cppcompiler=None, if l is None: l = checkLibFile__('libasan.a', additionalLibPaths) if l is not None: libs += ["asan"] + #l = checkLibFile__('libtsan.so*', additionalLibPaths) + #if l is None: + # l = checkLibFile__('libtsan.a', additionalLibPaths) + #if l is not None: libs += ["tsan"] if useOMP: l = checkLibFile__('libgomp.so*', additionalLibPaths)