P LATEFORME H2OLAB Réunion Projet MICAS Equipe SAGE Nadir SOUALEM - [email protected] 1...
-
Upload
lisette-bertin -
Category
Documents
-
view
124 -
download
6
Transcript of P LATEFORME H2OLAB Réunion Projet MICAS Equipe SAGE Nadir SOUALEM - [email protected] 1...
PLATEFORME H2OLABRéunion Projet MICAS
Equipe SAGE
Nadir SOUALEM - [email protected]
1
Pla
tefo
rme H
2O
LA
B
PLAN
Portage Windows-Linux Problèmes Rencontrés Applications portées sous Linux
Outil de génération Cmake Exemple d’utilisation Configuration Génération Ctest
Travaux en cours et objectifs
2
Pla
tefo
rme H
2O
LA
B
PORTAGE: PROBLÈMES RENCONTRÉS
Problèmes de références sur les objetsvoid FOO ( Point & A);Point (double a1, double a2);
Erreurs Syntaxiques: Template de template
error: '>>' should be '> >' within a nested template argument list
Mauvaise utilisation FOO(Point(a1,a2));
3
Pla
tefo
rme H
2O
LA
B
Mauvaise utilisationvector<Point<int>>
u(20);
Bonne utilisationPoint A=Point(a1,a2); FOO (A);
Bonne utilisationvector<Point<int> >
u(20);
PORTAGE: PROBLÈMES RENCONTRÉS
Méthodes non paramétrées d’une classe mère appelée dans une classe filletemplate <class T> class Base { int f(); };template < class T> class Derived : Base<T> { int g() { return f(); }; };
4
Pla
tefo
rme H
2O
LA
B
Solutionthis->f()
ou Base<T>::f()
PORTAGE: PROBLÈMES RENCONTRÉS Erreurs liées aux conversions de type
size_t m = size_t(-1); //Plus grand entier codable en machine
double n = m;
32 bitsm=4294967295n =4294967295
64 bitsm=18446744073709551615n=18446744073709552000
5
Pla
tefo
rme H
2O
LA
B
PORTAGE: PROBLÈMES RENCONTRÉS Headers non-standard:conio.h, tchar.h,
_mkdir, _chdir , _ getch int _getch() {
struct termios oldt, newt; int ch; tcgetattr( STDIN_FILENO, &oldt ); newt = oldt; newt.c_lflag &= ~( ICANON | ECHO ); tcsetattr( STDIN_FILENO, TCSANOW, &newt ); ch = getchar(); tcsetattr( STDIN_FILENO, TCSANOW, &oldt ); return ch;
} Problèmes liés à l’exécution: outil logiciel Valgrind
Fuite mémoire: valgrind --leak-check=yes prog arg1 arg2
Variables non initialisées: --track-origins=yes Exemple de rapport présent sur la forge
6
Pla
tefo
rme H
2O
LA
B
PORTAGE DES APPLICATIONS Logiciels portés sous Linux
Ensemble des librairies PARADIS MP_FRAC_D2 MP_FRAC_D2_FLOW MP_FRAC_D3 MP_FRAC_D3_FLOW MS_FRAC
Ajout dans la forge de SDK-eclipse Software Eclipse 3.4.1 Plugin SVN intégré Documentation d’installation
Introduction de CMake7
Pla
tefo
rme H
2O
LA
B
OUTILS LOGICELS: CMAKE
C'est un logiciel qui est: développé par Kitware Opensource Multiplatforme (Unix/Mac/Windows)
Principe: génération de fichiers de construction standards Makefiles sous Unix/Linux/Mac Projet Visual Studio C++sous Windows
8
Pla
tefo
rme H
2O
LA
B
CMAKE EXEMPLE: PROJET FEM
SOLVER
EDP
SIMULATIONsimulation1.{cpp,h}simulation2.{cpp,h}simulation.cppmain()
9
Pla
tefo
rme H
2O
LA
B
solver1.{cpp,h}, solver2.{cpp,h}libSolver
edp1.{cpp,h}, edp2.{cpp,h}libEdp
Simulation
Link
FEM
CONFIGURATION : CMAKELISTS.TXT FEM - CMakeLists.txt
PROJECT(FEM)PROJECT(FEM)
SUBDIRS(SOLVER EDP SIMULATION)SUBDIRS(SOLVER EDP SIMULATION)
INCLUDE_DIRECTORIES(INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/SOLVER${CMAKE_SOURCE_DIR}/SOLVER
${CMAKE_SOURCE_DIR}/EDP${CMAKE_SOURCE_DIR}/EDP
${CMAKE_SOURCE_DIR}/SIMULATION)${CMAKE_SOURCE_DIR}/SIMULATION)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/ libSET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/ lib))
SOLVER - CMakeLists.txtADD_LIBRARY(Solver solver1.cpp solver2.cpp)ADD_LIBRARY(Solver solver1.cpp solver2.cpp)
EDP - CMakeLists.txtADD_LIBRARY(Edp edp1.cpp edp2.cpp)ADD_LIBRARY(Edp edp1.cpp edp2.cpp)
SIMULATION - CMakeLists.txtADD_EXECUTABLE(Simulation simulation1.cpp simulation2.cpp)ADD_EXECUTABLE(Simulation simulation1.cpp simulation2.cpp)
TARGET_LINK_LIBRARIES(Solver Edp)TARGET_LINK_LIBRARIES(Solver Edp)10
Pla
tefo
rme H
2O
LA
B
GÉNÉRATION: LIBRAIRIES ET EXECUTABLES
En mode Debugcmake . DCMAKE_BUILD_TYPE=Debugmake
En mode Releasecmake . DCMAKE_BUILD_TYPE=Releasemake
Possibilité d’installation Out-Sourcing (à discuter)cmake . DCMAKE_BUILD_TYPE=Releasemakemake install
11
Pla
tefo
rme H
2O
LA
B
OUTILS LOGICIELS: CTEST
Inclus dans CMake Execution de tests
Couverture de code g++ -fprofile-arcs -ftest-coverage
Couplage avec Valgrind FEM - CMakeLists.txt
PROJECT(FEM)PROJECT(FEM)
SUBDIRS(SOLVER EDP EXEMPLE)SUBDIRS(SOLVER EDP EXEMPLE)
ENABLE_TESTING()ENABLE_TESTING()
……
SIMULATION - CMakeLists.txtADD_EXECUTABLE(Simulation simulation1.cpp simulation2.cpp)ADD_EXECUTABLE(Simulation simulation1.cpp simulation2.cpp)
TARGET_LINK_LIBRARIES(Solver Edp)TARGET_LINK_LIBRARIES(Solver Edp)
ADD_TEST(test1 Simulation)ADD_TEST(test1 Simulation)
ADD_TEST(test2 Simulation)ADD_TEST(test2 Simulation)
12
Pla
tefo
rme H
2O
LA
B
AUTOMATISATION DES TESTS
Création d’un script testing.sh avec authentification ssh #!/bin/bashcd $HYDROLAB_ROOT/svnsvn updatecmake .makectest -D Experimental
Automatisation à l’aide de crontab(Unix) ou Taches planifiées(Windows)30 19 * * 1-5 sh
/udd/nsoualem/testing.sh 13
Pla
tefo
rme H
2O
LA
B
TRAVAUX EN COURS ET OBJECTIFS Travaux en cours
Passage définitif à gcc 4.3 Portage d’Isthmus Rédaction d’une documentation développeur
Unix/Windows avec l’introduction des Règles de codage
Objectifs Ctest pour les tests de non-régression (à définir) Visualisation OPENGL Portage de Porous Fracture Paramétrage de Cmake pour Windows Mise à jour des librairies extérieures
Mise a jour de blas->GotoBlas Ajouter CholMod(SuiteSparse)
Userguide (tutorial)14
Pla
tefo
rme H
2O
LA
B