From 6d7fe5e3c17ac706ed74679bb395678a0f991c18 Mon Sep 17 00:00:00 2001 From: benoit128 Date: Fri, 18 Oct 2024 17:25:28 +0200 Subject: [PATCH] All: portage craycc --- .../Compressor/Compressor/sz/src/sz_omp.c | 11 ++--- Cassiopee/Converter/test/valid | 0 Cassiopee/Generator/Generator/mmgs_stub.cpp | 42 +++++++++++++++++++ Cassiopee/Generator/Generator/tetgen_stub.cpp | 2 +- Cassiopee/Generator/srcs.py | 4 +- Cassiopee/KCore/Dist.py | 12 ++++-- Cassiopee/KCore/KCore/Nuga/include/HX12.hxx | 3 +- Cassiopee/KCore/KCore/Nuga/include/mesh_t.hxx | 2 +- .../KCore/Nuga/include/metric_sensor.hxx | 1 - Cassiopee/KCore/KCore/Nuga/include/ngon_t.hxx | 9 ++-- .../KCore/KCore/Nuga/include/splitting_t.hxx | 2 +- Cassiopee/KCore/installBase.py | 2 +- 12 files changed, 69 insertions(+), 21 deletions(-) mode change 100644 => 100755 Cassiopee/Converter/test/valid create mode 100644 Cassiopee/Generator/Generator/mmgs_stub.cpp diff --git a/Cassiopee/Compressor/Compressor/sz/src/sz_omp.c b/Cassiopee/Compressor/Compressor/sz/src/sz_omp.c index 362b6bf69..fd90a76b0 100644 --- a/Cassiopee/Compressor/Compressor/sz/src/sz_omp.c +++ b/Cassiopee/Compressor/Compressor/sz/src/sz_omp.c @@ -1,4 +1,4 @@ -/** + /** * @file sz_omp.c * @author Xin Liang * @date July, 2017 @@ -15,10 +15,11 @@ double sz_wtime(){ #ifdef _OPENMP return omp_get_wtime(); #else - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - - return (double)ts.tv_sec + (double)ts.tv_nsec / 1000000000.0; + // only posix + //struct timespec ts; + //clock_gettime(CLOCK_MONOTONIC, &ts); + //return (double)ts.tv_sec + (double)ts.tv_nsec / 1000000000.0; + return 0.; #endif } diff --git a/Cassiopee/Converter/test/valid b/Cassiopee/Converter/test/valid old mode 100644 new mode 100755 diff --git a/Cassiopee/Generator/Generator/mmgs_stub.cpp b/Cassiopee/Generator/Generator/mmgs_stub.cpp new file mode 100644 index 000000000..125fd0281 --- /dev/null +++ b/Cassiopee/Generator/Generator/mmgs_stub.cpp @@ -0,0 +1,42 @@ +/* + Copyright 2013-2024 Onera. + + This file is part of Cassiopee. + + Cassiopee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Cassiopee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Cassiopee. If not, see . +*/ + +// Remaillage surfacique avec mmgs + +#include "generator.h" +#include "MMGS/mmgs.h" + +using namespace std; +using namespace K_FLD; +using namespace K_FUNC; + +// ============================================================================ +/* MMGS + IN: maillage TRI + IN: eventuellement metric ou solution + IN: + IN: + OUT: maillage TRI remaille. */ +// ============================================================================ +PyObject* K_GENERATOR::mmgs(PyObject* self, PyObject* args) +{ + PyErr_SetString(PyExc_TypeError, + "mmgs: Generator was not installed with mmgs."); + return NULL; +} diff --git a/Cassiopee/Generator/Generator/tetgen_stub.cpp b/Cassiopee/Generator/Generator/tetgen_stub.cpp index d9b9ba950..8133950c2 100644 --- a/Cassiopee/Generator/Generator/tetgen_stub.cpp +++ b/Cassiopee/Generator/Generator/tetgen_stub.cpp @@ -26,6 +26,6 @@ using namespace K_FLD; PyObject* K_GENERATOR::tetgen(PyObject* self, PyObject* args) { PyErr_SetString(PyExc_TypeError, - "tetgen: Generator was not installed with tetgen."); + "tetgen: Generator was not installed with tetgen."); return NULL; } diff --git a/Cassiopee/Generator/srcs.py b/Cassiopee/Generator/srcs.py index feaa859c1..0a12918c2 100644 --- a/Cassiopee/Generator/srcs.py +++ b/Cassiopee/Generator/srcs.py @@ -190,7 +190,9 @@ "Generator/MMGS/zaldy_s.c", "Generator/MMGS/mmgexterns.c", "Generator/MMGS/mmgsexterns.c"] - +else: + cpp_srcs2 += ["Generator/mmgs_stub.cpp"] + #============================================================================== # Fichiers fortran #============================================================================== diff --git a/Cassiopee/KCore/Dist.py b/Cassiopee/KCore/Dist.py index 3517ea8e9..edf07c9ee 100644 --- a/Cassiopee/KCore/Dist.py +++ b/Cassiopee/KCore/Dist.py @@ -945,7 +945,7 @@ def getCArgs(): elif Cppcompiler == "craycc" or Cppcompiler == "craycxx": if DEBUG: options += ['-g', '-O0', '-Wall', '-D_GLIBCXX_DEBUG_PEDANTIC'] else: options += ['-DNDEBUG', '-O3', '-Wall'] - if useOMP() == 1: options += ['-h omp'] + if useOMP() == 1: options += ['-fopenmp'] if useStatic() == 1: options += ['--static', '-static-libstdc++', '-static-libgcc'] else: options += ['-fPIC'] options += getSimdOptions() @@ -1064,7 +1064,7 @@ def getForArgs(): else: options += ['-fPIC'] if DEBUG: options += ['-g', '-O0'] else: options += ['-O3'] - if useOMP() == 1: options += ['-h omp'] + if useOMP() == 1: options += ['-fopenmp'] options += getSimdOptions() if EDOUBLEINT: options += ['-i8'] return options @@ -1100,7 +1100,7 @@ def getLinkArgs(): elif Cppcompiler == 'craycc' or Cppcompiler == 'craycxx': if useStatic() == 1: out += ['-static'] else: out += ['-shared'] - if useOMP() == 1: out += ['-h omp'] + if useOMP() == 1: out += ['-fopenmp'] mySystem = getSystem()[0] if mySystem == 'Darwin': if useStatic() == 0: out += ['-dynamiclib'] @@ -2251,7 +2251,11 @@ def checkCppLibs(additionalLibs=[], additionalLibPaths=[], Cppcompiler=None, l = checkLibFile__('libcraymp.a', additionalLibPaths) if l is not None: libs += ['craymp']; paths += [l] - + l = checkLibFile__('libsci_cray.so*', additionalLibPaths) + if l is None: + l = checkLibFile__('libsci_cray.a', additionalLibPaths) + if l is not None: + libs += ['sci_cray']; paths += [l] if useOMP: l = checkLibFile__('libomp.so*', additionalLibPaths) if l is None: diff --git a/Cassiopee/KCore/KCore/Nuga/include/HX12.hxx b/Cassiopee/KCore/KCore/Nuga/include/HX12.hxx index 6ffd29680..22be49bf2 100755 --- a/Cassiopee/KCore/KCore/Nuga/include/HX12.hxx +++ b/Cassiopee/KCore/KCore/Nuga/include/HX12.hxx @@ -29,7 +29,8 @@ namespace NUGA { template <> - struct splitting_t : public splitting_base_t { + class splitting_t : public splitting_base_t { + public: E_Int FACES[10]; E_Int nodes[12]; diff --git a/Cassiopee/KCore/KCore/Nuga/include/mesh_t.hxx b/Cassiopee/KCore/KCore/Nuga/include/mesh_t.hxx index 5b97b7c9d..c4fa404ad 100644 --- a/Cassiopee/KCore/KCore/Nuga/include/mesh_t.hxx +++ b/Cassiopee/KCore/KCore/Nuga/include/mesh_t.hxx @@ -704,7 +704,7 @@ struct mesh_t // to create a bound mesh from a "parent" mesh template - mesh_t(const mesh_t& parent_mesh): + mesh_t(const mesh_t& parent_mesh): // modif here for compiling [CB] crd(crd), localiz(nullptr), neighbors(nullptr), oriented(parent_mesh.oriented) { parent_mesh.template get_boundary(*this); diff --git a/Cassiopee/KCore/KCore/Nuga/include/metric_sensor.hxx b/Cassiopee/KCore/KCore/Nuga/include/metric_sensor.hxx index 21aff7ceb..cd8f4d1e8 100755 --- a/Cassiopee/KCore/KCore/Nuga/include/metric_sensor.hxx +++ b/Cassiopee/KCore/KCore/Nuga/include/metric_sensor.hxx @@ -1191,7 +1191,6 @@ bool metric_sensor::FIX_BOT_TOP(E_Int PHi, E_Int nei, output_t& adap_inc FIX: fix_alpha_beta(PHi, nei, adap_incr); - end: bool has_changed = !(adap_incr.cell_adap_incr[PHi].n[0] == ao && adap_incr.cell_adap_incr[PHi].n[1] == bo && adap_incr.cell_adap_incr[PHi].n[2] == co); diff --git a/Cassiopee/KCore/KCore/Nuga/include/ngon_t.hxx b/Cassiopee/KCore/KCore/Nuga/include/ngon_t.hxx index 3c87d4b6d..ab52ac639 100644 --- a/Cassiopee/KCore/KCore/Nuga/include/ngon_t.hxx +++ b/Cassiopee/KCore/KCore/Nuga/include/ngon_t.hxx @@ -1368,7 +1368,6 @@ struct ngon_t Vector_t inds; std::set tmp; - E_Int nb_facets; nodes_ph(PHi, inds, false); //false to do the shift only once tmp.insert(inds.begin(), inds.end()); @@ -1441,9 +1440,9 @@ struct ngon_t E_Float P[3]; - E_Int sz = PGs.size(), err(0); + E_Int sz = PGs.size(); - for (E_Int j=0; (j& PHslist) for (E_Int j = 0; j < nb_pgs; ++j) { const E_Int& Kn = *(pKn + j); - E_Int Fn = *(pFn + j) - 1; + //E_Int Fn = *(pFn + j) - 1; if (Kn == IDX_NONE) continue; E_Int attracK = (attractor[Kn] == IDX_NONE)? Kn : attractor[Kn]; @@ -4639,7 +4638,7 @@ E_Int remove_phs(const std::set& PHslist) for (size_t j = 0; j < nb_pgs; ++j) { const E_Int& Kn = *(pKn + j); - E_Int Fn = *(pFn + j) - 1; + //E_Int Fn = *(pFn + j) - 1; assert(K != Kn); if (Kn == IDX_NONE) { diff --git a/Cassiopee/KCore/KCore/Nuga/include/splitting_t.hxx b/Cassiopee/KCore/KCore/Nuga/include/splitting_t.hxx index 83c21b8c6..3de183c6c 100755 --- a/Cassiopee/KCore/KCore/Nuga/include/splitting_t.hxx +++ b/Cassiopee/KCore/KCore/Nuga/include/splitting_t.hxx @@ -53,7 +53,7 @@ namespace NUGA }; template - struct splitting_t; + class splitting_t; /// template diff --git a/Cassiopee/KCore/installBase.py b/Cassiopee/KCore/installBase.py index 53a0a4ac0..efd8a2b76 100644 --- a/Cassiopee/KCore/installBase.py +++ b/Cassiopee/KCore/installBase.py @@ -719,7 +719,7 @@ 'craycxx', # Cppcompiler [], # CppAdditionalOptions [], # f77AdditionalOptions -True, # useOMP +False, # useOMP False, # static [], # additionalIncludePaths [], # additionalLibs