radical-collaboration / CyberManufacturing

CDSE Multi-scale CI Project
1 stars 0 forks source link

DEM controller fails #38

Closed iparask closed 6 years ago

iparask commented 6 years ago

When I run the executor I get the following error from the DEM controller:

Traceback (most recent call last):
  File "controller_DEMresource_main.py", line 143, in <module>
    abcd.main()
  File "controller_DEMresource_main.py", line 49, in main
    obj_inter = DEMinter.controller_DEM_resource_interpretor(timestep, self.type, self.init_timestep, self.liggghts_output_dir)
  File "/Users/iparask/radical.pilot.sandbox/test1/pilot.0000/unit.000001/controller_DEMresource_data_interpretor.py", line 36, in __init__
    self.init_data_calculations()
  File "/Users/iparask/radical.pilot.sandbox/test1/pilot.0000/unit.000001/controller_DEMresource_data_interpretor.py", line 68, in init_data_calculations
    init_data_obj = DEMreader.Controller_DEM_resource_reader(self.init_timestep, self.type, self.liggghts_output_dir)
  File "/Users/iparask/radical.pilot.sandbox/test1/pilot.0000/unit.000001/controller_DEMresource_data_reader.py", line 35, in __init__
    self.a = self.initial_all_functions()
  File "/Users/iparask/radical.pilot.sandbox/test1/pilot.0000/unit.000001/controller_DEMresource_data_reader.py", line 39, in initial_all_functions
    self.raw_collision_data = self.liggghts_collision_raw_data()
  File "/Users/iparask/radical.pilot.sandbox/test1/pilot.0000/unit.000001/controller_DEMresource_data_reader.py", line 60, in liggghts_collision_raw_data
    collision_file_open = open(path_collision_file, "r")
IOError: [Errno 2] No such file or directory: '/Users/iparask/radical.pilot.sandbox/test1/pilot.0000/unit.000000//collision0.atom'

Any idea why this is happening? Please check the executor at the beginning of the first iteration. We set timestep as 0.

csampat commented 6 years ago

I know the issue since the files in the test folder are starting from 9000000 but we are lookking for files froom time step 0. I guess I could rename all of them to start from 0. Then it should work

iparask commented 6 years ago

Okay! That is fixed! It does not return though PBM_init_time_step in the DEM_status.json.

Can you add it?

csampat commented 6 years ago

I have added it

iparask commented 6 years ago

Hello Chaitanya,

/Volumes/Data/Repositories/Collaborations/CyberManufacturing/src/executor/executor.py in _check_DEM_status(self, status_file)
    325         dem_timestep      = status_dict['DEM_time_step']
    326         pbm_init_timestep = status_dict['PBM_init_time_step']
--> 327         pbm_mixing_time   = status_dict['mixing_times']
    328
    329         return cont,dem_timestep,pbm_init_timestep,pbm_mixing_time

KeyError: 'mixing_times'

Can you please correct this one. One suggestion though: Can you go to the DEM status and PBM status and make sure that all the values expected from these methods exist in the respective json files? Also, when committing after you fix these can you remember to disable the hardwired line. Actually, I would suggest to remove that one completely and use the command prompt to test. That in the same time tests the correctness of our inputs from the terminal and as a result will make sure that the unit discription is correct.

Thank you

csampat commented 6 years ago

okay fixed the issue it was mixing_time instead of mixing_times So i have changed it to the nomenclature you have used. I will be updating the hard coded values to the format the PBM executable will take (once i discuss with yuktesh).

iparask commented 6 years ago

I mean the line you are using to test your script. For example:

#abcd = controller_DEMresource_main(int(sys.argv[1]), int(sys.argv[2]), sys.argv[3])
abcd =controller_DEMresource_main(9000000, 16 ,'/home/chai/Documents/git/CyberManufacturing/src/dummy_DEM_PBM/sample_copy')

Just before you commit make sure that you comment the one with your absolute path and leave uncommented the other one. It threw me off a couple of times.

Thank you

csampat commented 6 years ago

Oh sorry i will fix that as well with the new commit

iparask commented 6 years ago
Traceback (most recent call last):
  File "controllerPBMresourceMain.py", line 117, in <module>
    abcd.main()
  File "controllerPBMresourceMain.py", line 58, in main
    obj_inter = PBMinter.controllerPBMDataInterpretor(self.initial_timestep, self.compartments, self.bins1, self.bins2, self.pbm_output_path)
  File "/Users/iparask/radical.pilot.sandbox/test1/pilot.0000/unit.000003/controllerPBMDataInterpretor.py", line 36, in __init__
    self.init_data_storage(self.initial_ts)
  File "/Users/iparask/radical.pilot.sandbox/test1/pilot.0000/unit.000003/controllerPBMDataInterpretor.py", line 46, in init_data_storage
    self.initial_d50 = obj_PBM_reader.data_d50_extractor(init_ts)
  File "/Users/iparask/radical.pilot.sandbox/test1/pilot.0000/unit.000003/controllerPBMDataReader.py", line 89, in data_d50_extractor
    curr_ts = self.nextfile_time_finder(curr_ts)
  File "/Users/iparask/radical.pilot.sandbox/test1/pilot.0000/unit.000003/controllerPBMDataReader.py", line 40, in nextfile_time_finder
    num_start_particles = re.search("particles_",particles_file_list[0]).end()
IndexError: list index out of range

Input look like:

python "controllerPBMresourceMain.py" "0.0" "16" "16" "16" "/Users/iparask/radical.pilot.sandbox/test1/pilot.0000/unit.000002/csvDump" "25" "0" "10000000" "0.2" "0.2" "16" "15" "476"
csampat commented 6 years ago

Is this for test 1 or test 2??

iparask commented 6 years ago

test 1

csampat commented 6 years ago

have you passed the path correctly? the list of the files is not being populated since it cannot find the first element in that list

csampat commented 6 years ago

you do not need to add a "/" at the end of the path, it is already taken care of in the code

iparask commented 6 years ago

/test1/pilot.0000/unit.000002/csvDump" There is no / at the end of the path

iparask commented 6 years ago
Ioannis’s Mac unit.000003$ cd ../unit.000002/csvDump/
Ioannis’s Mac csvDump$ ls
Ioannis’s Mac csvDump$

This folder is empty. Is it trying to find a file and it fails?

csampat commented 6 years ago

Yes it is trying to file a file there but it should wait for 5 seconds before another recheck and then it should fail. ( you can increase this time in the PBMcontrollerMain.py in line 56 by changing it to a larger integer, the value being in seconds) secondly pass the time as 0.000000 (double float precision) and not 0.0 since i directly use that value to locate the file and all the output files have double float precision

iparask commented 6 years ago

The d50* and particles csv sholud be in the csvDump foler?

csampat commented 6 years ago

closing this