ranganathanlab / bmDCA

Fork of matteofigliuzzi/bmDCA repository for Boltzmann-machine Direct Coupling Analysis (bmDCA).
GNU General Public License v3.0
33 stars 13 forks source link

I have been spending one week installing dependencies so would appreciate if you could document on this... #1

Closed chemgeeklian closed 4 years ago

chemgeeklian commented 4 years ago

Or make some automatic check and installation.

Sorry for saying this

sudorook commented 4 years ago

Which dependencies and on what platform?

chemgeeklian commented 4 years ago

Turned out to be an issue of Mac. I simply switched to a ubuntu system and it worked after I installed dh-autoreconf and pkg-config.

However, when I run an example as bmdca -i example/PF00014_raw.fasta -d output_directory -r -c config_file.conf

It gives an OOM error immediately.

4914 sequences
53 positions
21 amino acids (including gaps)
4914 effective sequences
initializing run

error: arma::memory::acquire(): out of memory
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)

That's weird. Would you mind figuring it out?

sudorook commented 4 years ago

Can you run the program via gdb? You can install it from the distribution repos. Run

gdb bmdca

And when in the gdb environment, run:

r -i PF00014_raw.fasta -r -d output_directory -c bmdca.conf

Paste/upload the output here.

Just, FYI the gdb environment will be in the same directory path where you originally executed the program, so be sure the the file paths in your command line arguments are correct.

It would also help to give me the gcc version and the version of armadillo installed.

sudorook commented 4 years ago

(Note I edited the gdb environment command above).

sudorook commented 4 years ago

I forgot to mention one last step. When the program crashes, print out the backtrace by entering bt in the gdb environment. I'll want to see that output.

Also, to exit gdb, you can enter q or use CTRL+D.

chemgeeklian commented 4 years ago

(gdb) r -i example/PF00014_raw.fasta -r -d output_directory -c bmdca.conf gives

Starting program: /usr/local/bin/bmdca -i example/PF00014_raw.fasta -r -d output_directory -c bmdca.conf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
4914 sequences
53 positions
21 amino acids (including gaps)
2051.18 effective sequences
initializing run

error: arma::memory::acquire(): out of memory
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51  ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

And then I type 'bt' it gives

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff6c97801 in __GI_abort () at abort.c:79
#2  0x00007ffff7ad8957 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff7adeab6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff7adeaf1 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff7aded24 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x0000555555557f6f in arma::arma_stop_bad_alloc<char [39]> ()
#7  0x000055555557a0a2 in Sim::run() ()
#8  0x0000555555558f57 in main ()
sudorook commented 4 years ago

Could you confirm that the path to the config file (bmdca.conf) is correct?

sudorook commented 4 years ago

If the path is correct, could you try to run bmdca without the config file (r -i example/PF00014_raw.fasta -r -d output_directory)? Without a config file, bmdca will use a hard-coded set of default parameters.

sudorook commented 4 years ago

And lastly, should the above two questions not reveal anything helpful, could you give me a stack trace? That will provide more granular information about what is happening when bmdca crashes.

You can do this by installing strace and then running:

strace bmdca -i PF00014_raw.fasta -r -d output_directory -c bmdca.conf > strace.log 2>&1

You can attach the output strace.log file here.

chemgeeklian commented 4 years ago

Could you confirm that the path to the config file (bmdca.conf) is correct?

Oh that is the issue. In the beginning I should use bmdca -i example/PF00014_raw.fasta -d output_directory -r -c example/bmdca.conf

That works and the computing can start normally.

(edited)

chemgeeklian commented 4 years ago

BTW why do you just let it computing 2000 iterations instead of checking convergence and stop automatically? For your results presented on the group meeting, are they from the results of 2000 iterations?

sudorook commented 4 years ago

There is a parameter called error_max. Each step, the magnitude of (f_mcmc - f_msa + lambda*potts_parameter) is computed for all positions and amino acids, and stored in error_tot. If error_max > error_tot, the program will terminate.

The step_max parameter (default: 2000) is the maximum number of steps the program will run if the convergence criterion is not met.

All the figures in the meeting were from runs that went the full 2000 steps.

sudorook commented 4 years ago

FYI, I want to keep issue threads on here each focused on a specific topic. It helps in keeping track of what needs to be done and what is already completed. I want to keep this thread focused on the original purpose --- lack of clarity in the installation instructions. For questions on a different topic, it is best to open a new issue.

chemgeeklian commented 4 years ago

FYI, I want to keep issue threads on here each focused on a specific topic. It helps in keeping track of what needs to be done and what is already completed. I want to keep this thread focused on the original purpose --- lack of clarity in the installation instructions. For questions on a different topic, it is best to open a new issue.

Thank you. I apologize. For the issue of installation instructions, in step 2, I think it would be helpful to note what input_alignment and config_file represent.

sudorook commented 4 years ago

Should be adequate now.