You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "NEUpanning (via GitHub)" <gi...@apache.org> on 2024/04/28 02:24:57 UTC

[I] nproc command in compile.sh isn't compatible with MacOS [incubator-gluten]

NEUpanning opened a new issue, #5559:
URL: https://github.com/apache/incubator-gluten/issues/5559

   ### Problem description
   
   incubator-gluten/cpp/compile.sh script use `nproc` command to get the number of processing units available but MacOS dosen't support this comand. Here is the [code](https://github.com/apache/incubator-gluten/blob/main/cpp/compile.sh#L33). 
   
   ### System information
   
   none
   
   ### CMake log
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [I] nproc command in compile.sh isn't compatible with MacOS [incubator-gluten]

Posted by "NEUpanning (via GitHub)" <gi...@apache.org>.
NEUpanning commented on issue #5559:
URL: https://github.com/apache/incubator-gluten/issues/5559#issuecomment-2081312154

   @PHILO-HE I opened [PR](https://github.com/apache/incubator-gluten/pull/5560) for this issue. Could you take a look? Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [I] nproc command in compile.sh isn't compatible with MacOS [incubator-gluten]

Posted by "PHILO-HE (via GitHub)" <gi...@apache.org>.
PHILO-HE commented on issue #5559:
URL: https://github.com/apache/incubator-gluten/issues/5559#issuecomment-2081304832

   Yes, you can fix it like https://github.com/apache/incubator-gluten/blob/main/dev/builddeps-veloxbe.sh#L37. Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [I] nproc command in compile.sh isn't compatible with MacOS [incubator-gluten]

Posted by "NEUpanning (via GitHub)" <gi...@apache.org>.
NEUpanning commented on issue #5559:
URL: https://github.com/apache/incubator-gluten/issues/5559#issuecomment-2081297061

   I would like to resolve this issue. We could get the number of processing units available like this code 
   ```
   if [[ "$(uname)" == "Darwin" ]]; then
       physical_cpu_cores=$(sysctl -n hw.physicalcpu)
       ignore_cores=2
       if [ "$physical_cpu_cores" -gt "$ignore_cores" ]; then
           NPROC=${NPROC:-$(($physical_cpu_cores - $ignore_cores))}
       else
           NPROC=${NPROC:-$physical_cpu_cores}
       fi
   else
       NPROC=${NPROC:-$(nproc --ignore=2)}
   fi
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [I] nproc command in compile.sh isn't compatible with MacOS [incubator-gluten]

Posted by "ulysses-you (via GitHub)" <gi...@apache.org>.
ulysses-you commented on issue #5559:
URL: https://github.com/apache/incubator-gluten/issues/5559#issuecomment-2081367115

   In general, we can use nproc on macOS by `brew install coreutils`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [I] nproc command in compile.sh isn't compatible with MacOS [incubator-gluten]

Posted by "PHILO-HE (via GitHub)" <gi...@apache.org>.
PHILO-HE closed issue #5559: nproc command in compile.sh isn't compatible with MacOS
URL: https://github.com/apache/incubator-gluten/issues/5559


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [I] nproc command in compile.sh isn't compatible with MacOS [incubator-gluten]

Posted by "NEUpanning (via GitHub)" <gi...@apache.org>.
NEUpanning commented on issue #5559:
URL: https://github.com/apache/incubator-gluten/issues/5559#issuecomment-2081306823

   Thanks for your reply. I'll open a pull request for this issue. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org