Try running quokka on a bare metal server #1295
-
|
Hi all, I am trying to run quokka on a bare metal server by using this command:
And the error is: An information mighe be helpful: in the output file, it shows SET CUDA_VISIBLE_DEVICES=, which indicates the script didn't understand $OMPI_COMM_WORLD_LOCAL_RANK correctly. What should I do? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
The error happens because CUDA_VISIBLE_DEVICES is being set to an empty value—your shell isn't expanding $OMPI_COMM_WORLD_LOCAL_RANK as you expect in the mpirun command. This means Quokka (via AMReX) can't see any GPUs and aborts with CUDA error 100 "no CUDA-capable device is detected". To fix this, you need to ensure each MPI process gets the correct GPU ID. The typical approach is to use a wrapper script so that the environment variable is set per process after MPI launches it. For example, create a small shell script like: #!/bin/bash
export CUDA_VISIBLE_DEVICES=${OMPI_COMM_WORLD_LOCAL_RANK}
exec "$@"Then launch with: mpirun -np 8 --bind-to core --map-by core --allow-run-as-root \
bash wrapper.sh src/problems/HydroBlast3D/test_hydro3d_blast ../inputs/benchmark_unigrid_256.inThis way, each MPI process will have CUDA_VISIBLE_DEVICES set to its local rank, and Quokka should detect the GPUs correctly. Also, double-check that your server has CUDA-capable GPUs, the drivers and CUDA toolkit are installed, and Quokka is built with GPU support ( Let me know if you need help with a wrapper script or further troubleshooting! To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
The error happens because CUDA_VISIBLE_DEVICES is being set to an empty value—your shell isn't expanding $OMPI_COMM_WORLD_LOCAL_RANK as you expect in the mpirun command. This means Quokka (via AMReX) can't see any GPUs and aborts with CUDA error 100 "no CUDA-capable device is detected".
To fix this, you need to ensure each MPI process gets the correct GPU ID. The typical approach is to use a wrapper script so that the environment variable is set per process after MPI launches it. For example, create a small shell script like:
Then launch with: