Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Fix parallel validation errors #1077

Merged
merged 7 commits into from
Jan 13, 2022
Merged
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
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ bin_PROGRAMS =
bin_SCRIPTS =
dist_doc_DATA =

python_requirements = requirements.txt
python_requirements = $(shell find $(top_srcdir) -name requirements.txt -print)

docs_targets =

Expand Down Expand Up @@ -295,7 +295,7 @@ install-exec-hook: index python-requirements docs

python-requirements: $(python_requirements)
@echo "Updating python requirements..."
@cat $(addprefix $(top_srcdir)/,$(python_requirements)) | python3 -m pip install -q -r /dev/stdin
@python3 -m pip install -q -r $(subst $(subst ,, ), -r ,$(python_requirements))

reconfigure: distclean
autoreconf -isf && $(PWD)/configure --quiet
Expand Down
4 changes: 2 additions & 2 deletions gldcore/autotest/test_config.glm
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifexist "../config.csv"
#define DIR=..
#system cp ../config.csv .
#endif

#input "${DIR:-.}/config.csv" -f config -t config
#input "config.csv" -f config -t config

#if ${TEST1:-X} == A
#print ok
Expand Down
4 changes: 2 additions & 2 deletions gldcore/autotest/test_config_prefix.glm
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifexist "../config.csv"
#define DIR=..
#system cp ../config.csv .
#endif

#input "${DIR:-.}/config.csv" -f config -t config -p prefix=MY_
#input "config.csv" -f config -t config -p prefix=MY_

#if ${MY_TEST1:-X} == A
#print ok
Expand Down
5 changes: 2 additions & 3 deletions gldcore/autotest/test_config_relax.glm
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#ifexist "../config.csv"
#define DIR=..
#system cp ../config.csv .
#endif

#define TEST1=X
#input "${DIR:-.}/config.csv" -f config -t config -p relax=FALSE
#input "config.csv" -f config -t config relax=FALSE

#if ${TEST1:-X} == A
#print ok
Expand Down
6 changes: 3 additions & 3 deletions gldcore/autotest/test_library_include.glm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#library config set CACHEDIR /tmp
#library config set DATADIR /tmp
#library config set CACHEDIR .
#library config set DATADIR .
#library get pole_configuration.glm
#include "/tmp/pole_configuration.glm"
#include "./pole_configuration.glm"

class test {
object lib;
Expand Down
1 change: 0 additions & 1 deletion gldcore/geodata/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
haversine==2.3.0
Fiona==1.8.19
pandas==1.1.4
scipy==1.6.0
Shapely==1.7.1
geopandas==0.9.0
CensusData==1.13
Expand Down
1 change: 1 addition & 0 deletions gldcore/scripts/Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ bin_SCRIPTS += gldcore/scripts/gridlabd-help
bin_SCRIPTS += gldcore/scripts/gridlabd-json-get
bin_SCRIPTS += gldcore/scripts/gridlabd-job
bin_SCRIPTS += gldcore/scripts/gridlabd-library
bin_SCRIPTS += gldcore/scripts/gridlabd-lock
bin_SCRIPTS += gldcore/scripts/gridlabd-manual
bin_SCRIPTS += gldcore/scripts/gridlabd-matrix
bin_SCRIPTS += gldcore/scripts/gridlabd-openfido
Expand Down
3 changes: 3 additions & 0 deletions gldcore/scripts/gridlabd-library
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# ensure only one weather call runs at a time
. $(dirname $0)/gridlabd-lock

# check environment
if [ ${GLD_ETC:-none} == none ]; then
echo "ERROR: GLD_ETC is not exported from the shell environment"
Expand Down
8 changes: 8 additions & 0 deletions gldcore/scripts/gridlabd-lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# enable locking of the current executable to ensure only one runs at a time
PIDFILE="/tmp/$(basename $0).pid"
trap "rm -f ${PIDFILE}; exit" INT TERM EXIT
if [ -e $PIDFILE ]; then
PID=$(cat $PIDFILE)
while (ps -p $PID >/dev/null); do sleep 1; done
fi
echo $$ >$PIDFILE
5 changes: 4 additions & 1 deletion gldcore/scripts/gridlabd-template
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# ensure only one template call runs at a time
. $(dirname $0)/gridlabd-lock

# check environment
if [ ${GLD_ETC:-none} == none ]; then
export GLD_ETC=${gridlabd --version=install}/shared/gridlabd
Expand Down Expand Up @@ -490,4 +493,4 @@ elif [ "$(type -t $1)" == "function" ]; then
else
error 1 "'$1' is not a valid template command"
fi
error 1 "invalid result"
error 1 "invalid result"
3 changes: 3 additions & 0 deletions gldcore/scripts/gridlabd-weather
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# ensure only one weather call runs at a time
. $(dirname $0)/gridlabd-lock

# check environment
if [ ${GLD_ETC:-none} == none ]; then
echo "$0: ERROR: GLD_ETC is not exported from the shell environment" > /dev/stderr
Expand Down
1 change: 0 additions & 1 deletion gldcore/scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
haversine==2.3.0
pandas==1.1.4
scipy==1.6.0
Shapely==1.7.1
geopandas==0.9.0
PyGithub==1.54.1
Expand Down
1 change: 1 addition & 0 deletions module/optimize/autotest/test_extremum_opt.glm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#set tmp=.
module optimize;
module tape
{
Expand Down
1 change: 1 addition & 0 deletions module/optimize/autotest/test_maximum_err.glm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#set tmp=.
module optimize;
module tape
{
Expand Down
1 change: 1 addition & 0 deletions module/optimize/autotest/test_minimum.glm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#set tmp=.
module optimize;
module tape
{
Expand Down
1 change: 0 additions & 1 deletion module/resilience/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Pillow==8.3.2
ipython==7.22.0
pandas==1.1.4
scipy==1.6.2
ipyplot==1.1.0
elevation==1.1.2
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ docker==4.4.4
folium==0.12.1
scikit-learn==0.24.2
xlrd==2.0.1
scipy==1.6.2