ThFriedrich/lammps_vscode

Task provider not configured for Windows

Closed this issue · 1 comments

Describe the bug
Can't utilize the task provider for lammps binaries on windows

To Reproduce

  1. Tasks: Configure Task
  2. In tasks.json set "binary": "C:/Users/username/AppData/Local/LAMMPS\\ 64-bit\\ 15Sep2022/bin/lmp.exe"
  3. In tasks.json set "mpi_tasks": 0
  4. In tasks.json set "gpu_tasks": 1

When running get:

ERROR: Invalid command-line argument (src/lammps.cpp:441)

This is due the path is not escaped properly for input script/file.

Desktop

  • OS: Windows 10
  • LAMMPS: 15 Sept 2022

Additional context
This is with the default terminal set to Git Bash

Also, would be useful to be able to provide additional command line arguments to lammps so something like including "args": ["-sf opt"]

Hi Stefan,

Thanks for the bringing this to our attention. The "args" flag was added with this commit and ships with version 1.7.0. I believe this should do what you're asking for. As for how to properly format the path in the task configuration for Windows I am not sure, but it doesn't seem like an issue of the extension to me, but a more generic Windows/PowerShell topic. The lammps-task really just passes whatever string is given as binary to the shell/command prompt.