Skip to content

Commit 31c79b4

Browse files
authored
Merge pull request #1157 from arcaneframework/dev/sdc-fix-for-VS15-2017-build
Fix framework Windows build with VS 15 2017
2 parents 53947ef + 4df83c6 commit 31c79b4

File tree

25 files changed

+322
-170
lines changed

25 files changed

+322
-170
lines changed

alien/ArcaneInterface/cmake/LoadAlienPackages.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ endif ()
1515

1616
loadPackage(NAME MPI ESSENTIAL)
1717
loadPackage(NAME Boost ESSENTIAL)
18-
loadPackage(NAME GTest ESSENTIAL)
18+
loadPackage(NAME GTest)
1919

2020
set(MPI_ROOT ${MPI_ROOT_PATH})
2121

alien/ArcaneInterface/modules/arcane_tools/src/alien/arcane_tools/block/BlockBuilder.cc

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1-
/* Author : desrozis at Thu Mar 14 12:29:22 2013
2-
* Generated by createNew
3-
*/
1+
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2+
//-----------------------------------------------------------------------------
3+
// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4+
// See the top-level COPYRIGHT file for details.
5+
// SPDX-License-Identifier: Apache-2.0
6+
//-----------------------------------------------------------------------------
7+
/*---------------------------------------------------------------------------*/
8+
/* BlockBuilder (C) 2000-2024 */
9+
/* */
10+
/* Builder for block matrices */
11+
/*---------------------------------------------------------------------------*/
12+
/*---------------------------------------------------------------------------*/
413

514
#include <alien/utils/Precomp.h>
615
#include "alien/arcane_tools/IIndexManager.h"

alien/ArcaneInterface/modules/arcane_tools/src/alien/arcane_tools/block/BlockBuilder.h

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
1-
// -*- C++ -*-
1+
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2+
//-----------------------------------------------------------------------------
3+
// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4+
// See the top-level COPYRIGHT file for details.
5+
// SPDX-License-Identifier: Apache-2.0
6+
//-----------------------------------------------------------------------------
7+
/*---------------------------------------------------------------------------*/
8+
/* BlockBuilder (C) 2000-2024 */
9+
/* */
10+
/* Builder for block matrices */
11+
/*---------------------------------------------------------------------------*/
12+
/*---------------------------------------------------------------------------*/
13+
214
#pragma once
315

416
#include <alien/utils/Precomp.h>
17+
#include <alien/AlienArcaneToolsExport.h>
18+
519
#include "alien/arcane_tools/block/BlockSizes.h"
620

721
/*---------------------------------------------------------------------------*/
@@ -19,11 +33,11 @@ class IIndexManager;
1933
/*---------------------------------------------------------------------------*/
2034
/*---------------------------------------------------------------------------*/
2135

22-
class ALIEN_EXPORT BlockBuilder
36+
class ALIEN_ARCANE_TOOLS_EXPORT BlockBuilder
2337
{
2438
public:
2539

26-
class SizeVector
40+
class ALIEN_ARCANE_TOOLS_EXPORT SizeVector
2741
{
2842
public:
2943
SizeVector(BlockBuilder& block_Builder, ConstArrayView<Integer> indexes);

alien/ArcaneInterface/modules/arcane_tools/src/alien/arcane_tools/block/BlockSizes.cc

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1-
/* Author : desrozis at Thu Mar 14 12:29:22 2013
2-
* Generated by createNew
3-
*/
1+
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2+
//-----------------------------------------------------------------------------
3+
// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4+
// See the top-level COPYRIGHT file for details.
5+
// SPDX-License-Identifier: Apache-2.0
6+
//-----------------------------------------------------------------------------
7+
/*---------------------------------------------------------------------------*/
8+
/* BlockSizes (C) 2000-2024 */
9+
/* */
10+
/* Size info for block matrices */
11+
/*---------------------------------------------------------------------------*/
12+
/*---------------------------------------------------------------------------*/
413

514
#include <alien/utils/Precomp.h>
615
#include <alien/arcane_tools/IIndexManager.h>

alien/ArcaneInterface/modules/arcane_tools/src/alien/arcane_tools/block/BlockSizes.h

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
// -*- C++ -*-
1+
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2+
//-----------------------------------------------------------------------------
3+
// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4+
// See the top-level COPYRIGHT file for details.
5+
// SPDX-License-Identifier: Apache-2.0
6+
//-----------------------------------------------------------------------------
7+
/*---------------------------------------------------------------------------*/
8+
/* BlockSizes (C) 2000-2024 */
9+
/* */
10+
/* Size info for block matrices */
11+
/*---------------------------------------------------------------------------*/
12+
/*---------------------------------------------------------------------------*/
213
#pragma once
314

415
#include <alien/utils/Precomp.h>

alien/ArcaneInterface/modules/external_packages/src/alien/kernels/hypre/HypreBackEnd.h

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
// -*- C++ -*-
1+
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2+
//-----------------------------------------------------------------------------
3+
// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4+
// See the top-level COPYRIGHT file for details.
5+
// SPDX-License-Identifier: Apache-2.0
6+
//-----------------------------------------------------------------------------
7+
/*---------------------------------------------------------------------------*/
8+
/* MTLBackEnd (C) 2000-2024 */
9+
/* */
10+
/* Tools for Hypre backend */
11+
/*---------------------------------------------------------------------------*/
12+
/*---------------------------------------------------------------------------*/
213
#ifndef ALIEN_KERNELS_HYPRE_HYPREBACKEND_H
314
#define ALIEN_KERNELS_HYPRE_HYPREBACKEND_H
4-
/* Author : havep at Fri Jul 20 17:03:16 2012
5-
* Generated by createNew
6-
*/
715

816
#include <alien/core/backend/BackEnd.h>
917

alien/ArcaneInterface/modules/external_packages/src/alien/kernels/mtl/MTLBackEnd.h

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
1+
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2+
//-----------------------------------------------------------------------------
3+
// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4+
// See the top-level COPYRIGHT file for details.
5+
// SPDX-License-Identifier: Apache-2.0
6+
//-----------------------------------------------------------------------------
7+
/*---------------------------------------------------------------------------*/
8+
/* MTLBackEnd (C) 2000-2024 */
9+
/* */
10+
/* Tools for MTL backend */
11+
/*---------------------------------------------------------------------------*/
12+
/*---------------------------------------------------------------------------*/
113
#ifndef ALIEN_MTLIMPL_MTLBACKEND_H
214
#define ALIEN_MTLIMPL_MTLBACKEND_H
3-
/* Author : mesriy at Tue Jul 24 15:56:45 2012
4-
* Generated by createNew
5-
*/
15+
616

717
#include <alien/core/backend/BackEnd.h>
818
#include <alien/utils/Precomp.h>
19+
#include <alien/AlienExternalPackagesExport.h>
920

1021
namespace Arccore::MessagePassing {
1122
class IMessagePassingMng;
@@ -27,7 +38,7 @@ class Space;
2738
template <class Matrix, class Vector> class IInternalLinearAlgebra;
2839
template <class Matrix, class Vector> class IInternalLinearSolver;
2940

30-
extern IInternalLinearAlgebra<MTLMatrix, MTLVector>* MTLInternalLinearAlgebraFactory();
41+
extern ALIEN_EXTERNAL_PACKAGES_EXPORT IInternalLinearAlgebra<MTLMatrix, MTLVector>* MTLInternalLinearAlgebraFactory();
3142

3243
extern IInternalLinearSolver<MTLMatrix, MTLVector>* MTLInternalLinearSolverFactory(
3344
Arccore::MessagePassing::IMessagePassingMng* p_mng, IOptionsMTLLinearSolver* options);

alien/ArcaneInterface/modules/external_packages/src/alien/kernels/petsc/PETScBackEnd.h

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
1-
// -*- C++ -*-
1+
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2+
//-----------------------------------------------------------------------------
3+
// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4+
// See the top-level COPYRIGHT file for details.
5+
// SPDX-License-Identifier: Apache-2.0
6+
//-----------------------------------------------------------------------------
7+
/*---------------------------------------------------------------------------*/
8+
/* MTLBackEnd (C) 2000-2024 */
9+
/* */
10+
/* Tools for PETSc backend */
11+
/*---------------------------------------------------------------------------*/
12+
/*---------------------------------------------------------------------------*/
213
#ifndef ALIEN_PETSCIMPL_PETSCBACKEND_H
314
#define ALIEN_PETSCIMPL_PETSCBACKEND_H
4-
/* Author : havep at Fri Jul 20 17:03:16 2012
5-
* Generated by createNew
6-
*/
15+
716

817
#include <alien/core/backend/BackEnd.h>
918
#include <alien/utils/Precomp.h>
19+
#include <alien/AlienExternalPackagesExport.h>
1020

1121
/*---------------------------------------------------------------------------*/
1222
/*---------------------------------------------------------------------------*/
@@ -32,7 +42,7 @@ class Space;
3242
template <class Matrix, class Vector> class IInternalLinearAlgebra;
3343
template <class Matrix, class Vector> class IInternalLinearSolver;
3444

35-
extern IInternalLinearAlgebra<PETScMatrix, PETScVector>*
45+
extern ALIEN_EXTERNAL_PACKAGES_EXPORT IInternalLinearAlgebra<PETScMatrix, PETScVector>*
3646
PETScInternalLinearAlgebraFactory(
3747
Arccore::MessagePassing::IMessagePassingMng* p_mng = nullptr);
3848

alien/ArcaneInterface/modules/interface_c/src/CMakeLists.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ endif ()
1919

2020
linkLibraries(alien_interface_c Alien::alien_core alien_external_packages)
2121

22-
if (TARGET intel)
23-
linkLibraries(gtest.refmvhandlers intel)
24-
endif ()
25-
2622
if (TARGET alien_external_packages)
2723
linkLibraries(alien_interface_c
2824
alien_external_packages
@@ -53,3 +49,5 @@ install(DIRECTORY alien
5349
DESTINATION include
5450
FILES_MATCHING PATTERN "*.h"
5551
)
52+
53+
target_compile_definitions(alien_interface_c PRIVATE alien_core_EXPORTS)

alien/ArcaneInterface/modules/interface_c/src/alien/c/alienc.cc

+27-23
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
/*
2-
* alienc.h
3-
*
4-
* Created on: Nov 25, 2020
5-
* Author: gratienj
6-
*/
7-
8-
1+
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2+
//-----------------------------------------------------------------------------
3+
// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4+
// See the top-level COPYRIGHT file for details.
5+
// SPDX-License-Identifier: Apache-2.0
6+
//-----------------------------------------------------------------------------
7+
/*---------------------------------------------------------------------------*/
8+
/* alienc (C) 2000-2024 */
9+
/* */
10+
/* Interface C for alien */
11+
/*---------------------------------------------------------------------------*/
12+
/*---------------------------------------------------------------------------*/
913
#include <mpi.h>
1014
#include <assert.h>
1115
#include <memory>
@@ -540,28 +544,28 @@ extern "C" {
540544

541545
#include "alien/c/alienc.h"
542546

543-
ALIEN_INTERFACE_C_EXPORT int ALIEN_init([[maybe_unused]] int argc,[[maybe_unused]] char** argv)
547+
int ALIEN_init(int argc, char** argv)
544548
{
545549
AlienManager::initialize() ;
546550
return 0 ;
547551
}
548552

549-
ALIEN_INTERFACE_C_EXPORT int ALIEN_create_linear_system(MPI_Comm comm)
553+
int ALIEN_create_linear_system(MPI_Comm comm)
550554
{
551555
auto* alien_mng = AlienManager::instance() ;
552556
assert(alien_mng!=nullptr) ;
553557
return alien_mng->createNewLinearSystem(comm) ;
554558
}
555559

556-
ALIEN_INTERFACE_C_EXPORT int ALIEN_destroy_linear_system(int system_id)
560+
int ALIEN_destroy_linear_system(int system_id)
557561
{
558562
auto* alien_mng = AlienManager::instance() ;
559563
assert(alien_mng!=nullptr) ;
560564
return alien_mng->destroyLinearSystem(system_id) ;
561565
}
562566

563567

564-
ALIEN_INTERFACE_C_EXPORT int ALIEN_init_linear_system(int system_id,
568+
int ALIEN_init_linear_system(int system_id,
565569
int global_nrows,
566570
int local_nrows,
567571
uid_type* row_uids,
@@ -583,7 +587,7 @@ extern "C" {
583587
return 0 ;
584588
}
585589

586-
ALIEN_INTERFACE_C_EXPORT int ALIEN_define_matrix_profile(int system_id,
590+
int ALIEN_define_matrix_profile(int system_id,
587591
int local_nrows,
588592
uid_type* row_uids,
589593
int* row_offset,
@@ -600,7 +604,7 @@ extern "C" {
600604
return 0 ;
601605
}
602606

603-
ALIEN_INTERFACE_C_EXPORT int ALIEN_set_matrix_values(int system_id,
607+
int ALIEN_set_matrix_values(int system_id,
604608
int local_nrows,
605609
uid_type* row_uids,
606610
int* row_offset,
@@ -620,7 +624,7 @@ extern "C" {
620624
return 0 ;
621625
}
622626

623-
ALIEN_INTERFACE_C_EXPORT int ALIEN_set_rhs_values(int system_id,
627+
int ALIEN_set_rhs_values(int system_id,
624628
int local_nrows,
625629
uid_type* row_uids,
626630
double const* values)
@@ -633,7 +637,7 @@ extern "C" {
633637
return 0 ;
634638
}
635639

636-
ALIEN_INTERFACE_C_EXPORT int ALIEN_get_solution_values(int system_id,
640+
int ALIEN_get_solution_values(int system_id,
637641
int local_nrows,
638642
uid_type* row_uids,
639643
double* values)
@@ -646,15 +650,15 @@ extern "C" {
646650
return 0 ;
647651
}
648652

649-
ALIEN_INTERFACE_C_EXPORT int ALIEN_create_solver(MPI_Comm comm,const char* config_file)
653+
int ALIEN_create_solver(MPI_Comm comm,const char* config_file)
650654
{
651655
auto* alien_mng = AlienManager::instance() ;
652656
assert(alien_mng!=nullptr) ;
653657
return alien_mng->createNewLinearSolver(comm,config_file) ;
654658
}
655659

656660

657-
ALIEN_INTERFACE_C_EXPORT int ALIEN_init_solver(int solver_id,int argc, char** argv)
661+
int ALIEN_init_solver(int solver_id,int argc, char** argv)
658662
{
659663
auto* alien_mng = AlienManager::instance() ;
660664
assert(alien_mng!=nullptr) ;
@@ -664,7 +668,7 @@ extern "C" {
664668
}
665669

666670

667-
ALIEN_INTERFACE_C_EXPORT int ALIEN_init_solver_with_configfile(int solver_id,const char* path)
671+
int ALIEN_init_solver_with_configfile(int solver_id,const char* path)
668672
{
669673
auto* alien_mng = AlienManager::instance() ;
670674
assert(alien_mng!=nullptr) ;
@@ -674,15 +678,15 @@ extern "C" {
674678
return 0 ;
675679
}
676680

677-
ALIEN_INTERFACE_C_EXPORT int ALIEN_destroy_solver(int solver_id)
681+
int ALIEN_destroy_solver(int solver_id)
678682
{
679683
auto* alien_mng = AlienManager::instance() ;
680684
assert(alien_mng!=nullptr) ;
681685
alien_mng->destroyLinearSolver(solver_id) ;
682686
return 0 ;
683687
}
684688

685-
ALIEN_INTERFACE_C_EXPORT int ALIEN_solve(int solver_id, int system_id)
689+
int ALIEN_solve(int solver_id, int system_id)
686690
{
687691
auto* alien_mng = AlienManager::instance() ;
688692
assert(alien_mng!=nullptr) ;
@@ -693,7 +697,7 @@ extern "C" {
693697
return solver->solve(system->getA(),system->getB(),system->getX()) ;
694698
}
695699

696-
ALIEN_INTERFACE_C_EXPORT int ALIEN_get_solver_status(int solver_id, ALIEN_Solver_Status* status)
700+
int ALIEN_get_solver_status(int solver_id, ALIEN_Solver_Status* status)
697701
{
698702
auto* alien_mng = AlienManager::instance() ;
699703
assert(alien_mng!=nullptr) ;
@@ -702,7 +706,7 @@ extern "C" {
702706
return 0 ;
703707
}
704708

705-
ALIEN_INTERFACE_C_EXPORT int ALIEN_finalize()
709+
int ALIEN_finalize()
706710
{
707711
AlienManager::finalize() ;
708712
return 0 ;

0 commit comments

Comments
 (0)