khanna-lab / cadre

Other
0 stars 0 forks source link

Dump parameters to output/parameters.txt #123

Closed dsheeler closed 1 year ago

khanna7 commented 1 year ago

I get the following errors when I run the model through emus on this branch:

new_cadre_env_4) [akhann16@vscode1 swift]$ more turbine-output/instance_1/out.txt 
Running python3 -m pycadre /oscar/data/akhann16/akhann16/cadre_simulated_data/emews_experiments/testY/params.yaml {"random.seed": 1, "SMOKING_NETWORK_EFF
ECTS": {"ONSET": {"FIRST_DEGREE": 1.21}}, "ALCOHOL_NETWORK_EFFECTS": {"ONSET": {"FIRST_DEGREE": 1.1}}}
Random seed: 1
RNG:  Generator(PCG64)
RNG type: <class 'numpy.random._generator.Generator'>
---> Error in /gpfs/data/akhann16/sfw/tcl-8.6.12/bin/tclsh8.6 /oscar/data/akhann16/akhann16/cadre_simulated_data/emews_experiments/testY/swift-t-pytest.U
uE.tic testY cfgs/pycadre.cfg -f=/oscar/data/akhann16/akhann16/cadre_simulated_data/emews_experiments/testY/upf.txt -param_file=/oscar/data/akhann16/akha
nn16/cadre_simulated_data/emews_experiments/testY/params.yaml
(new_cadre_env_4) [akhann16@vscode1 swift]$ more turbine-output/instance_1/err.txt 
module: unloading 'python/2.7.12'
module: loading 'python/3.9.0'
OpenCL: Failed to get number of platforms with clGetPlatformIDs(): -1001
CUDA: Failed to get number of devices with cudaGetDeviceCount(): CUDA driver version is insufficient for CUDA runtime version
Traceback (most recent call last):
  File "/gpfs/runtime/opt/python/3.9.0/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/gpfs/runtime/opt/python/3.9.0/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/gpfs/home/akhann16/code/cadre/python/pycadre/__main__.py", line 36, in <module>
    main()
  File "/gpfs/home/akhann16/code/cadre/python/pycadre/__main__.py", line 29, in main
    model = cadre_model.Model(params=params_list, comm=MPI.COMM_WORLD)
  File "/gpfs/home/akhann16/code/cadre/python/pycadre/cadre_model.py", line 48, in __init__
    self.dump_parameters()
  File "/gpfs/home/akhann16/code/cadre/python/pycadre/cadre_model.py", line 154, in dump_parameters
    with open(params_file, 'w') as p:
FileNotFoundError: [Errno 2] No such file or directory: 'output/parameters.txt'
(new_cadre_env_4) [akhann16@vscode1 swift]$