Commit 3b104c28 authored by Cedric Robert's avatar Cedric Robert
Browse files

Merge branch 'fixmyissue' of https://github.com/F2I-Consulting/fespp.git into fixmyissue

parents fe83fb2d 5c81aea2
......@@ -39,7 +39,7 @@ IF (ParaView_SOURCE_DIR)
# we are building from within ParaView Source. The environment is already set.
# Nothing more to do.
ELSE (ParaView_SOURCE_DIR)
find_package(ParaView)
find_package(ParaView REQUIRED)
include("${PARAVIEW_USE_FILE}")
include (ParaViewPlugins)
......@@ -54,6 +54,15 @@ ENDIF (ParaView_SOURCE_DIR)
# -----------------------------------------------------------------------------
pv_process_modules()
# ============================================================================
# compilation options
# ============================================================================
# Build with Multiple Processes on windows
IF (WIN32)
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
ENDIF (WIN32)
# -----------------------------------------------------------------------------
# Build the Paraview plugins
# -----------------------------------------------------------------------------
......
# - Try to find the LM_SENSORS library.
#
# The following are set after configuration is done:
# FESAPI_DIR
......@@ -8,8 +6,11 @@ IF(NOT FESAPI_FOUND)
find_path(FESAPI_INCLUDE NAMES common/EpcDocument.h
PATHS ${FESAPI_DIR}/include/)
find_library(FESAPI_LIBRARY NAMES libFesapiCppUnderDev.so
find_library(FESAPI_LIBRARY NAMES FesapiCpp.0.11.1.1 FesapiCpp
PATHS ${FESAPI_DIR}/lib/)
if(NOT FESAPI_LIBRARY)
message(FATAL_ERROR "FESAPI library not found")
endif()
mark_as_advanced(FESAPI_INCLUDE FESAPI_LIBRARY)
......
1. BUILD ParaView with MPI enabled (known to work on Linux with ParaView 5.4.1)
2. BUILD Fesapi (with static linking on HDF5 libraries) v0.11.1.1 : https://github.com/F2I-Consulting/fesapi/releases/tag/v0.11.1.1
3. CONFIGURE Fespp with CMAKE
You should fill in the following variables
* FESAPI_DIR:PATH=../install
A FindFesapi script will automatically use the above variable to set the FESAPI_INCLUDE and FESAPI_LIBRARY variables (visible in advanced mode)
* ParaView_DIR:PATH=../PV5-4_Build/install/lib/cmake/paraview-5.4 (or, on windows, the cmake build directory of your built paraview from source)
* If Qt has been built with ParaView, Qt5_DIR:PATH=../PV5-4_Build/install/lib/cmake/Qt5 else you should reference to your own Qt version (for example C:/Users/Philippe/appli/qt/Qt5.9.5/5.9.5/msvc2013_64/lib/cmake/Qt5)
4. GENERATE the build solution with CMAKE once the CONFIGURE step is OK
5. BUILD the solution generated by CMAKE
6. COPY the folllowing built libraries in the Paraview bin folder. On Linux
* <span>libFesapiCpp.so</span> (from Fesapi built)
* libFesapiCpp.so.0.11 (from Fesapi built)
* libFesapiCpp.so.0.11.1 (from Fesapi built)
* <span>libFespp.so</span> (from Fespp built)
or on Windows
* <span>FesapiCpp.0.11.1.1.dll</span> (from Fesapi built)
* <span>Fespp.dll</span> (from Fespp built)
7. Run the Paraview server (Caution : use **MPI** build of ParaView!!!) : mpirun -np 8 ./pvserver
8. Run the Paraview client : ./paraview
9. Connect the Client to the Server
On client side : File->Connect... and then fill in the required fields.
10. Loading of the Fespp plugins (**on both client and server sides!!!**)
Menu Tools->Manage plugins...and then select and Load <span>libFespp.so</span>
11. You can now load a RESQML file (epc document)
* via epc load manager (icon)
Partial object support and improved memory management (only what is visualized)
* standard File->open file
No partial object support and all data are loaded in memory even if not wisualized.
1 - BUILD ParaView avec prise en charge MPI (tester avec ParaView 5.4.1)
2 - BUILD FESAPI (avec HDF5 en static) v0.11.1.1 https://github.com/F2I-Consulting/fesapi/releases/tag/v0.11.1.1
3 - CONFIGURE avec CMAKE en renseignant les éléments suivants par les bons dossiers.
FESAPI_DIR:PATH=../install
Un FindFesapi récupèrera les éléments suivant (visible en mode advanced):
- Include path = FESAPI_INCLUDE
- Library = FESAPI_LIBRARY
ParaView_DIR:PATH=../PV5-4_Build/install/lib/cmake/paraview-5.4
Si Qt est compilé avec ParaView
Qt5_DIR:PATH=../PV5-4_Build/install/lib/cmake/Qt5
Sinon prenez votre version de Qt
4 - BUILD FESPP
5 - COPY fichier dans le dossier des librairies de ParaView
libFesapiCpp.so
libFesapiCpp.so.0.11
libFesapiCpp.so.0.11.1
libFespp.so
6 - Lancement Server (Attention bien prendre le MPI du build de ParaView)
mpirun -np 8 ./pvserver
7 - Lancement Client
./paraview
8 - Connection Client/server
File->Connect...
renseigner les paramètres du server
9 - chargement Plugin
Tools->Manage plugins...
Load du plugin Fespp sur le server ET sur le client
10- chargement d'un fichier
a - via epc load manager (icône)
Cette version permet de le regroupement de fichiers et gère les objets partiels, le chargement mémoire se fait à la sélection via le Widget "Selection widget"
b - standard File->open file
Cette version ne permet pas de charger les objets partiels et le chargement mémoire se fait en totalité
......@@ -29,10 +29,9 @@ vtkCxxSetObjectMacro(Fespp, Controller, vtkMultiProcessController);
//----------------------------------------------------------------------------
Fespp::Fespp()
Fespp::Fespp() :
FileName(nullptr), Controller(nullptr), loadedFile(false), idProc(0), nbProc(0), countTest(0)
{
FileName = NULL;
SetNumberOfInputPorts(0);
SetNumberOfOutputPorts(1);
......@@ -40,27 +39,24 @@ Fespp::Fespp()
this->uuidList = vtkDataArraySelection::New();
this->Controller = NULL;
this->SetController(vtkMultiProcessController::GetGlobalController());
auto comm = GetMPICommunicator();
this->idProc =0;
this->nbProc =0;
if (comm != MPI_COMM_NULL)
{
MPI_Comm_rank(comm, &this->idProc);
MPI_Comm_size(comm, &this->nbProc);
}
countTest = 0;
countTest = 0;
vtkEpcDocumentSet = nullptr;
}
//----------------------------------------------------------------------------
Fespp::~Fespp()
{
SetFileName(NULL);
SetController(NULL);
SetFileName(nullptr); // Also delete FileName if not nullptr.
SetController(nullptr);
fileNameSet.clear();
uuidList->Delete();
idProc = 0;
......@@ -70,7 +66,6 @@ Fespp::~Fespp()
delete vtkEpcDocumentSet;
vtkEpcDocumentSet = nullptr;
}
countTest = 0;
}
......@@ -92,7 +87,7 @@ int Fespp::GetuuidListArrayStatus(const char* uuid)
//----------------------------------------------------------------------------
void Fespp::SetUuidList(const char* uuid, int status)
{
if (status)
if (status != 0)
{
vtkEpcDocumentSet->visualize(std::string(uuid));
}
......@@ -121,17 +116,17 @@ const char* Fespp::GetuuidListArrayName(int index)
}
//----------------------------------------------------------------------------
MPI_Comm Fespp::GetMPICommunicator()
MPI_Comm Fespp::GetMPICommunicator()
{
MPI_Comm comm = MPI_COMM_NULL;
vtkMPIController *MPIController = vtkMPIController::SafeDownCast(this->Controller);
if (MPIController != NULL)
if (MPIController != nullptr)
{
vtkMPICommunicator *mpiComm = vtkMPICommunicator::SafeDownCast(MPIController->GetCommunicator());
if (mpiComm != NULL)
if (mpiComm != nullptr)
{
comm = *mpiComm->GetMPIComm()->GetHandle();
}
......
......@@ -76,8 +76,6 @@ pqPropertiesPanel* getpqPropertiesPanel()
}
return panel;
}
}
//----------------------------------------------------------------------------
......@@ -99,7 +97,11 @@ void PQSelectionPanel::constructor()
treeWidget->header()->setStretchLastSection(false);
treeWidget->header()->resizeSection(1, 20);
#if QT_VERSION >= 0x050000
treeWidget->header()->setSectionResizeMode(0, QHeaderView::Stretch);
#else
treeWidget->header()->setResizeMode(0, QHeaderView::Stretch);
#endif
treeWidget->expandToDepth(0);
treeWidget->header()->close();
......@@ -845,7 +847,7 @@ pqPipelineSource * PQSelectionPanel::findPipelineSource(const char *SMName)
{
if (strcmp(s->getSMName().toStdString().c_str(), SMName) == 0) return s;
}
return NULL;
return nullptr;
}
//----------------------------------------------------------------------------
......
......@@ -81,17 +81,17 @@ public:
//=============================================================================
QPointer<PQToolsManager> PQToolsManagerInstance = NULL;
QPointer<PQToolsManager> PQToolsManagerInstance = nullptr;
PQToolsManager* PQToolsManager::instance()
{
if (PQToolsManagerInstance == NULL)
if (PQToolsManagerInstance == nullptr)
{
pqApplicationCore* core = pqApplicationCore::instance();
if (!core)
{
qFatal("Cannot use the Tools without an application core instance.");
return NULL;
return nullptr;
}
PQToolsManagerInstance = new PQToolsManager(core);
......@@ -109,7 +109,7 @@ PQToolsManager::PQToolsManager(QObject* p)
// This widget serves no real purpose other than initializing the Actions
// structure created with designer that holds the actions.
this->Internal->ActionPlaceholder = new QWidget(NULL);
this->Internal->ActionPlaceholder = new QWidget(nullptr);
this->Internal->Actions.setupUi(this->Internal->ActionPlaceholder);
this->existEpcPipe = false;
......@@ -208,8 +208,8 @@ QWidget* PQToolsManager::getMainWindow()
{
if (qobject_cast<QMainWindow*>(topWidget))
return topWidget;
}
return NULL;
return nullptr;
}
//-----------------------------------------------------------------------------
......@@ -234,7 +234,7 @@ pqPipelineSource* PQToolsManager::findPipelineSource(const char* SMName)
return s;
}
return NULL;
return nullptr;
}
//-----------------------------------------------------------------------------
......@@ -264,7 +264,7 @@ pqView* PQToolsManager::findView(pqPipelineSource* source, int port, const QStri
}
}
return NULL;
return nullptr;
}
//-----------------------------------------------------------------------------
......
......@@ -26,7 +26,7 @@ void VtkResqml2PolyData::remove(const std::string & uuid)
{
if (uuid == getUuid())
{
vtkOutput = NULL;
vtkOutput = nullptr;
}
else if(uuidToVtkProperty[uuid])
{
......
......@@ -25,7 +25,7 @@ void VtkResqml2StructuredGrid::remove(const std::string & uuid)
{
if (uuid == getUuid())
{
vtkOutput = NULL;
vtkOutput = nullptr;
}
else if(uuidToVtkProperty[uuid])
{
......
......@@ -25,7 +25,7 @@ void VtkResqml2UnstructuredGrid::remove(const std::string & uuid)
{
if (uuid == getUuid())
{
vtkOutput = NULL;
vtkOutput = nullptr;
}
else if(uuidToVtkProperty[uuid])
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment