Skip to content

Commit 7932e24

Browse files
authored
Fixing memory calculation (#24)
- minor issues that arose because there was not enough memory assigned - empty Environment variables were writing to stderr, now either suppressed, or written as log statement - update version and dates - include link to xtb repo
1 parent b99666f commit 7932e24

4 files changed

Lines changed: 14 additions & 11 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ extended tight-binding semi-empirical program package
66
(version 6.0 or later)
77
from Stefan Grimme's group at the University of Bonn
88
(contact: xtb{at}thch.uni-bonn.de).
9+
It is available via [GitHub](https://github.com/grimme-lab/xtb).
910

1011
It makes it unnecessary to set environment variables like
1112
`OMP_NUM_THREADS`, `MKL_NUM_THREADS`, `OMP_STACKSIZE`, and `XTBPATH` globally,
@@ -168,7 +169,7 @@ please include the debug output when submitting a bug report to the
168169
## License (GNU General Public License v3.0)
169170

170171
runxtb.bash - a wrapper script for xtb
171-
Copyright (C) 2019 Martin C Schwarzer
172+
Copyright (C) 2019 - 2020 Martin C Schwarzer
172173

173174
This program is free software: you can redistribute it and/or modify
174175
it under the terms of the GNU General Public License as published by
@@ -185,4 +186,4 @@ See [LICENSE](LICENSE) to see the full text.
185186
You should have received a copy of the GNU General Public License
186187
along with this program. If not, see <https://www.gnu.org/licenses/>.
187188

188-
(Martin; 2019-09-10; wrapper version 0.3.1)
189+
(Martin; 2020-02-27; wrapper version 0.3.2)

VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
2-
version="0.3.1"
3-
versiondate="2019-09-10"
2+
version="0.3.2"
3+
versiondate="2020-02-27"

configure/configure.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Tis configuration script is part of
66
# runxtb.bash --
77
# a repository to set the environment for the xtb program
8-
# Copyright (C) 2019 Martin C Schwarzer
8+
# Copyright (C) 2019 - 2020 Martin C Schwarzer
99
#
1010
# This program is free software: you can redistribute it and/or modify
1111
# it under the terms of the GNU General Public License as published by

runxtb.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# runxtb.sh --
66
# a wrapper script to apply an environment for xtb
7-
# Copyright (C) 2019 Martin C Schwarzer
7+
# Copyright (C) 2019 - 2020 Martin C Schwarzer
88
#
99
# This program is free software: you can redistribute it and/or modify
1010
# it under the terms of the GNU General Public License as published by
@@ -157,7 +157,7 @@ display_howto ()
157157
fi
158158
fi
159159
debug "XTBPATH=$XTBPATH (XTBHOME=$XTBHOME)"
160-
debug "$( declare -p MANPATH )"
160+
debug "$( declare -p MANPATH 2>&1 )"
161161

162162
message "From version 6.0 onwards there is no HOWTO included, displaying man page instead."
163163

@@ -513,7 +513,7 @@ backup_if_exists ()
513513
write_submit_script ()
514514
{
515515
message "Remote mode selected, creating job script instead."
516-
# Possible values for queue are pbs-gen bsub-gen bsub-rwth
516+
# Possible values for queue are pbs-gen bsub-gen bsub-rwth slurm-gen slurm-rwth
517517
local queue="$1" queue_short
518518
local output_file_local="$2" submitscript_filename
519519
[[ -z $queue ]] && fatal "No queueing systen selected. Abort."
@@ -531,9 +531,9 @@ write_submit_script ()
531531
echo "#!/bin/bash" >&9
532532
echo "# Submission script automatically created with runxtb.sh" >&9
533533

534-
# Add some overhead
534+
# Calculate the correct use of memory, add some overhead
535535
local corrected_memory
536-
corrected_memory=$(( requested_memory + 100 ))
536+
corrected_memory=$(( requested_numCPU * requested_memory + 100 ))
537537

538538
# Header is different for the queueing systems
539539
if [[ "$queue" =~ [Pp][Bb][Ss] ]] ; then
@@ -931,7 +931,9 @@ else
931931
# Add the manual path, even though we won't need it
932932
[[ -d "${XTBPATH}/man" ]] && add_to_MANPATH "${XTBPATH}/man"
933933
export XTBPATH PATH MANPATH
934-
debug "$( declare -p XTBPATH PATH MANPATH )"
934+
# If for whatever reason one of these variables is unset, then write the error in the debug log,
935+
# instead of writing it directly to the error channel
936+
debug "$( declare -p XTBPATH PATH MANPATH 2>&1 )"
935937
fi
936938

937939
# Check whether we have the right executable

0 commit comments

Comments
 (0)