Bladeren bron

Rather use '-' for ranges instead of ':', like hwloc does

Samuel Thibault 9 jaren geleden
bovenliggende
commit
af7ecc6c9a
2 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 2 2
      doc/doxygen/chapters/40environment_variables.doxy
  2. 1 1
      src/core/topology.c

+ 2 - 2
doc/doxygen/chapters/40environment_variables.doxy

@@ -140,10 +140,10 @@ bound. For instance, if <c>STARPU_WORKERS_CPUID = "0 1 4 5"</c>, the first
 worker will be bound to logical CPU #0, the second CPU worker will be bound to
 worker will be bound to logical CPU #0, the second CPU worker will be bound to
 logical CPU #1 and so on.  Note that the logical ordering of the CPUs is either
 logical CPU #1 and so on.  Note that the logical ordering of the CPUs is either
 determined by the OS, or provided by the library <c>hwloc</c> in case it is
 determined by the OS, or provided by the library <c>hwloc</c> in case it is
-available. Ranges can be provided: for instance, <c>STARPU_WORKERS_CPUID = "1:3
+available. Ranges can be provided: for instance, <c>STARPU_WORKERS_CPUID = "1-3
 5"</c> will bind the first three workers on logical CPUs #1, #2, and #3, and the
 5"</c> will bind the first three workers on logical CPUs #1, #2, and #3, and the
 fourth worker on logical CPU #5. Unbound ranges can also be provided:
 fourth worker on logical CPU #5. Unbound ranges can also be provided:
-<c>STARPU_WORKERS_CPUID = "1:"</c> will bind the workers starting from logical
+<c>STARPU_WORKERS_CPUID = "1-"</c> will bind the workers starting from logical
 CPU #1 up to last CPU.
 CPU #1 up to last CPU.
 
 
 Note that the first workers correspond to the CUDA workers, then come the
 Note that the first workers correspond to the CUDA workers, then come the

+ 1 - 1
src/core/topology.c

@@ -593,7 +593,7 @@ _starpu_initialize_workers_bindid (struct _starpu_machine_config *config)
 					topology->workers_bindid[i] =
 					topology->workers_bindid[i] =
 						(unsigned)(val % topology->nhwpus);
 						(unsigned)(val % topology->nhwpus);
 					strval = endptr;
 					strval = endptr;
-					if (*strval == ':')
+					if (*strval == '-')
 					{
 					{
 						/* range of values */
 						/* range of values */
 						long int endval;
 						long int endval;