simfactory should abort earlier if runscript, submitscript or thornlist are wrong

Issue #2213 closed
Steven R. Brandt created an issue

Right now simfactory will go through the Cactus sim-config stage before it checks if eg the thornlist is incorrect (does not exist).

[sbrandt@wothw Cactus]$ ./simfactory/bin/sim build --thornlist doesnotexist
Using configuration: sim
Reconfiguring sim
Writing configuration to: /home/sbrandt/cactus/Cactus/configs/sim/OptionList
CUSTOMIZED MAKE
Cactus - version: 4.2.3
Reconfiguring sim.
Adding configuration options from '/home/sbrandt/cactus/Cactus/configs/sim/OptionList'...
  Setting VERSION to '2018-01-25'
  Setting CPP to 'cpp'
  Setting CC to 'gcc'
  Setting CXX to 'g++'
  Setting FPP to 'cpp'
  Setting F90 to 'gfortran'
  Setting CPPFLAGS to ''
  Setting FPPFLAGS to '-traditional'
  Setting CFLAGS to '-g -std=gnu99'
  Setting CXXFLAGS to '-g -std=gnu++0x'
[...]
Use make foo to build the configuration.
Complete rebuild required
Cleaning sim
Cleaning configuration sim
Deleting all built files in /home/sbrandt/cactus/Cactus/configs/sim
Warning: default submit script contents have changed
Updated script file for configuration sim
Warning: default run script contents have changed
Updated runscript file for configuration sim
Error: specified thornlist "doesnotexist" does not exist or is not readable
   tried paths "/home/sbrandt/cactus/Cactus/doesnotexist"
   and "/home/sbrandt/cactus/Cactus//repos/simfactory2/etc/thornlists/doesnotexist",
   working directory is "/home/sbrandt/cactus/Cactus"
Aborting Simfactory.

It may be nice to detect this earlier.

See https://bitbucket.org/simfactory/simfactory2/pull-requests/28/simlib-make-non-existing-cactusfile-fatal/diff#comment-85638965 for a discussion.

Keyword: None