Skip to content

Radis on Colab with GPU #28

Description

@erwanp

A first attempt to run RADIS on Google-colab with GPU (note that GPU must be enabled in Edit / Notebook settings)

https://colab.research.google.com/drive/1RnbAm_YIBZJW-7fEXp60oGFX8iAt_951#scrollTo=WRHD7xue_-yw

!pip install radis

Got radis 0.10.3

from radis import calc_spectrum
s = calc_spectrum(1900, 2300,         # cm-1
                  molecule='CO',
                  isotope='1,2,3',
                  pressure=1.01325,   # bar
                  Tgas=700,           # K
                  mole_fraction=0.1,
                  path_length=1,      # cm
                  databank='hitemp',  # or use 'hitemp'
                  verbose=False,
                  mode='gpu'
                  )
s.apply_slit(0.5, 'nm')       # simulate an experimental slit
s.plot('radiance')

Failed with the following :

RADIS configuration file created in /root/radis.json
Added HITEMP-CO database in /root/radis.json
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-3-428ebed103f5> in <module>()
      9                   databank='hitemp',  # or use 'hitemp'
     10                   verbose=False,
---> 11                   mode='gpu'
     12                   )
     13 s.apply_slit(0.5, 'nm')       # simulate an experimental slit

3 frames
/usr/local/lib/python3.7/dist-packages/radis/lbl/gpu.py in <module>()
     67 # TO-DO: read and compile CUDA code at install time, then pickle the cuda object
     68 cuda_fname = join(getProjectRoot(), "lbl", "gpu.cu")
---> 69 with open(cuda_fname, "rb") as f:
     70     cuda_code = f.read().decode()
     71 

FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.7/dist-packages/radis/lbl/gpu.cu'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions