mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Information & Answers (https://www.mersenneforum.org/forumdisplay.php?f=38)
-   -   Argument for build path CADO-NFS (https://www.mersenneforum.org/showthread.php?t=23855)

md12345 2018-12-03 00:25

Argument for build path CADO-NFS
 
When running the cado-nfs.py, is there a parameter setting that I can change that sets the path for the polyselect binaries. I am building the project on one computer with a specific hostname but will potentially be run on several different machines with different hostnames. It tried to find the file in /cado-nfs-2.3.0/build/hostname/ but I would like this to be static if possible.

EdH 2018-12-03 03:23

I'm not positive I understand your question, but the answer might be the "--binddir=" option. That is how I set it for clients in the below thread, but I don't know if it would work for separate servers.

If it might help, I have some info at:

[URL="https://www.mersenneforum.org/showthread.php?t=23091"]How I Run a Larger Factorization Via CADO-NFS on Several Ubuntu Machines[/URL]

VBCurtis 2018-12-03 04:26

I'm also unsure I understand your situation, but I think you should build CADO on each machine separately; my understanding is that if you do so, each installation will handle finding its own binaries just fine.
I am not at all sure this addresses what you asked, though.

md12345 2018-12-03 04:39

I am running this on a computing cluster with several different nodes, each having a different hostname, which I don't have sudo access to, so my only option is to use a docker container and build the image with singularity. When building the docker container it uses some random hostname like "1c23ef967" as the hostname. I have been changing it to a specific hostname for a regularly available node, but I would like to have one image so I can potentially run it on other nodes.

To clarify, when I build it in the docker container, I switch the directory name to "node1" so that it can run on a particular node. However, if I want to run it on an additional node, say "node2", when it tries running cado-nfs, it looks for the directory ~/cado-nfs-2.3.0/build/node2... and it can't find it since the directory is called ~/cado-nfs-2.3.0/build/node1. I could build an individual image for each node, but there are more than 75 nodes in the cluster, so I would prefer not to do that if possible.

md12345 2018-12-03 04:47

[QUOTE=EdH;501549]I'm not positive I understand your question, but the answer might be the "--binddir=" option. That is how I set it for clients in the below thread, but I don't know if it would work for separate servers.

If it might help, I have some info at:

[URL="https://www.mersenneforum.org/showthread.php?t=23091"]How I Run a Larger Factorization Via CADO-NFS on Several Ubuntu Machines[/URL][/QUOTE]

Thanks, I will check out that option, I had not seen that.

EdH 2018-12-03 16:10

I"m not sure if this will help and you may already be aware of these, but you can find the local hostname and username in the following manners and possibly set these at the time of your call.

for bash:

$USER holds the current user (try echo $USER)
$HOME holds the user absolute path (try echo $HOME)
$HOSTNAME holds the hostname (try echo $HOSTNAME)

for Python:

import getpass
getpass.getuser()

import socket
socket.gethostname()

Perhaps this or something similar will work.

md12345 2018-12-03 16:44

[QUOTE=EdH;501580]I"m not sure if this will help and you may already be aware of these, but you can find the local hostname and username in the following manners and possibly set these at the time of your call.

for bash:

$USER holds the current user (try echo $USER)
$HOME holds the user absolute path (try echo $HOME)
$HOSTNAME holds the hostname (try echo $HOSTNAME)

for Python:

import getpass
getpass.getuser()

import socket
socket.gethostname()

Perhaps this or something similar will work.[/QUOTE]

Sorry, I meant to post a response with my solution but have been a bit busy with other things. What I ended up doing was:
[INDENT]sourcedir=/cado-nfs-2.3.0
builddir=$(sourcedir)/build/desktop
tasks.workdir = /tmp/work/
tasks.execpath=$(builddir)
[/INDENT]
I built the docker image and changed the hostname to "desktop" which is the hostname of my desktop for debugging purposes. I just decided to reuse this image and have all the nodes look for $(sourcedir)/build/desktop rather than $(source)/build/$(hostname) which solved my problem.

EdH 2018-12-03 20:51

Great to read you have it working...


All times are UTC. The time now is 23:27.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.