# how to make "static" built binaries use multiple cpus like "mpi"?

4 posts / 0 new
how to make "static" built binaries use multiple cpus like "mpi"?
#1

Dear Friends,

I downloaded rosetta static binaries "Rosetta 3.10 source + binaries for Linux - as one bundle (13G)"  on my centos6.9. I can see that  the executable in the "main/source/bin" are working, but how can I run these static executables (such as "AbinitioRelax.static.linuxgccrelease" ) on multple CPUs? Can I use "mpiexec" with these executables?

Thanks!

Post Situation:
Wed, 2019-09-18 06:41
Danielsebas

While some scientists do use 'mpi', many of them also just have simple scripts setup that will just run seperate instances of rosetta in parallel.

if low memory usage is required for you, you will need 'mpi' otherwise i would suggest this approach.

mpiexec -n20 ~/...AbinitioRelax -out:file:silent all_20_results.silent

==

~/...AbinitioRelax -nstruct 1 -out:file:silent result_1.silent
~/...AbinitioRelax -nstruct 1 -out:file:silent result_2.silent
~/...AbinitioRelax -nstruct 1 -out:file:silent result_3.silent
...
~/...AbinitioRelax -nstruct 1 -out:file:silent result_20.silent



if someone else knows more about mpi they can persuade you in the opposite direction if they think it's easy enough.

Wed, 2019-09-18 07:17
danpf

Thanks for the response! For the latter, we will have to write 5000 lines for 5000 structures, right? however, I wanted to ask that:

Can I use "mpiexec" with "AbinitioRelax.static.linuxgccrelease" like this:

mpiexec -np 16 ../main/source/bin/AbinitioRelax.static.linuxgccrelease -database ../main/database/ @options -mpi_tracer_to_file log

thanks!

Wed, 2019-09-18 07:45
Danielsebas

You can't use AbinitioRelax.static.linuxgccrelease with MPI, but you can recompile with both MPI and with static by adding extras=static,mpi to the scons command line. (If you launch AbinitioRelax.static.linuxgccrelease  with mpiexec, you'll likely get garbage as there mulitple processes don't have any coordination and will overwrite each other.)

We don't provide a precompiled MPI-enabled build because the MPI libraries differ quite substantially from cluster to cluster. Generally speaking, you'll need to recompile Rosetta for the particular MPI environment you have on the clusters you're using.

If you don't use MPI, you don't necessarily need to do 5000 separate runs for 5000 structures. The -nstruct option controls the number of output structures per command. Since each output structure of AbinitioRelax is independent of the others you can do -nstruct 5000 with one command, or -nstruct 1 for 5000 commands, or -nstruct 100 for 50 commands, or -nstruct 313 for 16 commands. It's all about what you want to do with respect to balancing the number of processors you're using versus the runtime of each command.

(BTW, when you do the split, be careful about how you launch the commands. If you naively use a standard shell script and don't put each Rosetta command in the background, the script will wait for each Rosetta run to finish before it starts the next. This doesn't really have any benefits over simply doing a larger nstruct.)

Wed, 2019-09-18 10:21
rmoretti