igmhub / LaCE

Emulator for the one-dimensional Lyman-alpha flux power spectrum. It was used to generate the results shown in https://arxiv.org/abs/2011.15127, https://arxiv.org/abs/2209.09895, and https://arxiv.org/abs/2305.19064.
1 stars 3 forks source link

Hide CUDA a bit more #38

Closed andreufont closed 1 year ago

andreufont commented 1 year ago

When running the forecast code of cup1d with LaCE-NN, I get the following error:

RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method

I thought we were not using CUDA when running with CPUs?

andreufont commented 1 year ago

Laure found a way to avoid this by setting os.environ['CUDA_VISIBLE_DEVICES'] = ""

I have this now in my .bashrc: export CUDA_VISIBLE_DEVICES=""