LBPM icon indicating copy to clipboard operation
LBPM copied to clipboard

Runtime issue

Open alitimer opened this issue 4 years ago • 13 comments

I've compiled and tested on different platforms (supercomputer & local), compile and ctest 100% successful but hitting this error:

root@lbpm:/home/ali/uCTimage# mpirun -np 8 /home/ali/LBPM_BUILD/bin/lbpm_permeability_simulator input.db
********************************************************
Running Single Phase Permeability Calculation 
********************************************************
voxel length = 7.000000 micron 
voxel length = 7.000000 micron 
Input media: mask_water_flooded_water_and_oil.raw
Relabeling 3 values
oldvalue=0, newvalue =0 
oldvalue=1, newvalue =2 
oldvalue=2, newvalue =1 
Dimensions of segmented image: 601 x 594 x 1311 
Reading 16-bit input data 
Read segmented data from mask_water_flooded_water_and_oil.raw 
Label=0, Count=403551588 
Label=1, Count=41440830 
Label=2, Count=23026716 
Checkerboard pattern at z inlet for 10 layers, saturated with phase label=1 
Distributing subdomains across 8 processors 
Process grid: 2 x 2 x 2 
Subdomain size: 100 x 100 x 100 
Size of transition region: 0 
Media porosity = 0.078340 
Initialized solid phase -- Converting to Signed Distance function 
Domain set.
Create ScaLBL_Communicator 
Set up memory efficient layout 
Allocating distributions 
Setting up device map and neighbor list 
Initializing distributions 
Beginning AA timesteps, timestepMax = 20000 
********************************************************
     0.729321
     0.682192
     0.664081
     0.654419
     0.648428
-------------------------------------------------------------------
********************************************************
CPU time = 0.024026 
Lattice update rate (per core)= 2.245584 MLUPS 
Lattice update rate (total)= 17.964674 MLUPS 
********************************************************
terminate called after throwing an instance of 'StackTrace::abort_error'
terminate called after throwing an instance of 'terminate called after throwing an instance of 'StackTrace::abort_error'
terminate called after throwing an instance of 'StackTrace::abort_error'
terminate called after throwing an instance of 'StackTrace::abort_error'
StackTrace::abort_errorterminate called after throwing an instance of 'StackTrace::abort_error'
'
terminate called after throwing an instance of 'StackTrace::abort_error'
terminate called after throwing an instance of 'StackTrace::abort_error'
Warning: getGlobalCallStacks called without call to globalCallStackInitialize
  what():  Program abort called in file '/home/ali/LBPM/common/Database.cpp' at line 83:
   Variable Visualization was not found in database
Bytes used = 93929616
Stack Trace:
 [1] 0x55a817f7112e:  lbpm_permeability_simulator                                    _start
   [1] 0x55a817f71048:  lbpm_permeability_simulator                                      main  lbpm_permeability_simulator.cpp:44
     [1] 0x55a817fe12b6:  lbpm_permeability_simulator  Database::getDatabase(std::string const&)  shared_ptr.h:510
       [1] 0x55a817fe0526:  lbpm_permeability_simulator     Database::getData(std::string const&)  Database.cpp:83
         [1] 0x55a817f9be0d:  lbpm_permeability_simulator  StackTrace::Utilities::abort(std::string const&, std::string const&, int)  stl_vector.h:108
           [1] 0x55a817f80aba:  lbpm_permeability_simulator                   StackTrace::backtrace()  stl_vector.h:936

.
.
.
===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   PID 1122 RUNNING AT lbpm
=   EXIT CODE: 134
=   CLEANING UP REMAINING PROCESSES
=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Aborted (signal 6)
This typically refers to a problem with your application.
Please see the FAQ page for debugging suggestions

I followed the example in the wiki page with the same sample data but having same issue running the code on my different setups. Couldn't figure it out. Any help please? Am I missing something?

alitimer avatar Feb 04 '21 15:02 alitimer

I think you may need to add the following to your input database file, since it expects there to be a section for Visualization (which can be empty since default settings will be made internally)

Visualization { }

Also (as a note) some MPI implementations don't like to be run as root. It shouldn't cause problems with LBPM, but it is safer to run as a non-root user.

JamesEMcClure avatar Feb 04 '21 19:02 JamesEMcClure

Nice, thanks. AM looking for detailed manual/booklet or something to follow helping to understand the simulation and prepare input file. Nothing's on OPM-project website; any other reference? Actually Can't generate visualization silo files for the example in the wiki using following input file:

Domain {
   Filename = "../mask_water_flooded_water_and_oil.raw.morphdrain.raw"
   ReadType = "8bit"  // data type
   nproc = 2, 2, 2     // process grid
   n = 300, 297, 300   // sub-domain size
   N = 600, 594, 600  // size of original image
   voxel_length = 7.0  // voxel length (in microns)
   ReadValues = -1, 0, 1, 2  // labels within the original image
   WriteValues = -1, 0, 1, 2 // associated labels to be used by LBPM
   BC = 4                // boundary condition type (0 for flux)
   Sw = 0.18
}
Color {
    tauA = 0.7;             // relaxation time for fluid A (labeled as "1")
    tauB = 0.7;             // relaxation time for fluid B (labeled as "2")
    rhoA   = 1.0;           // density for fluid A (in lattice units)
    rhoB   = 1.0;           // density for fluid B (in lattice units)
    alpha = 1e-3;           // controls the surface tension
    beta  = 0.95;           // controls the interface width
    F = 0, 0, 0             // controls the external force
    Restart = false         // initialize simulation from restart file?
    timestepMax = 1000000    // maximum number of timesteps to perform before exit
    ComponentLabels = 0, -1     // number of immobile component labels in the input image
    ComponentAffinity = -1.0, -0.9  // wetting condition for each immobile component
    flux = -10.0               // volumetric flux at the z-inlet in voxels per timestep
}
Analysis {
    analysis_interval = 1000         // Frequency to perform analysis
    visualization_interval = 100000  // Frequency to write visualization data
    restart_interval = 1000000       // Frequency to write restart data
    restart_file = "Restart"         // Filename to use for restart file (will append rank)
    N_threads    = 4                 // Number of threads to use for analysis
    load_balance = "independent"     // Load balance method to use: "none", "default", "independent"
}
Visualization {
    write_silo = true     // write SILO databases with assigned variables
    save_8bit_raw = true  // write labeled 8-bit binary files with phase assignments
    save_phase_field = true  // save phase field within SILO database
    save_pressure = true    // save pressure field within SILO database
    save_velocity = true    // save velocity field within SILO database
}

alitimer avatar Feb 05 '21 15:02 alitimer

In the input file that you sent you will need to run for at least 100,000 timesteps before visualization data is generated, because this sets

visualization_interval = 100000 // Frequency to write visualization data

If you reduce this to say 1,000 timesteps you should get visualization files pretty quickly.

There isn't much more detailed documentation beyond what is available on the wiki. This is something we are working to improve.

JamesEMcClure avatar Feb 05 '21 15:02 JamesEMcClure

Hi, have couple of ambiguities doesn't let me to reach correct results with lbpm_color_simulator:

  1. How to manage rel perm calculated in lower resolution? meaning only for few saturation points e.g. 0.2, 0.3 ~ 0.8. At the moment I have the code running for long time giving results for saturation points from 0.23378 to 0.22234 (why descending?)
sw krw krn vw vn pw pn
0.23378 1.9911e-09 -8.7221e-11 2.0412e-08 -8.9415e-10 0.33307 0.33344
0.23301 1.3565e-09 -1.1793e-09 1.3906e-08 -1.2089e-08 0.33299 0.33348
0.23243 1.0319e-09 -1.604e-09 1.0579e-08 -1.6444e-08 0.33294 0.3335
0.23197 8.0727e-10 -1.8005e-09 8.2758e-09 -1.8458e-08 0.33291 0.33352
0.23158 6.6815e-10 -1.9124e-09 6.8495e-09 -1.9605e-08 0.33288 0.33353
0.23125 5.4192e-10 -1.9939e-09 5.5555e-09 -2.0441e-08 0.33286 0.33354
0.23096 4.5106e-10 -2.0962e-09 4.624e-09 -2.1489e-08 0.33284 0.33355
0.2307 3.8417e-10 -2.1896e-09 3.9384e-09 -2.2447e-08 0.33282 0.33356
0.23045 3.3441e-10 -2.2906e-09 3.4282e-09 -2.3482e-08 0.33281 0.33356
0.23023 2.8559e-10 -2.3494e-09 2.9278e-09 -2.4085e-08 0.33279 0.33357
0.23002 2.4646e-10 -2.3961e-09 2.5266e-09 -2.4564e-08 0.33278 0.33358
.
.
.

Also why negative numbers? (can't interpret it)

  1. Any hint how to calculate force in input file? (reference, unit used here, ...) F = 0.0, 0.0, 1.0e-5

Input file:

Domain {
   Filename = "Treated-8bit-binary.raw.morphdrain.raw"
   ReadType = "8bit"  // data type
   N = 984, 1008, 930  // size of original image
   nproc = 6, 6, 6     // process grid
   n = 164, 168, 155   // sub-domain size
   voxel_length = 1.4632  // voxel length (in microns)
   ReadValues = 0, 1  // labels within the original image
   WriteValues = 0, 1 // associated labels to be used by LBPM
   InletLayers = 0, 0, 10 // specify 10 layers along the z-inlet
   checkerSize = 10       // size of the checker to use
   BC = 0                 // boundary condition type (0 for periodic)
   Sw = 0.20              // target saturation for morphological tools
   //offset = 100, 100, 100  // offset from the origin for the simulation region
}
MRT {
   tau = 1.0
   F = 0.0, 0.0, 1.0e-5
   timestepMax = 2000000
   tolerance = 0.0001
}
Color {
    tauA = 0.7;             // relaxation time for fluid A (labeled as "1")
    tauB = 0.7;             // relaxation time for fluid B (labeled as "2")
    rhoA   = 1.0;           // density for fluid A (in lattice units)
    rhoB   = 1.0;           // density for fluid B (in lattice units)
    alpha = 1e-3;           // controls the surface tension
    beta  = 0.95;           // controls the interface width
    F = 0, 0, 0             // controls the external force
    Restart = false         // initialize simulation from restart file?
    timestepMax = 2000000    // maximum number of timesteps to perform before exit
    ComponentLabels = 0, -1     // number of immobile component labels in the input image
    ComponentAffinity = -1.0, -0.9  // wetting condition for each immobile component
    flux = -10.0               // volumetric flux at the z-inlet in voxels per timestep
}
Analysis {
    analysis_interval = 1000         // Frequency to perform analysis
    visualization_interval = 1000  // Frequency to write visualization data
    restart_interval = 1000000       // Frequency to write restart data
    restart_file = "Restart"         // Filename to use for restart file (will append rank)
    N_threads    = 4                 // Number of threads to use for analysis
    load_balance = "independent"     // Load balance method to use: "none", "default", "independent"
}
Visualization {
    write_silo = true     // write SILO databases with assigned variables
    save_8bit_raw = true  // write labeled 8-bit binary files with phase assignments
    save_phase_field = true  // save phase field within SILO database
    save_pressure = true    // save pressure field within SILO database
    save_velocity = true    // save velocity field within SILO database
}

alitimer avatar Apr 23 '21 13:04 alitimer

The default units for input are in lattice units. So this means one unit of length is one voxel, one unit of time is one timestep, and the density is unity within the volume of a single voxel. The force that you calculate is based on this.

The saturation will drift a little bit due to diffuse interface condition, particularly early in the simulation as the interfaces are rearranging more. The total mass should be conserved exactly based on the color scheme, which means that the saturation should stabilize. If you plot saturation vs. timestep you should get a good feel for how much drift is occurring and whether it is flattening out.

Note that there are separate forces for the Color model and for the MRT (permeability) simulator. In the Color section of the input database you are setting the force to zero, which means you won't get a sensible relative permeability value

F = 0, 0, 0

So this is probably the problem.

You can set a target capillary number by adding a key to the Color section of the input database. This will internally rescale the force to try to match the specified capillary number. For this to work really well it needs to be applied when the flow is close to steady state. You can set the timestep manually using the rescale_force_after_timestep key. For example, to set a target capillary number of 1e-5 where the rescaling is carried out after 100,000 timesteps, you add two lines to the Color section of the input dabase

capillary_number = 1.0e-5
rescale_force_after_timestep = 100000

JamesEMcClure avatar Apr 23 '21 14:04 JamesEMcClure

Changing Sw in Domain section as well as above tip helped getting proper results; thanks for that. Now I am trying to run color simulation on large sample utilizing multiple GPU but getting below UCX error and was thinking maybe something's missed or does the code support multi-GPU at all?

[1620707706.391029] [a081:30902:0]         select.c:410  UCX  ERROR no active messages transport to <no debug data>: Unsupported operation
[a081:30902] pml_ucx.c:383  Error: ucp_ep_create(proc=0) failed: Destination is unreachable
[1620707706.391276] [a081:30903:0]         select.c:410  UCX  ERROR no active messages transport to <no debug data>: Unsupported operation
[a081:30903] pml_ucx.c:383  Error: ucp_ep_create(proc=1) failed: Destination is unreachable
[1620707706.391492] [a081:30904:0]         select.c:410  UCX  ERROR no active messages transport to <no debug data>: Unsupported operation
[a081:30904] pml_ucx.c:383  Error: ucp_ep_create(proc=2) failed: Destination is unreachable
[1620707706.391649] [a081:30905:0]         select.c:410  UCX  ERROR no active messages transport to <no debug data>: Unsupported operation
[a081:30905] pml_ucx.c:383  Error: ucp_ep_create(proc=3) failed: Destination is unreachable

Comments:

  1. Color simulation was successful with 1 GPU on image generated with morphdrain using 1 CPU.
  2. I am using 4 grids of image sample and 4 CPU as well as 4 GPU.
  3. Used 4 grids because morphdrain run takes ages with only 1 CPU making large-size sample ready for color simulation.
  4. Is it possible to use multiple CPUs to generate image for color simulation with 1 or more GPU?

alitimer avatar May 12 '21 02:05 alitimer

This is an openmpi / ucx thing. Try launching it with the flag

--mca pml ob1

LBPM fully supports multi-GPU. We have actually scaled it to more than 10,000 gpu on Summit.

JamesEMcClure avatar May 12 '21 09:05 JamesEMcClure

ReadValues = -1, 0, 1, 2 // labels within the original image WriteValues = -1, 0, 1, 2 // associated labels to be used by LBPM

Can you tell me the means of ths key value "ReadValues "and "WriteValues "?

renxiaosa00 avatar Aug 02 '23 01:08 renxiaosa00

我认为您可能需要将以下内容添加到输入数据库文件中,因为它期望有一个可视化部分(可以为空,因为默认设置将在内部进行)

Visualization { }

另外(请注意)一些 MPI 实现不喜欢以 root 身份运行。它不会导致 LBPM 出现问题,但以非 root 用户身份运行会更安全。

What is the sequence of color_simulate exe?

renxiaosa00 avatar Sep 12 '23 09:09 renxiaosa00

In the input file that you sent you will need to run for at least 100,000 timesteps before visualization data is generated, because this sets

visualization_interval = 100000 // Frequency to write visualization data

If you reduce this to say 1,000 timesteps you should get visualization files pretty quickly.

There isn't much more detailed documentation beyond what is available on the wiki. This is something we are working to improve.

I have a problem: xs@rxs-ThinkStation-P920:~/rxs/code/LBPM-master/bin/tests$ mpirun -np 8 ./lbpm_color_simulator step10_1.db


Running Color LBM


voxel length = 7.000000 micron voxel length = 7.000000 micron Input media: mask_water_flooded_water_and_oil.raw.morphopen.raw Relabeling 4 values oldvalue=-1, newvalue =-1 oldvalue=0, newvalue =0 oldvalue=1, newvalue =1 oldvalue=2, newvalue =2 Dimensions of segmented image: 600 x 594 x 600 Reading 8-bit input data Read segmented data from mask_water_flooded_water_and_oil.raw.morphopen.raw Label=-1, Count=0 Label=0, Count=199713224 Label=1, Count=14126776 Label=2, Count=0 Distributing subdomains across 8 processors Process grid: 2 x 2 x 2 Subdomain size: 300 x 297 x 300 Size of transition region: 0 Media porosity = 0.066062 Initialized solid phase -- Converting to Signed Distance function Domain set. Create ScaLBL_Communicator Set up memory efficient layout, 1640602 | 1640624 | 27269996 Allocating distributions Setting up device map and neighbor list Component labels: 2 label=0, affinity=-1.000000, volume fraction==0.952781 label=-1, affinity=-0.900000, volume fraction==0.000000 Model created Initializing distributions Initializing phase field Affinities - rank 0: Main: 0 Thread 1: 1 Thread 2: 2 Thread 3: 3 Thread 4: 4 Thread 5: 5 Thread 6: 6 Thread 7: 7 Thread 8: 8 Thread 9: 9 Thread 10: 10 Thread 11: 11 Thread 12: 12 Thread 13: 13 Thread 14: 14 Thread 15: 15 Thread 16: 16 Thread 17: 17 Thread 18: 18 Thread 19: 19 Thread 20: 20 Thread 21: 21 Thread 22: 22 Thread 23: 23 Thread 24: 24 Thread 25: 25 Thread 26: 26 Thread 27: 27 Thread 28: 28 Thread 29: 29 Thread 30: 30 Thread 31: 31 Thread 32: 32 Thread 33: 33 Thread 34: 34 Thread 35: 35 Thread 36: 36 Thread 37: 37 Thread 38: 38 Thread 39: 39 Thread 40: 40 Thread 41: 41 Thread 42: 42 Thread 43: 43 Thread 44: 44 Thread 45: 45 Thread 46: 46 Thread 47: 47 Thread 48: 48 Thread 49: 49 Thread 50: 50 Thread 51: 51 Thread 52: 52 Thread 53: 53 Thread 54: 54 Thread 55: 55 Thread 56: 56 Thread 57: 57 Thread 58: 58 Thread 59: 59 Thread 60: 60 Thread 61: 61 Thread 62: 62 Thread 63: 63 Warning: getGlobalCallStacks called without call to globalCallStackInitialize Program abort called in file '/home/rxs/rxs/code/LBPM-master/common/Database.cpp' at line 74: Variable FlowAdaptor was not found in database Bytes used = 1047211008 Stack Trace: [1] 0x55a26954ec5e: lbpm_color_simulator _start [1] 0x55a26954f842: lbpm_color_simulator main lbpm_color_simulator.cpp:119 [1] 0x55a26963f967: lbpm_color_simulator ScaLBL_ColorModel::Run(int) ColorModel.cpp:636 [1] 0x55a26955280e: lbpm_color_simulator Database::getDatabase(std::string const&) Database.cpp:88 [1] 0x55a2695525c1: lbpm_color_simulator Database::getData(std::string const&) Database.cpp:74 [1] 0x55a269637cc2: lbpm_color_simulator StackTrace::Utilities::abort(std::string const&, std::string const&, int) Utilities.cpp:127 [63] 0x7fcb187bd133: libc.so.6 clone [63] 0x7fcb188a0609: libpthread.so.0 pthread_create.c:478 [63] 0x55a269614331: lbpm_color_simulator ThreadPool::create_new_thread(ThreadPool*, int) thread_pool.h:678 [63] 0x55a26961199a: lbpm_color_simulator ThreadPool::tpool_thread(int) thread_pool.cpp:865 [63] 0x55a26961424d: lbpm_color_simulator ThreadPool::condition_variable::wait_for(double) const thread_pool.h:615 [63] 0x55a2696156eb: lbpm_color_simulator std::cv_status std::condition_variable::wait_for<long, std::milli>(std::unique_lockstd::mutex&, std::chrono::milliseconds const&) condition_variable:153 [63] 0x55a2696176ce: lbpm_color_simulator std::cv_status std::condition_variable::wait_until<std::chrono::_V2::steady_clock, std::chrono::nanoseconds>(std::unique_lockstd::mutex&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::nanoseconds> const&) condition_variable:121 [63] 0x7fcb188a77d1: libpthread.so.0 pthread_cond_timedwait futex-internal.h:320 [63] 0x7fcb188ac420: libpthread.so.0 sigaction.c Warning: getGlobalCallStacks called without call to globalCallStackInitialize Program abort called in file '/home/rxs/rxs/code/LBPM-master/common/Database.cpp' at line 74: Variable FlowAdaptor was not found in database Bytes used = 1110515760 Stack Trace: [1] 0x55b7bc530c5e: lbpm_color_simulator _start [1] 0x55b7bc531842: lbpm_color_simulator main lbpm_color_simulator.cpp:119 [1] 0x55b7bc621967: lbpm_color_simulator ScaLBL_ColorModel::Run(int) ColorModel.cpp:636 [1] 0x55b7bc53480e: lbpm_color_simulator Database::getDatabase(std::string const&) Database.cpp:88 [1] 0x55b7bc5345c1: lbpm_color_simulator Database::getData(std::string const&) Database.cpp:74 [1] 0x55b7bc619cc2: lbpm_color_simulator StackTrace::Utilities::abort(std::string const&, std::string const&, int) Utilities.cpp:127 [63] 0x7f03793c1133: libc.so.6 clone [63] 0x7f03794a4609: libpthread.so.0 pthread_create.c:478 [63] 0x55b7bc5f6331: lbpm_color_simulator ThreadPool::create_new_thread(ThreadPool*, int) thread_pool.h:678 [57] 0x55b7bc5f399a: lbpm_color_simulator ThreadPool::tpool_thread(int) thread_pool.cpp:865 | [57] 0x55b7bc5f624d: lbpm_color_simulator ThreadPool::condition_variable::wait_for(double) const thread_pool.h:615 | [57] 0x55b7bc5f76eb: lbpm_color_simulator std::cv_status std::condition_variable::wait_for<long, std::milli>(std::unique_lockstd::mutex&, std::chrono::milliseconds const&) condition_variable:153 | [57] 0x55b7bc5f96ce: lbpm_color_simulator std::cv_status std::condition_variable::wait_until<std::chrono::_V2::steady_clock, std::chrono::nanoseconds>(std::unique_lockstd::mutex&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::nanoseconds> const&) condition_variable:121 | [57] 0x55b7bc5f5a91: lbpm_color_simulator gthr-default.h:873 | [56] 0x7f03794ab7d1: libpthread.so.0 pthread_cond_timedwait futex-internal.h:320 | | [56] 0x7f03794b0420: libpthread.so.0 sigaction.c | [1] 0x7f03794ab699: libpthread.so.0 pthread_cond_timedwait pthread_cond_wait.c:636 | [1] 0x7f03794a907b: libpthread.so.0 pthread_mutex_lock.c:80 | [1] 0x7f03794af170: libpthread.so.0 lowlevellock.c:52 | [1] 0x7f03794b0420: libpthread.so.0 sigaction.c [6] 0x55b7bc5f38f4: lbpm_color_simulator ThreadPool::tpool_thread(int) thread_pool.cpp:855 [6] 0x55b7bc5f5cf3: lbpm_color_simulator std::this_thread::yield() thread:358 [6] 0x7f03793a471b: libc.so.6 __sched_yield [6] 0x7f03794b0420: libpthread.so.0 sigaction.c Warning: getGlobalCallStacks called without call to globalCallStackInitialize Program abort called in file '/home/rxs/rxs/code/LBPM-master/common/Database.cpp' at line 74: Variable FlowAdaptor was not found in database Bytes used = 1124107184 Stack Trace: [1] 0x55ef0baf3c5e: lbpm_color_simulator _start [1] 0x55ef0baf4842: lbpm_color_simulator main lbpm_color_simulator.cpp:119 [1] 0x55ef0bbe4967: lbpm_color_simulator ScaLBL_ColorModel::Run(int) ColorModel.cpp:636 [1] 0x55ef0baf780e: lbpm_color_simulator Database::getDatabase(std::string const&) Database.cpp:88 [1] 0x55ef0baf75c1: lbpm_color_simulator Database::getData(std::string const&) Database.cpp:74 [1] 0x55ef0bbdccc2: lbpm_color_simulator StackTrace::Utilities::abort(std::string const&, std::string const&, int) Utilities.cpp:127 [63] 0x7ff0b6b5b133: libc.so.6 clone [63] 0x7ff0b6c3e609: libpthread.so.0 pthread_create.c:478 [63] 0x55ef0bbb9331: lbpm_color_simulator ThreadPool::create_new_thread(ThreadPool*, int) thread_pool.h:678 [60] 0x55ef0bbb699a: lbpm_color_simulator ThreadPool::tpool_thread(int) thread_pool.cpp:865 | [60] 0x55ef0bbb924d: lbpm_color_simulator ThreadPool::condition_variable::wait_for(double) const thread_pool.h:615 | [60] 0x55ef0bbba6eb: lbpm_color_simulator std::cv_status std::condition_variable::wait_for<long, std::milli>(std::unique_lockstd::mutex&, std::chrono::milliseconds const&) condition_variable:153 | [60] 0x55ef0bbbc6ce: lbpm_color_simulator std::cv_status std::condition_variable::wait_until<std::chrono::_V2::steady_clock, std::chrono::nanoseconds>(std::unique_lockstd::mutex&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::nanoseconds> const&) condition_variable:121 | [60] 0x7ff0b6c457d1: libpthread.so.0 pthread_cond_timedwait futex-internal.h:320 | [60] 0x7ff0b6c4a420: libpthread.so.0 sigaction.c [3] 0x55ef0bbb68f4: lbpm_color_simulator ThreadPool::tpool_thread(int) thread_pool.cpp:855 [3] 0x55ef0bbb8cf3: lbpm_color_simulator std::this_thread::yield() thread:358 [3] 0x7ff0b6b3e71b: libc.so.6 __sched_yield [3] 0x7ff0b6c4a420: libpthread.so.0 sigaction.c Warning: getGlobalCallStacks called without call to globalCallStackInitialize Program abort called in file '/home/rxs/rxs/code/LBPM-master/common/Database.cpp' at line 74: Variable FlowAdaptor was not found in database Bytes used = 1035942800 Stack Trace: [1] 0x55c5fddf6c5e: lbpm_color_simulator _start [1] 0x55c5fddf7842: lbpm_color_simulator main lbpm_color_simulator.cpp:119 [1] 0x55c5fdee7967: lbpm_color_simulator ScaLBL_ColorModel::Run(int) ColorModel.cpp:636 [1] 0x55c5fddfa80e: lbpm_color_simulator Database::getDatabase(std::string const&) Database.cpp:88 [1] 0x55c5fddfa5c1: lbpm_color_simulator Database::getData(std::string const&) Database.cpp:74 [1] 0x55c5fdedfcc2: lbpm_color_simulator StackTrace::Utilities::abort(std::string const&, std::string const&, int) Utilities.cpp:127 [63] 0x7f4b5ae49133: libc.so.6 clone [63] 0x7f4b5af2c609: libpthread.so.0 pthread_create.c:478 [63] 0x55c5fdebc331: lbpm_color_simulator ThreadPool::create_new_thread(ThreadPool*, int) thread_pool.h:678 [61] 0x55c5fdeb999a: lbpm_color_simulator ThreadPool::tpool_thread(int) thread_pool.cpp:865 | [60] 0x55c5fdebc24d: lbpm_color_simulator ThreadPool::condition_variable::wait_for(double) const thread_pool.h:615 | | [60] 0x55c5fdebd6eb: lbpm_color_simulator std::cv_status std::condition_variable::wait_for<long, std::milli>(std::unique_lockstd::mutex&, std::chrono::milliseconds const&) condition_variable:153 | | [60] 0x55c5fdebf6ce: lbpm_color_simulator std::cv_status std::condition_variable::wait_until<std::chrono::_V2::steady_clock, std::chrono::nanoseconds>(std::unique_lockstd::mutex&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::nanoseconds> const&) condition_variable:121 | | [60] 0x7f4b5af337d1: libpthread.so.0 pthread_cond_timedwait futex-internal.h:320 | | [60] 0x7f4b5af38420: libpthread.so.0 sigaction.c | [1] 0x55c5fdebc150: lbpm_color_simulator ThreadPool::condition_variable::wait_for(double) const thread_pool.h:610 | [1] 0x55c5fdebd271: lbpm_color_simulator std::unique_lockstd::mutex::unique_lock(std::mutex&) unique_lock.h:72 | [1] 0x55c5fdebf3d3: lbpm_color_simulator std::unique_lockstd::mutex::lock() unique_lock.h:142 | [1] 0x55c5fde31c8a: lbpm_color_simulator std::mutex::lock() std_mutex.h:100 | [1] 0x7f4b5af2f0a3: libpthread.so.0 pthread_mutex_lock pthread_mutex_lock.c:80 | [1] 0x7f4b5af37170: libpthread.so.0 lowlevellock.c:52 | [1] 0x7f4b5af38420: libpthread.so.0 sigaction.c [2] 0x55c5fdeb98f4: lbpm_color_simulator ThreadPool::tpool_thread(int) thread_pool.cpp:855 [2] 0x55c5fdebbcf3: lbpm_color_simulator std::this_thread::yield() thread:358 [2] 0x7f4b5ae2c71b: libc.so.6 __sched_yield [2] 0x7f4b5af38420: libpthread.so.0 sigaction.c

=================================================================================== = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES = PID 14966 RUNNING AT rxs-ThinkStation-P920 = EXIT CODE: 9 = CLEANING UP REMAINING PROCESSES = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES

YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Terminated (signal 15) This typically refers to a problem with your application. Please see the FAQ page for debugging suggestions

renxiaosa00 avatar Sep 12 '23 10:09 renxiaosa00

step10_1.db is : Domain { Filename = "mask_water_flooded_water_and_oil.raw.morphopen.raw"//"mask_water_flooded_water_and_oil.raw.morphdrain.raw"
ReadType = "8bit" // data type nproc = 2, 2, 2 // process grid n = 300, 297, 300 // sub-domain size N = 600, 594, 600 // size of original image voxel_length = 7.0 // voxel length (in microns) ReadValues = -1, 0, 1, 2 // labels within the original image WriteValues = -1, 0, 1, 2 // associated labels to be used by LBPM BC = 4 // boundary condition type (0 for flux) Sw = 0.18 } Color { tauA = 0.7; // relaxation time for fluid A (labeled as "1")
tauB = 0.7; // relaxation time for fluid B (labeled as "2") rhoA = 1.0; // density for fluid A (in lattice units) rhoB = 1.0; // density for fluid B (in lattice units) alpha = 1e-3; // controls the surface tension beta = 0.95; // controls the interface width F = 0, 0, 5.0e-6 // controls the external force Restart = false // initialize simulation from restart file? timestepMax = 1000000 // maximum number of timesteps to perform before exit ComponentLabels = 0, -1 // number of immobile component labels in the input image ComponentAffinity = -1.0, -0.9 // wetting condition for each immobile component flux = -10.0 } Analysis { analysis_interval = 1000 // Frequency to perform analysis visualization_interval = 1000 // Frequency to write visualization data restart_interval = 1000000 // Frequency to write restart data restart_file = "Restart" // Filename to use for restart file (will append rank) N_threads = 4 // Number of threads to use for analysis load_balance = "independent" // Load balance method to use: "none", "default", "independent" } Visualization { }

renxiaosa00 avatar Sep 12 '23 10:09 renxiaosa00

You need to add one more section, like this

FlowAdaptor { 
}

JamesEMcClure avatar Sep 12 '23 19:09 JamesEMcClure

See the links below for some more information

https://lbpm-sim.org/userGuide/models/color/index.html

The specific protocol examples have input files

https://lbpm-sim.org/userGuide/models/color/protocols/fractionalFlow.html

JamesEMcClure avatar Sep 12 '23 19:09 JamesEMcClure