Skip to content

Commit

Permalink
CPlot: corr. mesh style, KCore: prep pour tsan
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit128 committed Feb 7, 2025
1 parent 258a1c4 commit e48f7c4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
3 changes: 2 additions & 1 deletion Cassiopee/CPlot/CPlot/Tk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
22 changes: 13 additions & 9 deletions Cassiopee/KCore/Dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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']
Expand Down Expand Up @@ -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

#==============================================================================
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e48f7c4

Please sign in to comment.