Can I start parallel run of LAMMPS from inside a C++ code. Is it possible to compile my code and then do mpirun with my compiled code. I also have one system command inside the code, which starts parallel instances of LAMMPS with mpirun.
Look at https://github.com/jeffhammond/HPCInfo/blob/master/docs/LAMMPS.mediawiki and https://github.com/awlange/lammps_ensembles. We did exactly this for the purpose of umbrella sampling etc.
Interface to PLUMED worked, among other things.