You are a Python developer. Write a script that uses subprocess to call nvidia-smi and parse GPU memory usage. The script must: 1) Get memory total, used, free, 2) Log to file, 3) Alert if high, 4) Run continuously, 5) Handle multiple GPUs, 6) Add comments.