From c3e82b1c7b6c358719f3d1dd5cf4871cde3446a7 Mon Sep 17 00:00:00 2001 From: Raul Infante-Sainz Date: Fri, 19 Mar 2021 17:52:08 +0000 Subject: Configuration: --debug option available in this phase also Until now, each time there was a problem in the configuration of Maneage'd projects and debugging was necessary, we had to take the following changes: - Run the configuration on a single thread ('-j1') to see the building of only the problematic software. - Disable the Zenodo check manually by commenting those parts of 'reproduce/software/shell/configure.sh'. Because the internet connection wastes a few seconds and is thus very annoying during repeated runs! - Manually remove the '-k' option that was passed to Make (when building the software). With the '-k', Make keeps going with the execution of other targets if something crashes and this usually causes confusions during the debugging. Doing the manual changes within the code was both very annoying and prone to errors (forgetting to correct it!). With this commit, the existing '--debug' option has been generalized to the software configuration phase of Maneage also. Until now, it was only available in the analysis phase (and would directly be passed to the 'make' command that would run the analysis). When this option is used, and the project is in the software configuration phase, the Zenodo check won't be done, it will use one single thread ('-j1'), and it will stop the execution as soon as an error occurs (Make is not run with '-k'). --- project | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'project') diff --git a/project b/project index 900e02c..7fef1fe 100755 --- a/project +++ b/project @@ -4,6 +4,7 @@ # Run `./project --help' for a description of how to use it. # # Copyright (C) 2019-2021 Mohammad Akhlaghi +# Copyright (C) 2021 Raul Infante-Sainz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -117,12 +118,13 @@ Configure options: --all-highlevel Build all high-level software (for development). Configure and Make options: + -d, --debug[=FLAGS] In configure: use -j1, no -k, and no Zenodo check. + In make: 'FLAGS' will be directly passed to 'make'. -g, --group=STR Build and run with write permissions for a group. -j, --jobs=INT Number of threads to build/run the software. -?, --help Print this help list. Make (analysis) options: - -d, --debug=FLAGS Print various types of debugging information. -p, --prepare-redo Re-do preparation (only done automatically once). Make (final PDF) options: @@ -439,6 +441,7 @@ case $operation in # Variables to pass to the configuration script. export jobs=$jobs + export debug=$debug export host_cc=$host_cc export build_dir=$build_dir export input_dir=$input_dir -- cgit v1.2.1 From ac8890dfbf06c8b98a3163f798ad3fe65b193a33 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Fri, 26 Mar 2021 18:19:22 +0000 Subject: ./project: unused --minmapsize option is removed Until now, the './project' script included an '--minmapsize' option which is an option to one of the original programs that was used in Maneage (Gnuastro). Such an option doesn't exist in many other programs, so it is not a suitable option for the generic Maneage project (and can just cause confusion). It was also not used in any part of Maneage any more! With this commit, this option is removed from the core Maneage './project' script and if any project uses it, they can implement it in their own branch. --- project | 6 ------ 1 file changed, 6 deletions(-) (limited to 'project') diff --git a/project b/project index 7fef1fe..1e3aeb4 100755 --- a/project +++ b/project @@ -47,7 +47,6 @@ all_highlevel=0 existing_conf=0 highlightnotes=0 scriptname="./project" -minmapsize=10000000000 @@ -109,7 +108,6 @@ Configure options: -e, --existing-conf Use (possibly existing) local configuration. --host-cc Use host system's C compiler, don't build GCC. -i, --input-dir=STR Directory containing input datasets (optional). - -m, --minmapsize=INT [Gnuastro] Minimum number of bytes to use RAM. -s, --software-dir=STR Directory containing necessary software tarballs. --check-config During configuration, show what is being built. --clean-texdir Remove possibly existing build-time subdirectories @@ -186,9 +184,6 @@ do -i|--input-dir) input_dir="$2"; check_v "$1" "$input_dir"; shift;shift;; -i=*|--input-dir=*) input_dir="${1#*=}"; check_v "$1" "$input_dir"; shift;; -i*) input_dir=$(echo "$1" | sed -e's/-i//'); check_v "$1" "$input_dir"; shift;; - -m|--minmapsize) minmapsize="$2"; check_v "$1" "$minmapsize"; shift;shift;; - -m=*|--minmapsize=*) minmapsize="${1#*=}"; check_v "$1" "$minmapsize"; shift;; - -m*) minmapsize=$(echo "$1" | sed -e's/-m//'); check_v "$1" "$minmapsize"; shift;; -s|--software-dir) software_dir="$2"; check_v "$1" "$software_dir"; shift;shift;; -s=*|--software-dir=*) software_dir="${1#*=}"; check_v "$1" "$software_dir"; shift;; -s*) software_dir=$(echo "$1" | sed -e's/-s//'); check_v "$1" "$software_dir"; shift;; @@ -446,7 +441,6 @@ case $operation in export build_dir=$build_dir export input_dir=$input_dir export scriptname=$scriptname - export minmapsize=$minmapsize export software_dir=$software_dir export existing_conf=$existing_conf export all_highlevel=$all_highlevel -- cgit v1.2.1 From 20b6273a65ab4d99ad760fd715ca935494d4fc2e Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Sun, 28 Mar 2021 12:55:03 +0100 Subject: Configuration: corrected check of group name When built in 'group' mode, the write permissions of all created files will be activated for a certain group of users in the host operating system. The user specifies the name of the group with the '--group' option at configure time. At the very start, the './project' script checks to see if the given group name actually exists or not (to avoid hard-to-debug errors popping up later). Until now, the checking 'sg' command (that was used to build the project with group-writable permissions) would always fail due to the excessive number of redirections. Therefore, it would always print the error message and abort. With this commit, the output of 'sg' is no longer re-directed (which also helps users in debuggin). If the group does actually exist, it will just print a small statement saying so, and if it fails, the error message is printed. This fixed the problem, allowing maneage to be built in group-mode. I also noticed that the variable name keeping the group name ('reproducible_paper_group_name') used the old name for the project (which was "Reproducible paper template"! So it has been changed/corrected to 'maneage_group_name'. --- project | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'project') diff --git a/project b/project index 1e3aeb4..53452ff 100755 --- a/project +++ b/project @@ -326,14 +326,14 @@ fi if ! [ x$group = x ]; then # Check if group is usable. - if ! sg "$group" "echo test &> /dev/null" &> /dev/null; then + if ! sg "$group" "echo Group \'$group\' exists"; then echo "$scriptname: '$group' is not a usable group name on this system."; echo "(TIP: you can use the 'groups' command to see your groups)" exit 1 fi # Set the group option for running Make. - gopt="reproducible_paper_group_name=$group" + gopt="maneage_group_name=$group" fi @@ -441,10 +441,10 @@ case $operation in export build_dir=$build_dir export input_dir=$input_dir export scriptname=$scriptname + export maneage_group_name=$group export software_dir=$software_dir export existing_conf=$existing_conf export all_highlevel=$all_highlevel - export reproducible_paper_group_name=$group # Run the configuration script if [ x"$group" = x ]; then -- cgit v1.2.1