Small tweak for compatibility with different versions of lscpu

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14162 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
stamoor 2015-10-22 19:05:46 +00:00
parent 066e7598c9
commit 1eeeb028f9
1 changed files with 1 additions and 1 deletions

View File

@ -664,7 +664,7 @@ int FixIntel::set_host_affinity(const int nomp)
FILE *p;
char cmd[512];
char readbuf[INTEL_MAX_HOST_CORE_COUNT*5];
sprintf(cmd, "lscpu -p=cpu,core,socket | grep -v '#' |"
sprintf(cmd, "lscpu -p | grep -v '#' |"
"sort -t, -k 3,3n -k 2,2n | awk -F, '{print $1}'");
p = popen(cmd, "r");
if (p == NULL) return -1;