radical-collaboration / extasy-bpti

0 stars 1 forks source link

MPI and OpenMP not recognized global in cpu_reqs settings #10

Open FranklinBetten opened 5 years ago

FranklinBetten commented 5 years ago

I have done some debugging of the code and I cannot seem figure out why MPI and OpenMP are not accepted parameters.

radical stack

(myenv) hal9000@js-17-39:~/Documents/feature_entk-0.7/bw_sync_01/bw_p14b02_left_d3_k12_1000_k34_1000_1ns_sims_02$ radical-stack 

  python               : 2.7.12
  pythonpath           : 
  virtualenv           : /home/hal9000/Documents/feature_entk-0.7/myenv

  radical.entk         : 0.7.6
  radical.pilot        : 0.50.11-v0.50.11@devel
  radical.utils        : 0.50.2
  saga                 : 0.50.0

cpu_reqs settings in runme.py

t.cpu_reqs = md_stage_core_settings
md_stage_core_settings = { 'processes':Kconfig.num_cores_per_sim_cu/32,'process_type':MPI, 'threads_per_process':32,'thread_type':OpenMP }

executing runme.py from the terminal

EnTK session: re.session.js-17-39.jetstream-cloud.org.hal9000.017819.0003
Creating AppManager                                                           ok
Validating and assigning resource manager                                     ok
Current run failed with error:  Attribute executable in None undefined
Traceback (most recent call last):
  File "runme.py", line 626, in <module>
    appman.workflow = [extasy_pipeline]
  File "/home/hal9000/Documents/feature_entk-0.7/myenv/local/lib/python2.7/site-packages/radical/entk/appman/appmanager.py", line 225, in workflow
    p._validate()
  File "/home/hal9000/Documents/feature_entk-0.7/myenv/local/lib/python2.7/site-packages/radical/entk/pipeline/pipeline.py", line 315, in _validate
    stage._validate()
  File "/home/hal9000/Documents/feature_entk-0.7/myenv/local/lib/python2.7/site-packages/radical/entk/stage/stage.py", line 355, in _validate
    task._validate()
  File "/home/hal9000/Documents/feature_entk-0.7/myenv/local/lib/python2.7/site-packages/radical/entk/task/task.py", line 820, in _validate
    missing_attribute='executable')
radical.entk.exceptions.MissingError: Attribute executable in None undefined

cpu_reqs settings in runme.py

t.cpu_reqs = md_stage_core_settings
md_stage_core_settings = { 'processes':Kconfig.num_cores_per_sim_cu/32,'process_type':MPI, 'threads_per_process':32,'thread_type':OpenMP }

executing runme.py from the terminal

EnTK session: re.session.js-17-39.jetstream-cloud.org.hal9000.017819.0005
Creating AppManager                                                           ok
Validating and assigning resource manager                                     ok
Current run failed with error:  global name 'OpenMP' is not defined
Traceback (most recent call last):
  File "runme.py", line 625, in <module>
    extasy_pipeline = generate_pipeline(1,Kconfig.num_iterations,Kconfig.num_CUs)
  File "runme.py", line 65, in generate_pipeline
    md_stage_core_settings = { 'processes':Kconfig.num_cores_per_sim_cu/32,'process_type':None, 'threads_per_process':32,'thread_type':OpenMP }    
NameError: global name 'OpenMP' is not defined

When I set both options to None I get this error

(myenv) hal9000@js-17-39:~/Documents/feature_entk-0.7/bw_sync_01/bw_p14b02_left_d3_k12_1000_k34_1000_1ns_sims_02$ python runme.py --Kconfig gmxcoco.wcfg --RPconfig bluewaters.rcfg
EnTK session: re.session.js-17-39.jetstream-cloud.org.hal9000.017819.0006
Creating AppManager                                                           ok
Validating and assigning resource manager                                     ok
Current run failed with error:  Attribute executable in None undefined
Traceback (most recent call last):
  File "runme.py", line 626, in <module>
    appman.workflow = [extasy_pipeline]
  File "/home/hal9000/Documents/feature_entk-0.7/myenv/local/lib/python2.7/site-packages/radical/entk/appman/appmanager.py", line 225, in workflow
    p._validate()
  File "/home/hal9000/Documents/feature_entk-0.7/myenv/local/lib/python2.7/site-packages/radical/entk/pipeline/pipeline.py", line 315, in _validate
    stage._validate()
  File "/home/hal9000/Documents/feature_entk-0.7/myenv/local/lib/python2.7/site-packages/radical/entk/stage/stage.py", line 355, in _validate
    task._validate()
  File "/home/hal9000/Documents/feature_entk-0.7/myenv/local/lib/python2.7/site-packages/radical/entk/task/task.py", line 820, in _validate
    missing_attribute='executable')
radical.entk.exceptions.MissingError: Attribute executable in None undefined
andre-merzky commented 5 years ago

I am not really sure how that code is supposed to look like - but I think the error tells you that executable is not set, and that OpenMP is not a valid variable name in that code. Is the latter maybe supposed to be a string ("OpenMP")? On the RP layer, you would use the define rp.OpenMP, FWIW, but I do not know how EnTK exposes this (if at all)

vivek-bala commented 5 years ago

Hey @FranklinBetten , Andre pointed out correctly. Both mpi and openmp have to be strings, i.e., use 'MPI' and 'OpenMP'.

I also think there you are missing specification of the executable of a Task, which is mandatory.

Attribute executable in None undefined

I believe it shows up as 'None' since we currently look for a uid and not a name, and the uid is not assigned at this point.

FranklinBetten commented 5 years ago

I pushed an updated runmy.py to the git. It gives the same error though. Is there any other issue that could be causing this? I also checked and it looks like all of the Task() and add_tasks() are correct.

I am currently a little stuck. Do I need to load a multiprocessing library? I see that in some of Eugenes codes but not all of them.

vivek-bala commented 5 years ago

Hey Franklin, I just pushed a commit where I addressed the error. There were some tasks which had not be assigned an executable. See if that makes sense. Let me know how it goes!