About VTI file in porousmedia
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › About VTI file in porousmedia
- This topic has 6 replies, 3 voices, and was last updated 1 week, 5 days ago by Amirmansour Jafari.
-
AuthorPosts
-
May 15, 2025 at 7:19 pm #10217Amirmansour JafariParticipant
Hi. I’m attempting to run the gasstorage2d example in the latest version, but I am encountering several issues. After downloading the gasStorage2d.vti file and following the provided instructions to execute the code, I receive the following warnings:
[BlockVTIreader2D] Warning: NumberOfComponents zero or not given!
[BlockVTIreader2D] Example: <DataArray Name=’physVelocity’ NumberOfComponents=’3′
[BlockVTIreader2D] Setting to default of NumberOfComponents=’1′Despite this, even after allocating 6 cores and allowing the process to run for an extended period, the simulation steps do not progress, and the completion percentage remains at zero.
Could this issue be due to the NumberOfComponents not being explicitly defined?
Additionally, even after adding this tag to the gasStorage2d.vti file, I encounter the following error:
[BlockVTIreader2D] Error: End of input has been reached, but there is still data to be written
Does this indicate that modifications are needed in the VTIReader.h and VTIReader.hh files?
May 25, 2025 at 11:58 am #10261Amirmansour JafariParticipantDear OpenLB team,
Regarding the issue raised about running the gasStorage2d example in the latest OpenLB version, has anyone else encountered this problem? Has a solution been found?
Thank you.
May 26, 2025 at 9:47 am #10300AdrianKeymasterThese are just warnings that the VTI file doesn’t explicitly give the number of components and a fallback to a single component is used. Just to confirm I tested myself using the instructions in the file and the simulation proceeds as expected.
Keep in mind that this is a complex multi-phase application using many additional fields so the performance is lower than usual. e.g. on my laptop using 4 cores it yields a throughput of ~10 MLUPs. I suggest to increase both the
vtkIter
andstatIter
values to monitor the progress on your system.May 27, 2025 at 9:10 am #10306luizeduczeParticipantDear Jafari,
From what I understood, your simulation is running normally.
This example was developed to simulate on clusters using dozens of cores during some hours.
So, probably, the computational resources that you are using is not enough.
This multiphase model is quite complex and the computational performance is still quite low. We are continuously working in developing optimized multiphase models.
Kind regards,
LuizMay 28, 2025 at 3:52 pm #10307Amirmansour JafariParticipantI sincerely appreciate your guidance and support. I have recently started working with OpenLB and have been enthusiastically following the user-guide and actively monitoring the forum discussions.
You are absolutely right. Despite assigning 16 cores (mpirun -np 16) and allowing the simulation to run for over 2 hours, with iterations proceeding as expected, the process remains computationally intensive and time-consuming.
I’m also facing another challenge in this regard. Due to the above, I intend to run the simulation using my RTX 4050 GPU with CUDA. I have carefully studied all the relevant sections on parallel computing in the user-guide and followed them step by step without encountering any errors.
I have successfully managed to run some of examples using this approach. But I’m encountering errors and warnings when attempting to run certain examples (especially gasStorage2d) that involve GPU computing (in the make step).make -C ../../../external
make[1]: Entering directory ‘/home/amirmansourjafari/Downloads/OpenLB/release-1.8.1/external’
make -C zlib
make[2]: Entering directory ‘/home/amirmansourjafari/Downloads/OpenLB/release-1.8.1/external/zlib’
make[2]: Nothing to be done for ‘all’.
make[2]: Leaving directory ‘/home/amirmansourjafari/Downloads/OpenLB/release-1.8.1/external/zlib’
cp zlib/build/libz.a lib/
make -C tinyxml2
make[2]: Entering directory ‘/home/amirmansourjafari/Downloads/OpenLB/release-1.8.1/external/tinyxml2’
make[2]: Nothing to be done for ‘all’.
make[2]: Leaving directory ‘/home/amirmansourjafari/Downloads/OpenLB/release-1.8.1/external/tinyxml2’
cp tinyxml2/build/libtinyxml2.a lib/
make[1]: Leaving directory ‘/home/amirmansourjafari/Downloads/OpenLB/release-1.8.1/external’
make -C ../../.. core
make[1]: Entering directory ‘/home/amirmansourjafari/Downloads/OpenLB/release-1.8.1’
make[1]: Nothing to be done for ‘core’.
make[1]: Leaving directory ‘/home/amirmansourjafari/Downloads/OpenLB/release-1.8.1’
nvcc -O3 -std=c++20 –forward-unknown-to-host-compiler -pthread –forward-unknown-to-host-compiler -x cu -O3 -std=c++20 –generate-code=arch=compute_89,code=[compute_89,sm_89] –extended-lambda –expt-relaxed-constexpr -rdc=true -Xcudafe “–diag_suppress=implicit_return_from_non_void_function –display_error_number –diag_suppress=20014 –diag_suppress=20011” -DPLATFORM_CPU_SISD -DPLATFORM_GPU_CUDA -DDEFAULT_FLOATING_POINT_TYPE=float -I../../../src -I../../../external/zlib -I../../../external/tinyxml2 -c -o gasStorage2d.o gasStorage2d.cpp
../../../src/core/multiPhaseUnitConverter.h(210): warning #611-D: overloaded virtual function “olb::UnitConverterBase::print” is only partially overridden in class “olb::MultiPhaseUnitConverterFromRelaxationTime<T, NSDESCRIPTOR>”
class MultiPhaseUnitConverterFromRelaxationTime : public UnitConverter<T, DESCRIPTOR> {
^
detected during instantiation of class “olb::MultiPhaseUnitConverterFromRelaxationTime<T, DESCRIPTOR> [with T=T, DESCRIPTOR=NSDESCRIPTOR]” at line 91 of gasStorage2d.cppRemark: The warnings can be suppressed with “-diag-suppress <warning-number>”
../../../src/functors/analytical/indicator/indicatorF2D.h(69): warning #611-D: overloaded virtual function “olb::IndicatorF2D<S>::operator() [with S=T]” is only partially overridden in class “olb::IndicatorCuboid2D<T>”
class IndicatorCuboid2D : public IndicatorF2D<S> {
^
detected during instantiation of class “olb::IndicatorCuboid2D<S> [with S=T]” at line 94 of gasStorage2d.cppgasStorage2d.cpp(94): error: invalid narrowing conversion from “double” to “float”
IndicatorCuboid2D<T> inlet( dx, length[1] – dx, { -inletLength, length[1]/2. }, 0 );
^gasStorage2d.cpp(97): error: invalid narrowing conversion from “double” to “float”
IndicatorCuboid2D<T> outlet( dx, length[1] – dx, { outletLength + length[0] – 0.5*dx, length[1]/2. }, 0);
^gasStorage2d.cpp(97): error: invalid narrowing conversion from “double” to “float”
IndicatorCuboid2D<T> outlet( dx, length[1] – dx, { outletLength + length[0] – 0.5*dx, length[1]/2. }, 0);
^gasStorage2d.cpp(129): error: invalid narrowing conversion from “double” to “float”
IndicatorCuboid2D<T> beforeOutlet_( 1.1*dx, length[1], { length[0] + outletLength – 2.*dx, length[1]/2. }, 0 );
^gasStorage2d.cpp(129): error: invalid narrowing conversion from “double” to “float”
IndicatorCuboid2D<T> beforeOutlet_( 1.1*dx, length[1], { length[0] + outletLength – 2.*dx, length[1]/2. }, 0 );
^
gasStorage2d.cpp(180): error: invalid narrowing conversion from “double” to “float”
SmoothIndicatorFactoredCuboid2D<T, T> phi0( {-inletLength, length[1]/2.},
^gasStorage2d.cpp(186): error: invalid narrowing conversion from “double” to “float”
SmoothIndicatorFactoredCuboid2D<T,T> fringe( {-inletLength, length[1]/2.},
^gasStorage2d.cpp(406): error: invalid narrowing conversion from “double” to “float”
{ ( length[0] + outletLength – inletLength )/2., length[1]/2. }, 0);
^gasStorage2d.cpp(406): error: invalid narrowing conversion from “double” to “float”
{ ( length[0] + outletLength – inletLength )/2., length[1]/2. }, 0);
^9 errors detected in the compilation of “gasStorage2d.cpp”.
make: *** [../../../default.single.mk:41: gasStorage2d.o] Error 2I would greatly appreciate any guidance you could provide on this matter.
Best regards,
Amirmansour- This reply was modified 2 weeks, 3 days ago by Amirmansour Jafari.
June 2, 2025 at 10:43 am #10318luizeduczeParticipantDear Jafari,
From your message I see an error in the code. I am really sorry for that.
You can see in the code that we have some numbers in operations like 0.5, or 2. The correct way is to define T(0.5) or T(2.), so they can be converted to float for gpu running.
Just do the following procedure. Replace for example:
length[0] + outletLength – inletLength )/2.by:
length[0] + outletLength – inletLength )/T(2.)And do the same thing for all free numbers in the code.
Kind regards,
LuizJune 2, 2025 at 4:46 pm #10324Amirmansour JafariParticipantThank you very much for your guidance. Yes, you pointed it out exactly right, I have made those corrections, but I’m still getting some warnings during Make step. I’m currently working on resolving them, and if I can’t fix them, I’ll bring them up here.
Once again, I truly appreciate your support and valuable input. -
AuthorPosts
- You must be logged in to reply to this topic.