Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error on mac, no crash #4

Open
DaniBodor opened this issue May 30, 2023 · 14 comments
Open

error on mac, no crash #4

DaniBodor opened this issue May 30, 2023 · 14 comments
Assignees

Comments

@DaniBodor
Copy link
Contributor

@gcroci2 tested the scripts on her system and got an error regarding line 157 of the .sh script. Something about -n not being defined. The script still seems to have finished without problems.
This doesn't happen on my system, possibly because she uses a mac and I run ubuntu.

@joaomcteixeira
Copy link
Collaborator

Hi @DaniBodor

I am using the following bash and ubuntu:

· bash --version
GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
· lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.2 LTS
Release:	22.04
Codename:	jammy

I don't have access to a MAC to test. If the error says -n is not defined may be the script used one single core. Try to define -n. Can you paste the full error? Best,

@gcroci2
Copy link
Collaborator

gcroci2 commented May 30, 2023

If I run

pdb_prepare.sh pdblist 1

or

pdb_prepare.sh pdblist

It gives me

performing with 1 CPUS..
processing 1ATN_3w...
/Users/giuliacrocioni/Desktop/docs/eScience/projects/pdbprep/pdb_prepare.sh: line 157: wait: -n: invalid option
wait: usage: wait [n]

I just noticed that if I increase n (>1) then it works. Shouldn't work with only 1 cpu as well, though?

@joaomcteixeira
Copy link
Collaborator

Ah! I see. It will work with one CPU if you don't provide -n. But if you write -n, then it expects a number after it, -n 1, or -n N where N is the number.

@gcroci2
Copy link
Collaborator

gcroci2 commented May 30, 2023

Ah! I see. It will work with one CPU if you don't provide -n. But if you write -n, then it expects a number after it, -n 1, or -n N where N is the number.

Actually not, if I run pdb_prepare.sh pdblist it gives the same error as above

@DaniBodor
Copy link
Contributor Author

@gcroci2 , if I saw correctly, it works either way, right? It just gives an error message, but does actually still process the data and outputs into folder 4, etc, right?

@joaomcteixeira
Copy link
Collaborator

| Actually not, if I run pdb_prepare.sh pdblist it gives the same error as above

I can't reproduce the error on my computer. Very likely a difference between the bash versions on Ubuntu and Mac. Sorry, I don't have access to any Mac to test it.

@gcroci2
Copy link
Collaborator

gcroci2 commented May 31, 2023

@gcroci2 , if I saw correctly, it works either way, right? It just gives an error message, but does actually still process the data and outputs into folder 4, etc, right?

exactly

@DaniBodor
Copy link
Contributor Author

@joaomcteixeira , once you've made the newest changes, maybe @gcroci2 can test again and see if this is still an issue or not.

@joaomcteixeira
Copy link
Collaborator

Everything is done. @gcroci2 can you start from scratch to see if it works? The execution command is:

run_pdbprep.sh <PDBLIST> <N> where N is the number of cores you want to use. If you don't give N it will use only 1.

@gcroci2
Copy link
Collaborator

gcroci2 commented Sep 20, 2023

When I try to run run_pdbprep.sh pdblist, it gives me this error

(pdbprep) ➜  pdb_folder run_pdbprep.sh pdblist
ERROR: /home/user/PRAS does not exist or is not executable.

When I installed @joaomcteixeira's fork of Pras_Server, the last command (g++ -std=c++17 src/*.cpp -o PRAS) gave me these warnings:

warnings
src/CheckPDBatoms.cpp:611:2: warning: non-void function does not return a value in all control paths [-Wreturn-type]
        }
        ^
1 warning generated.
src/MissingHeavyAtoms.cpp:60:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
    }
    ^
1 warning generated.
src/PRAS.cpp:99:7: warning: left operand of comma operator has no effect [-Wunused-value]
        if ((PDB,faspr,rotamer,mutation,ligand,addh,prot,ss).empty()) goto ERR;
             ^~~
src/PRAS.cpp:99:11: warning: left operand of comma operator has no effect [-Wunused-value]
        if ((PDB,faspr,rotamer,mutation,ligand,addh,prot,ss).empty()) goto ERR;
                 ^~~~~
src/PRAS.cpp:99:17: warning: left operand of comma operator has no effect [-Wunused-value]
        if ((PDB,faspr,rotamer,mutation,ligand,addh,prot,ss).empty()) goto ERR;
                       ^~~~~~~
src/PRAS.cpp:99:25: warning: left operand of comma operator has no effect [-Wunused-value]
        if ((PDB,faspr,rotamer,mutation,ligand,addh,prot,ss).empty()) goto ERR;
                               ^~~~~~~~
src/PRAS.cpp:99:34: warning: left operand of comma operator has no effect [-Wunused-value]
        if ((PDB,faspr,rotamer,mutation,ligand,addh,prot,ss).empty()) goto ERR;
                                        ^~~~~~
src/PRAS.cpp:99:41: warning: left operand of comma operator has no effect [-Wunused-value]
        if ((PDB,faspr,rotamer,mutation,ligand,addh,prot,ss).empty()) goto ERR;
                                               ^~~~
src/PRAS.cpp:99:46: warning: left operand of comma operator has no effect [-Wunused-value]
        if ((PDB,faspr,rotamer,mutation,ligand,addh,prot,ss).empty()) goto ERR;
                                                    ^~~~
7 warnings generated.
src/RepairPDB.cpp:30:3: warning: non-void function does not return a value in all control paths [-Wreturn-type]
  }
  ^
src/RepairPDB.cpp:38:3: warning: non-void function does not return a value in all control paths [-Wreturn-type]
  }
  ^
2 warnings generated.

@joaomcteixeira
Copy link
Collaborator

joaomcteixeira commented Sep 20, 2023 via email

@gcroci2
Copy link
Collaborator

gcroci2 commented Sep 25, 2023

Hi Giulia, You need to update the Pras path on line 4 of the run_pdbprep.sh file. Maybe I should highlight that more on the installation instructions, sorry! Let me know if it works.

How should I update line 4?

Right now, installation instructions do not mention anything about updating the file, or am I wrong?

@joaomcteixeira
Copy link
Collaborator

joaomcteixeira commented Sep 25, 2023 via email

@gcroci2
Copy link
Collaborator

gcroci2 commented Sep 25, 2023

Oh, sorry I didn't open the run_pdbprep.sh script so I had no clue that the above error was coming from not having defined the Pras path (it's not explicit about that). I would definitely update the installation instructions mentioning this.

Also, within the Pras_Server repo, what's the relative path for PRAS_exec file? @joaomcteixeira

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants