golemfactory / gumpi

MPI on Golem Unlimited PoC
GNU Affero General Public License v3.0
2 stars 3 forks source link

Workaround inconsitent paths on multiple nodes. #27

Closed marmistrz closed 5 years ago

marmistrz commented 5 years ago

Due to the Golem Unlimited design, every provider has their binaries placed in a different directory, depending on the UUID of the session.

This change works it around by using a symlink to /tmp and placing the resulting binary there.

mplebanski commented 5 years ago

I understand that Golem Unlimited will only clean session directory after it's done with computing on a provider node. What about artifacts left in /tmp?

kubkon commented 5 years ago

I understand that Golem Unlimited will only clean session directory after it's done with computing on a provider node. What about artifacts left in /tmp?

BTW, there's a generic way to access "/tmp" on any OS std::env::temp_dir.

marmistrz commented 5 years ago

Yes, this will leave artifacts in /tmp but we can actually control what CMake puts into /tmp. We could create a gumpi-<some random stuff> subdirectory and remove it after the execution. Possible <some random stuff> could be the hub session id, since it'll be 1-1 with the gumpi executions. This would require adding more wrappers (for rm and mkdir) to the gumpi image.

BTW, there's a generic way to access "/tmp" on any OS std::env::temp_dir.

But we need the tmpdir on the provider node and not on the host executing gumpi. For instance, I'd imagine gumpi to run under Windows or Mac even when the provider nodes run Linux.

mplebanski commented 5 years ago

OK I propose that we merge it as is and open an issue for removing orphaned artifacts from /tmp.

marmistrz commented 5 years ago

Kay, I'm going to fix the Path.join comment no later than tomorrow in the morning.