Skip to content

Commit

Permalink
All: portage craycc
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit128 committed Oct 18, 2024
1 parent 937c1ab commit 6d7fe5e
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 21 deletions.
11 changes: 6 additions & 5 deletions Cassiopee/Compressor/Compressor/sz/src/sz_omp.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/**
* @file sz_omp.c
* @author Xin Liang
* @date July, 2017
Expand All @@ -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
}

Expand Down
Empty file modified Cassiopee/Converter/test/valid
100644 → 100755
Empty file.
42 changes: 42 additions & 0 deletions Cassiopee/Generator/Generator/mmgs_stub.cpp
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/

// 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;
}
2 changes: 1 addition & 1 deletion Cassiopee/Generator/Generator/tetgen_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 3 additions & 1 deletion Cassiopee/Generator/srcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
#==============================================================================
Expand Down
12 changes: 8 additions & 4 deletions Cassiopee/KCore/Dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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']
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion Cassiopee/KCore/KCore/Nuga/include/HX12.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
namespace NUGA
{
template <>
struct splitting_t<K_MESH::Hexahedron, NUGA::Xd, 1> : public splitting_base_t {
class splitting_t<K_MESH::Hexahedron, NUGA::Xd, 1> : public splitting_base_t {
public:
E_Int FACES[10];
E_Int nodes[12];

Expand Down
2 changes: 1 addition & 1 deletion Cassiopee/KCore/KCore/Nuga/include/mesh_t.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ struct mesh_t

// to create a bound mesh from a "parent" mesh
template <bool USTRIDE>
mesh_t(const mesh_t<eGEODIM(GEODIM+1), USTRIDE>& parent_mesh):
mesh_t(const mesh_t<eGEODIM(GEODIM), USTRIDE>& parent_mesh): // modif here for compiling [CB]
crd(crd), localiz(nullptr), neighbors(nullptr), oriented(parent_mesh.oriented)
{
parent_mesh.template get_boundary<FIXSTRIDE>(*this);
Expand Down
1 change: 0 additions & 1 deletion Cassiopee/KCore/KCore/Nuga/include/metric_sensor.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,6 @@ bool metric_sensor<mesh_t>::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);
Expand Down
9 changes: 4 additions & 5 deletions Cassiopee/KCore/KCore/Nuga/include/ngon_t.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,6 @@ struct ngon_t
Vector_t<E_Int> inds;
std::set<E_Int> tmp;

E_Int nb_facets;
nodes_ph(PHi, inds, false); //false to do the shift only once
tmp.insert(inds.begin(), inds.end());

Expand Down Expand Up @@ -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<sz) ; ++j)
for (E_Int j=0; j < sz; ++j)
{
if (process && (*process)[j] == false)
continue;
Expand Down Expand Up @@ -4579,7 +4578,7 @@ E_Int remove_phs(const std::set<E_Int>& 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];
Expand Down Expand Up @@ -4639,7 +4638,7 @@ E_Int remove_phs(const std::set<E_Int>& 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)
{
Expand Down
2 changes: 1 addition & 1 deletion Cassiopee/KCore/KCore/Nuga/include/splitting_t.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace NUGA
};

template <typename ELT_t, NUGA::eDIR dir, short ORDER>
struct splitting_t;
class splitting_t;

///
template <typename arr_t>
Expand Down
2 changes: 1 addition & 1 deletion Cassiopee/KCore/installBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@
'craycxx', # Cppcompiler
[], # CppAdditionalOptions
[], # f77AdditionalOptions
True, # useOMP
False, # useOMP
False, # static
[], # additionalIncludePaths
[], # additionalLibs
Expand Down

0 comments on commit 6d7fe5e

Please sign in to comment.