Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion linx/reactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ def __init__(
self.expsigma_vec = jax.device_put(
self.expsigma_vec, device=gpus[0]
)
except:
except (RuntimeError, IndexError):
# No GPU available or no GPU devices found - data stays on CPU
pass

elif frwrd_rate_param_func is not None:
Expand Down
3 changes: 2 additions & 1 deletion linx/thermo.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,8 @@ def p_massive_MB(T, mu, m, g):
f_numu_ann_tab = device_put(
f_numu_ann_tab, device=gpus[0]
)
except:
except (RuntimeError, IndexError):
# No GPU available or no GPU devices found - data stays on CPU
pass


Expand Down
6 changes: 4 additions & 2 deletions linx/weak_rates.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def __init__(self,
self.L_nTOpCCRTh_res = jax.device_put(
self.L_nTOpCCRTh_res, device=gpus[0]
)
except:
except (RuntimeError, IndexError):
# No GPU available or no GPU devices found - data stays on CPU
pass

self.T_pTOn_thermal_interval, self.L_pTOnCCRTh_res = np.loadtxt(
Expand All @@ -119,7 +120,8 @@ def __init__(self,
self.L_pTOnCCRTh_res = jax.device_put(
self.L_pTOnCCRTh_res, device=gpus[0]
)
except:
except (RuntimeError, IndexError):
# No GPU available or no GPU devices found - data stays on CPU
pass

else:
Expand Down