Open makeasnek opened 1 year ago
Unfortunately, I don't think there is any way to run 2 BOINC clients on the same Mac. Even if you can, it's probably not a good idea. You can't have 2 different clients or 2 BOINC Managers use the same BOINC Data directory, as they would conflict. While you can tell the client to use a different directory via the --dir
argument, the BOINC Manager always expects to find the BOINC Data directory at /Library/Application Support/BOINC Data
.
While it's possible to move the BOINC Data directory, that requires placing a symbolic link /Library/Application Support/BOINC Data
pointing to the relocated BOINC Data directory, so both Managers would still try to use the same data. As a result, you couldn't use BOINC Manager to control the second client. The alternative method of controlling the client, the command line program boinccmd (provided with the Unix Command-line Version for MacOS available from here) also requires that the BOINC Data directory is at /Library/Application Support/BOINC Data
. I don't know if there are third-party applications that could work; you could ask in the BOINC forums.
But there is potentially an additional problem with running more than one client on the same computer. Some of the tests used to limit BOINC's use of the computer's resources may not calculate usage resource correctly if more than one client is running.
If you do find a way to run two clients and decide to do so, please do not use the --insecure
argument. Insead, please set up the permissions correctly for the new BOINC Data directory using the _Mac_SASecure.sh script as explained here, passing the path to your new BOINC Data directory.
What is your purpose in running more than one client on the same computer? There may be better ways to accomplish your goal.
Thank you Charlie for your insightful reply. The goal is not to run two copies of BOINC simultaneously, but to have two separate installs which run at different times. Some of the more common use cases for this may be:
In my particular use case, I am writing a new version of my tool FindTheMag which directly controls BOINC according to user preferences, often to have BOINC prioritize the projects which will earn them the most Gridcoin. Part of the crunching time is used to create a "dev fee" of 1-5% similar to other mining tools. All the crunching power still goes to BOINC projects, but for 1-5% of the time BOINC will crunch under the developer's account instead of the user's main one. With their permission and consent, of course.
The solution I have arrived at for this is simply creating two seperate BOINC data dirs (both copies of BOINC use the same binary). When it's time to crunch for dev, I suspend the main install and start the dev install, which is attached to various BOINC projects using my credentials. This has worked flawlessly on Windows and Linux, I simply make a seperate dir and RPC port and pass it in when invoking BOINC. BOINC manager can even happily talk to both of these instances, though that functionality is not really needed in my use case, but it is nice for debugging purpose. Unfortunately for OS X it seems more complicated.
"While it's possible to move the BOINC Data directory, that requires placing a symbolic link /Library/Application Support/BOINC Data pointing to the relocated BOINC Data directory, so both Managers would still try to use the same data. " <-- Is this not the purpose of the --dir argument? Or does --dir simply not do anything on OS X?
"While it's possible to move the BOINC Data directory, that requires placing a symbolic link /Library/Application Support/BOINC Data pointing to the relocated BOINC Data directory, so both Managers would still try to use the same data. " <-- Is this not the purpose of the --dir argument? Or does --dir simply not do anything on OS X?
The --dir argument affects only the client, not the Manager, at least on the Mac (I don't know about the Windows or Linux platforms without taking the time to figure it out from the code.) As I wrote above:
While you can tell the client to use a different directory via the --dir argument, the BOINC Manager always expects to find the BOINC Data directory at /Library/Application Support/BOINC Data.
In hindsight, it would have been better not to hard-code that path in the Macintosh BOINC Manager, boinccmd, etc. But changing it now would be time consuming and not a high priority. I've been trying to retire from BOINC but have been fixing problems caused by new versions of MacOS breaking BOINC code because there is no one else to do it.
Aah yes I see I did write this in a bit of a confusing way. I am looking to run two seperate copies of the client, not boinc manager. But using --dir seems to not be working no matter what combination of permissions I am putting on that dir.
But it sounds like the paths are hard-coded into boinccmd so even with --dir option, having a seperate data directory for a seperate instance of BOINC client is not doable? If so, I can cross this off my list of things to try to get working :).
In Windows at least (and I think Linux as well), both the BOINC Manager and boinccmd can control a second client without reference to the data directory, because the control messages are passed by GUI RPC over TCP/IP.
But there are other hurdles to jump to keep the two instances separate. I have these two command lines which enable a second instance to run under Windows - a prerequisite is that
Start second client:
D:\BOINC_v7-20-0\boinc --allow_multiple_clients --allow_remote_gui_rpc --redirectio --detach_console --gui_rpc_port 31418 --dir D:\BOINCdata2\
Start second Manager:
start D:\BOINC_v7-20-0\boincmgr.exe /m /n 127.0.0.1 /g 31418 /p password
Adapt as needed.
Unfortunately, the path to the BOINC Data directory is hard coded for the Mac build of boinccmd as "/Library/Application Support/BOINC Data". On Windows, the path is kept in the registry, so boinccmd can retrieve it. That path is needed to get the RPC GUI password, which is needed to perform the RPC communications, and possibly for other things.
If you are comfortable building BOINC as described here, you could modify that path on line 204 of _client/boinccmd.cpp and build a custom version of boinccmd.
But unless you disabled it deliberately, both boinccmd and BOINC Manager accept a password passed on the command line. Neither the data directory or the registry needs to be accessed when that is used.
I am trying to run a secondary BOINC installation on an OSX machine (12.6 monterey) and hoping somebody can help me out. This is BOINC 7.20.4
Ideally, I would like to use the original BOINC binary in the normal install location and simply pass it a seperate --dir option and --gui_rpc_port option but I suppose I could make a whole new install if that's the way this needs to be done.
I know OS X boinc has additional security permissions, so there is a warning that it won't run without the --insecure flag. When that flag is used, BOINC exits at start with error "chdir permission denied". I have tried chmodding the --dir to 777 and making it owned by boinc_master but neither of those work. I've also tried running Mac_SA_Secure.sh from inside the --dir directory but it errors out saying the switcher is missing. What can I do to get a separate BOINC install running?
I realize maybe it must be run with the --insecure flag in the end, but ideally I would run it with the standard security in-place This procedure works fine on Windows and Linux, it seems to be something specific to permissions on OS X. I checked /Users/username/Application Support/BOINC for any logs but none were there.
Thank you to anybody that can help with this dilemma.