joboog / r2ogs6

R-API to the multiphysics simulator OpenGeoSys 6. THIS IS A MIRROR OF: https://gitlab.opengeosys.org/ogs/tools/r2ogs6
https://joboog.github.io/r2ogs6/
GNU General Public License v3.0
2 stars 0 forks source link

Unable to import *.pvd #1

Open ldecicco-USGS opened 10 months ago

ldecicco-USGS commented 10 months ago

I'm having trouble running the simulation. I'm not 100% sure I have everything installed correctly. First, I don't have access to "conda", so I can't use the installation instructions exactly.

In my Terminal, I ran:

pip install numpy
pip install vtk
> ogs6_run_simulation(ogs6_obj)
Error in ogs6_read_output_files(ogs6_obj = ogs6_obj) : 
  Output file not written out correctly.
                    Unable to import *.pvd

Does this message ring a bell that some installation is not done correctly?

joboog commented 9 months ago

Sorry for the late reply.

It seems that there is a problem with the VTK library, which version did you install? You really need to install VTK v8.2.0 as shown on the README.

ldecicco-USGS commented 9 months ago

My organization doesn't allow us to use conda, so I had tried this first:

pip install vtk==8.2.0
ERROR: Could not find a version that satisfies the requirement vtk==8.2.0 (from versions: 9.2.4, 9.2.5, 9.2.6, 9.3.0rc1, 9.3.0rc2, 9.3.0, 9.3.20230807rc0)
ERROR: No matching distribution found for vtk==8.2.0

Are there other ways to get 8.2.0, I'm only seeing the conda instructions? I'm on Windows.

joboog commented 9 months ago

It seems like VTK abandoned v8.2.0 from PyPi. I will try to make VTK v9.3.0 work.

Could you try VTK v8.1.2 instead?

ldecicco-USGS commented 9 months ago

The only versions I can install are: 9.2.4, 9.2.5, 9.2.6, 9.3.0rc1, 9.3.0rc2, 9.3.0, 9.3.20230807rc0

Sorry my computer is locked down so hard, it's been a recent change that we've had and I'm not use to the limitations...

joboog commented 8 months ago

Hi @ldecicco-USGS ,

I think I misunderstood the cause, sorry. The problem is not VTK it is the actual OGS version which is not supported by r2ogs6 yet. Please uninstall ogs and install version 6.4.4. You can use vtk==9.3.0.

pip uninstall ogs
pip install ogs==6.4.4
ldecicco-USGS commented 8 months ago

My path now is:

...\AppData\Roaming\Python\Python311\site-packages\ogs\bin

The only exe that looks right is OGS2VTK.exe...does that sound OK?

options("r2ogs6.default_ogs6_bin_path" = "C:/Users/ldecicco/AppData/Roaming/Python/Python311/site-packages/ogs/bin/OGS2VTK.exe")

When I run that, I'm getting:

ogs6_run_simulation(ogs6_obj)
PARSE ERROR: Argument: C:/Users/ldecicco/AppData/Local/Temp/1/RtmpyOIgFm/my_simulation.prj
             Couldn't find match for argument

Brief USAGE: 
   C:\Users\ldecicco\AppData\Roaming\Python\PYTHON~1\SITE-P~1\ogs\bin\OGS2V
                                        TK.exe  [--ascii_output] -o <file
                                        name of output mesh> -i <file name
                                        of input mesh> [--] [--version]
                                        [-h]

For complete USAGE and HELP type: 
   C:\Users\ldecicco\AppData\Roaming\Python\PYTHON~1\SITE-P~1\ogs\bin\OGS2VTK.exe --help

Error in ogs6_read_output_files(ogs6_obj = ogs6_obj) : 
  Output file not written out correctly.
                    Unable to import *.pvd

These are the files in that bin folder, is there something else I should use in the "r2ogs6.default_ogs6_bin_path"?

list.files(path = "C:/Users/ldecicco/AppData/Roaming/Python/Python311/site-packages/ogs/bin/")
  [1] "addDataToRaster.exe"                                     
  [2] "AddElementQuality.exe"                                   
  [3] "AddFaultToVoxelGrid.exe"                                 
  [4] "AddLayer.exe"                                            
  [5] "api-ms-win-core-console-l1-1-0.dll"                      
  [6] "api-ms-win-core-console-l1-2-0.dll"                      
  [7] "api-ms-win-core-datetime-l1-1-0.dll"                     
  [8] "api-ms-win-core-debug-l1-1-0.dll"                        
  [9] "api-ms-win-core-errorhandling-l1-1-0.dll"                
 [10] "api-ms-win-core-fibers-l1-1-0.dll"                       
 [11] "api-ms-win-core-file-l1-1-0.dll"                         
 [12] "api-ms-win-core-file-l1-2-0.dll"                         
 [13] "api-ms-win-core-file-l2-1-0.dll"                         
 [14] "api-ms-win-core-handle-l1-1-0.dll"                       
 [15] "api-ms-win-core-heap-l1-1-0.dll"                         
 [16] "api-ms-win-core-interlocked-l1-1-0.dll"                  
 [17] "api-ms-win-core-libraryloader-l1-1-0.dll"                
 [18] "api-ms-win-core-localization-l1-2-0.dll"                 
 [19] "api-ms-win-core-memory-l1-1-0.dll"                       
 [20] "api-ms-win-core-namedpipe-l1-1-0.dll"                    
 [21] "api-ms-win-core-processenvironment-l1-1-0.dll"           
 [22] "api-ms-win-core-processthreads-l1-1-0.dll"               
 [23] "api-ms-win-core-processthreads-l1-1-1.dll"               
 [24] "api-ms-win-core-profile-l1-1-0.dll"                      
 [25] "api-ms-win-core-rtlsupport-l1-1-0.dll"                   
 [26] "api-ms-win-core-string-l1-1-0.dll"                       
 [27] "api-ms-win-core-synch-l1-1-0.dll"                        
 [28] "api-ms-win-core-synch-l1-2-0.dll"                        
 [29] "api-ms-win-core-sysinfo-l1-1-0.dll"                      
 [30] "api-ms-win-core-timezone-l1-1-0.dll"                     
 [31] "api-ms-win-core-util-l1-1-0.dll"                         
 [32] "api-ms-win-crt-conio-l1-1-0.dll"                         
 [33] "api-ms-win-crt-convert-l1-1-0.dll"                       
 [34] "api-ms-win-crt-environment-l1-1-0.dll"                   
 [35] "api-ms-win-crt-filesystem-l1-1-0.dll"                    
 [36] "api-ms-win-crt-heap-l1-1-0.dll"                          
 [37] "api-ms-win-crt-locale-l1-1-0.dll"                        
 [38] "api-ms-win-crt-math-l1-1-0.dll"                          
 [39] "api-ms-win-crt-multibyte-l1-1-0.dll"                     
 [40] "api-ms-win-crt-private-l1-1-0.dll"                       
 [41] "api-ms-win-crt-process-l1-1-0.dll"                       
 [42] "api-ms-win-crt-runtime-l1-1-0.dll"                       
 [43] "api-ms-win-crt-stdio-l1-1-0.dll"                         
 [44] "api-ms-win-crt-string-l1-1-0.dll"                        
 [45] "api-ms-win-crt-time-l1-1-0.dll"                          
 [46] "api-ms-win-crt-utility-l1-1-0.dll"                       
 [47] "appendLinesAlongPolyline.exe"                            
 [48] "ApplicationsFileIO.dll"                                  
 [49] "ApplicationsLib.dll"                                     
 [50] "AssignRasterDataToMesh.exe"                              
 [51] "BaseLib.dll"                                             
 [52] "checkMesh.exe"                                           
 [53] "ChemistryLib.dll"                                        
 [54] "CMakeInfoLib.dll"                                        
 [55] "ComponentTransport.dll"                                  
 [56] "ComputeNodeAreasFromSurfaceMesh.exe"                     
 [57] "computeSurfaceNodeIDsInPolygonalRegion.exe"              
 [58] "concrt140.dll"                                           
 [59] "constructMeshesFromGeometry.exe"                         
 [60] "convertGEO.exe"                                          
 [61] "convertToLinearMesh.exe"                                 
 [62] "convertVtkDataArrayToVtkDataArray.exe"                   
 [63] "CreateBoundaryConditionsAlongPolylines.exe"              
 [64] "createIntermediateRasters.exe"                           
 [65] "createLayeredMeshFromRasters.exe"                        
 [66] "createMeshElemPropertiesFromASCRaster.exe"               
 [67] "createNeumannBc.exe"                                     
 [68] "createQuadraticMesh.exe"                                 
 [69] "createRaster.exe"                                        
 [70] "DataHolderLib.dll"                                       
 [71] "editMaterialID.exe"                                      
 [72] "ExtractBoundary.exe"                                     
 [73] "ExtractMaterials.exe"                                    
 [74] "ExtractSurface.exe"                                      
 [75] "generateGeometry.exe"                                    
 [76] "generateMatPropsFromMatID.exe"                           
 [77] "generateStructuredMesh.exe"                              
 [78] "GeoLib.dll"                                              
 [79] "geometryToGmshGeo.exe"                                   
 [80] "GitInfoLib.dll"                                          
 [81] "GMSH2OGS.exe"                                            
 [82] "GocadSGridReader.exe"                                    
 [83] "GocadTSurfaceReader.exe"                                 
 [84] "HeatConduction.dll"                                      
 [85] "HeatTransportBHE.dll"                                    
 [86] "HT.dll"                                                  
 [87] "HydroMechanics.dll"                                      
 [88] "identifySubdomains.exe"                                  
 [89] "IntegrateBoreholesIntoMesh.exe"                          
 [90] "ipDataToPointCloud.exe"                                  
 [91] "Layers2Grid.exe"                                         
 [92] "LIE.dll"                                                 
 [93] "LIECommon.dll"                                           
 [94] "LiquidFlow.dll"                                          
 [95] "MapGeometryToMeshSurface.exe"                            
 [96] "MaterialLib.dll"                                         
 [97] "MaterialLib_FractureModels.dll"                          
 [98] "MaterialLib_SolidModels.dll"                             
 [99] "MathLib.dll"                                             
[100] "Mesh2Raster.exe"                                         
[101] "MeshGeoToolsLib.dll"                                     
[102] "MeshLib.dll"                                             
[103] "MeshMapping.exe"                                         
[104] "MoveGeometry.exe"                                        
[105] "MoveMesh.exe"                                            
[106] "mpmetis.exe"                                             
[107] "msvcp140.dll"                                            
[108] "msvcp140_1.dll"                                          
[109] "msvcp140_2.dll"                                          
[110] "msvcp140_atomic_wait.dll"                                
[111] "msvcp140_codecvt_ids.dll"                                
[112] "NodeReordering.exe"                                      
[113] "NumLib.dll"                                              
[114] "OGS2VTK.exe"                                             
[115] "OpenGeoSysCND.xsd"                                       
[116] "OpenGeoSysGLI.xsd"                                       
[117] "OpenGeoSysNum.xsd"                                       
[118] "OpenGeoSysProject.xsd"                                   
[119] "OpenGeoSysSTN.xsd"                                       
[120] "ParameterLib.dll"                                        
[121] "partmesh.exe"                                            
[122] "postLIE.exe"                                             
[123] "ProcessLib.dll"                                          
[124] "ProcessLibBoundaryConditionAndSourceTermPython.dll"      
[125] "ProcessLibBoundaryConditionAndSourceTermPythonModule.dll"
[126] "PVD2XDMF.exe"                                            
[127] "pvtu2vtu.exe"                                            
[128] "python3.dll"                                             
[129] "python311.dll"                                           
[130] "queryMesh.exe"                                           
[131] "Raster2ASC.exe"                                          
[132] "Raster2Mesh.exe"                                         
[133] "RemoveGhostData.exe"                                     
[134] "removeMeshElements.exe"                                  
[135] "ReorderMesh.exe"                                         
[136] "ResetPropertiesInPolygonalRegion.exe"                    
[137] "reviseMesh.exe"                                          
[138] "RichardsComponentTransport.dll"                          
[139] "RichardsFlow.dll"                                        
[140] "RichardsMechanics.dll"                                   
[141] "scaleProperty.exe"                                       
[142] "SmallDeformation.dll"                                    
[143] "SmallDeformationNonlocal.dll"                            
[144] "SteadyStateDiffusion.dll"                                
[145] "StokesFlow.dll"                                          
[146] "swapNodeCoordinateAxes.exe"                              
[147] "SWMMConverter.exe"                                       
[148] "TecPlotTools.exe"                                        
[149] "TES.dll"                                                 
[150] "TestInfoLib.dll"                                         
[151] "tetgen.exe"                                              
[152] "ThermalTwoPhaseFlowWithPP.dll"                           
[153] "ThermoHydroMechanics.dll"                                
[154] "ThermoMechanicalPhaseField.dll"                          
[155] "ThermoMechanics.dll"                                     
[156] "ThermoRichardsFlow.dll"                                  
[157] "ThermoRichardsMechanics.dll"                             
[158] "TIN2VTK.exe"                                             
[159] "TwoPhaseFlowWithPP.dll"                                  
[160] "TwoPhaseFlowWithPrho.dll"                                
[161] "ucrtbase.dll"                                            
[162] "vcomp140.dll"                                            
[163] "vcruntime140.dll"                                        
[164] "vcruntime140_1.dll"                                      
[165] "VTK2OGS.exe"                                             
[166] "VTK2TIN.exe"                                             
[167] "vtkdiff.exe"                                             
[168] "Vtu2Grid.exe"
joboog commented 6 months ago

@ldecicco-USGS Sorry for the late reply. You are in the wrong directory. The ogs executable is called ogs.exe and not located in the module's bin directory. Please check C:\Users\ldecicco\AppData\Roaming\Python if there is a bin or Scripts directory including ogs.exe.

joboog commented 6 months ago

The master branch contains an updated version including a more handy way to install the Python environment and function to install OpenGeoSys. Please see the README. I tested it on Windows 10 with Python 3.11.