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

More general check for help-flag(s) #217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/args.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ void IOParser::writeCommandLine(std::ostream &out)
bool IOParser::checkForErrors(int verb)
{

if(argc==1 || checkParameter(argc, argv, "--help") || checkParameter(argc, argv, "-h"))
{
writeUsage(std::cout);
exit(0);
}
// First check the command line for unknown arguments
checkForUnknownArguments();

Expand Down
2 changes: 1 addition & 1 deletion src/autopicker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ void AutoPicker::read(int argc, char **argv)
int expert_section = parser.addSection("Expert options");
verb = textToInteger(parser.getOption("--verb", "Verbosity", "1"));
random_seed = textToInteger(parser.getOption("--random_seed", "Number for the random seed generator", "1"));
workFrac = textToFloat(parser.getOption("--shrink", "Reduce micrograph to this fraction size, during correlation calc (saves emory and time)", "1.0"));
workFrac = textToFloat(parser.getOption("--shrink", "Reduce micrograph to this fraction size, during correlation calc (saves memory and time)", "1.0"));

// Check for errors in the command-line option
if (parser.checkForErrors())
Expand Down
7 changes: 0 additions & 7 deletions src/ml_optimiser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,6 @@ void MlOptimiser::read(int argc, char **argv, int rank)
// Start a new run from scratch
parseInitial(argc, argv);
}

if(argc==1 || checkParameter(argc, argv, "--help") || checkParameter(argc, argv, "-h"))
{
usage();
exit(0);
}

}

void MlOptimiser::parseContinue(int argc, char **argv)
Expand Down
2 changes: 1 addition & 1 deletion src/ml_optimiser_mpi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ void MlOptimiserMpi::initialise()
use an estimated image-size of " << LowBoxLim << " pixels during the last iteration...\n\n\
...but your input box-size (image_size) is however " << t_ori_size << ". This means that \n\
you will likely run out of memory on the GPU(s), and will have to then re-start \n\
from the last completed iteration (i.e. continue from it) with the use of GPUs.\n " << std::endl;
from the last completed iteration (i.e. continue from it) *without* the use of GPUs.\n " << std::endl;

if(is_split)
{
Expand Down