Files
apbs/examples/run_selected_examples.sh
Noah Oblath fb6ecf9710 Nsoblath/issue 163 (#171) (#202)
* Add a Dockerfile for testing

* Switch to FETK 1.8.1 and cleanup of FETK build

* New versions of geoflow and pb_solvers for testing

* Simplified Dockerfile

* Fixing a bug for getting FETK in windows

* A little more cleanup

* Update Geoflow git tag for new release

* Test building static libs

* Update pb_solvers commit to most recent release

* Update to the latest release of pb_solvers

* Separate configure/build stage for linux and mac

* Update the build script

* Update .build.sh

* Add libopenblas-dev to the linux dependencies

* Add tmate session to debug windows packing issue

* Debugging the windows packaging failure

* Maybe it's a shell problem?

* A little more debugging of the windows cpack failure

* Separate package creation for windows to get around the cmake/chocolatey conflict

* Best if I use the proper syntax . . .

* Typo fix

* Remove debugging modifications

* Cleanup of the build workflow

* Removing AppVeyor build and badge (Windows build is now done in GitHub Actions)

* Update .build.sh

* Update index.rst

* Use software-properties-common to get python3 in the Dockerfile

* Change directory into build before running tests

* Tests don't need to be their own project

* Turning off testing and building in the build script for GHA test purposes

* Check that the geoflow tests are working with this dev branch of geoflow

* Updated to released version of Geoflow

* First attempt at a test job

* Added required dependencies for apbs linkages
Added running of an example

* Fix directory

* Fixing the path to the downloaded artifacts

* Testing for mac and windows requirements

* Syntax fix

* Mod to check mac prereqs; note about windows prereqs

* (temporarily) remove some slow tests

* Add mac prereqs for test job

* Add component specification to all install lines and use to control the package creation

* Add tmate back in for now

* Enable the build of iAPBS, with a few changes to how it's done to make sure it links into apbs

* Minor logic fix

* Removed the include/Eigen directory.  It seemed to be confusing the Windows build.

* APBS needs to know where Eigen3 is

* Geoflow updated to deconflict class name with FETK/mc.  Build of Geoflow updated, with APBS dependency moved into APBS.  Build in src is updated accordingly.

* Updating Geoflow to the new release

* Move configure_file for apbscfg.h down in the CMakeLists.txt so that it has all of the necessary info

* Enable tmate session in windows to check linking for a successful windows test

* Potential fix to incorrect arguments in calls to preRefineFE and postRefineFE

* tmate session on test job failure

* Temporarily include headers and libraries in the zip file

* Remove hardcoded apbscfg.h and maloccf.h

* Add windows dependencies to the test run

* echo the PATH variable so we can check to see if the vcpkg libraries are findable

* Add the vcpkg bin directory to the path

* Use variable ENABLE_FETK instead of FETK_ENABLED to control building with FETK

* Renaming some build variables, per some TODOs in apbscfg.h.in

* Switch use tests to using run_selected_tests.sh

* Forgot to include the script to run

* Fix permissions for the examples scripts by using the USE_SOURCE_PERMISSIONS argument

* Added CHANGELOG.md and .extract_section.sh script (copied from FETK implementation)

* Add release.yaml and release artifacts (copied implementation from FETK)

* Update version to 3.3.0.alpha

* Fix variable for tag name

* Move release of artifacts to a separate job

* Was missing the step id

* Also had the wrong id here

* Oy, hopefully the last thing I missed

* Fixing the logic of having a separate publish release job

* Reworking how the package filenames are handled

* Trigger a new build

* Attempting fix to issue with retrieving and storing the zip file name

* Use expression instead of shell expansion

* Workflow cleanup

* Back-filling the changelog's previous entries from the GitHub Releases

* Git tags are prepended with a v

* Consolidating cmake settings

* Turn PYGBE on, and a couple of associated fixes

* Stripping out Tinker support

* Enable debugging in workflows

* Add python3 to mac and linux dependencies

* Shouldn't need `vcpkg integrate install` in the use test

* Need the python library in linux

* Update .extract_section.sh to handle the rst file releases.rst

* Test conversion of release rst to md

* Oops, docker actions are linux only

* One more linux-only restriction

* Build directory and install directory check for already-set values in .build.sh

* Do initial work to accommodate building the NSIS file

* Fixing typos from the last commit

* Actually process and attempt to use the NSIS file

* Separate NSIS build into a separate step to see what's causing the job to hang

* Fixing step id

* Move release extraction to release.yaml and use setup-python@v2 for python installation

* Setup to do a little debugging

* Removing the use of git submodule updating in the build

* Remove NSIS use test for now

* Removing the use of NSIS packaging

* Setup a tmate session for container testing

* Do a test of running a windows container

* Another container test

* One more docker container attempt

* Some documentation updates

* Return to the regular build

* Copying in dependency libraries

* Fixing a library name

* Option for a fully static build (does not work when OpenMP is used)

* Try out a fully static build without OpenMP

* Working on diagnosing static build

* Two bug fixes

* Using a test version of FETK to try a static build

* YAML fix

* Not sure why it's behaving as if a git hash matches a version tag, but for now we'll force it to use the git hash FETK download

* Compile flag needed for linux, at least

* Modifying dependencies that are installed

* Updated pb_solvers for testing the use of the pbsolvers namespace; Fixed inclusion of BLAS.

* Try removing specification of compiler

* Update pb_solvers for wrapping fixes

* Enable tmate on failure

* Another pb_solvers update

* Remove openmp; I think it's screwing up finding OpenBLAS on Ubuntu

* Missing headers were causing a problem on macos

* Let's see if using libopenblas-serial-dev fixes the finding-openblas problem on linux

* Avoid some cmake warnings and use an updated pb_solvers

* Maybe the final fix to have things working?  Updating pb_solvers.

* New version of FETK

* Including some dependencies

* Added finding AMD

* git-ignore all directories that start with build

* FETK is now treated as a required dependency, much earlier in the build

* These find modules are now handled by FETK

* Updating how dependencies are searched for and handled

* Use GNU standard install directories

* Getting things in the right order

* Remove the use of EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH

* I think we deleted nanoshaper when we cleared the temp directory, so don't do this

* Install metis manually on mac and linux to get static libs

* Separate tar and gunzip calls

* Sudo make install on linux

* Fixing the TABIPB library install location and NanoShaper duplicate install issues.

* Adding Python for linux

* Add a global static-build option and set the MSVC runtime library variable to hopefully perform a static build in windows

* Run tmate for windows to check linking

* Some anticipation of the types of jobs that will be run

* Adapt to changes in FETK

* Update FETK hash

* Remove extra line and print umfpack libraries

* Verbose build, for now

* Debugging messages

* Update FETK

* Need libumfpack for the windows use tests.  And use tmate if the build fails.

* Remove the link search variables

* Enable PYGBE in Windows and add Python to use tests in all builds

* Fix copying of dlls into the Windows zip package

* Attempt at providing a windows equivalent of the use of dirname in main.c

* Typo

* We shouldn't need the installed prereqs in Windows (libraries should come with the zip file)

* Need to get rid of the extension

* Use 7z instead of zip/unzip

* Fixing the path to the package

* Need to specify the python version to CMake

* Min and max python versions

* Treat version numbers as strings until they're into CMake

* Fix python version variable

* Add ldd step for debugging windows use test

* Let's see if it's just Python/PYGBE causing problems on the windows build

* Let's see if it's the python linking or the PYGBE-enabled code is causing the Windows use test problem

* Fixing the declaration of mol_dirname for the Windows build and re-enabling the use of PYGBE

* Some documentation updates

* Try including PYGBE without doing _splitpath

* Get tmate in windows after build

* Specify Python architecture

* Revert tmate to on failure after build

* [skip ci]
Test skipping the CI process, and also minor docs update

* Retesting with all selected examples enabled

* Remove examples that fail

* Added comments on CMake policy choices

* New FETK version

* Cleanup

* Re-enable examples to check current status

* [skip ci] Updated current status of examples in run_selected_examples.sh.

* Add metis build to the Dockerfile

* Update FETK version in the Dockerfile

* Replace pbsam-auto with pbsam in a couple of examples

* Updated run_selected_examples.sh with gdb bt of geoflow/glycerol.in example

* [skip ci] Updated releases.rst

* Fixing the logic for recognizing version numbers.  The key was to put the FETK_IMPORT_VERSION variable in brackets in the if() statement.

* Fixing issues in the running and wrapping of geoflow:
* The molecule index used when calling runGeometricFlowWrapAPBS is taken from the configuration `mol` value instead of hardcoded
* The input geoflow parameters (in struct of type GeometricFlowInput) are passed by pointer instead of as a struct

* PBAM and PBSAM are now disabled by default pending further development work on their integration

* Added notes for the failure of the born/apbs-mol-fem-extmesh.in example.  Update FETK to fix the failure.

* Enable maximum verbosity in ctest to try to diagnose the weirdness in the windows ctest run

* Fix logic around finding python for cmake <v3.19 and for only having a minimum version defined

* Report test failures with raised exceptions

* See if the Windows test failures are a shell-related issue

* Adding some missing newlines

* Trying to sort the install dir for mac and linux

* Don't clean the install and build dirs.  Let cmake take care of what it needs to take care of.  And rm -rf'ing a directory passed to a script without any validation is scary.

* I do, in fact, need to create the build dir

* Un-verbose the linux and mac build

* Relative install dir

* Same thing, this time in linux too

* Non-verbose makefile in windows

* Install PYGBE if enabled

* Install in the build directory, not build/build

* Include bin directory in path for tests

* hyphens, not minuses.  fixed spaces in names

* Parse before printing

* Debugging messages for python version

* Set path to include location of libumfpack

* Fix directory name in windows

* Prevent checking of uninitialized array

* Remove the PYGBE example

* Some CMake/Python debugging

* Set swap space in Windows to handle memory-intensive tests

* Instead of setting the swap space, set the pagefile size

* Add the large-address-aware option to the linker flags under Windows

* Print the execution log on failure

* Enter tmate in windows during the build job

* Use RELEASE_TYPE variable instead of hardcoding configuration name

* Switch to debug build for debugging

* Try to catch windows build failure

* Try to resolve the python debug library issue using Python_LIBRARY_RELEASE

* Use Python3_FIND_ABI to specify non-debug library

* Undo the python ABI thing

* Test hack to get around python debug library

* Add a temporary debugging tmate session

* Let's try debugging with the mac build

* For now, just build linux and mac

* Go back to a release build to try to replicate the crashes we saw before

* Make sure all arrays get some sort of initialization

* Call destructors if pointers aren't NULL

* FETK now on 1.9.0

* Updating FETK version to 1.9.1

* Cleanup and docs updates

* Exit the build script with an error when the build fails

* Use FETK v1.9.2

* Remove -fPIE option in a strange place

* Verbose build for debug

* Skip RPATH for static builds?

* Try FETK source build instead of release download

* Switch default FETK version to the git hash at v1.9.2 (causes source build instead of binary install)

* Remove verbosity from build script

* Cleanup

* Tweaking the docs

* Updating the check for a linux build

Co-authored-by: Noah Oblath <noah.oblath@pnnl.gov>
Co-authored-by: Darren Curtis <Darren.Curtis@pnnl.gov>

Co-authored-by: Noah Oblath <noah.oblath@pnnl.gov>
Co-authored-by: Darren Curtis <Darren.Curtis@pnnl.gov>
2022-01-24 15:35:09 -08:00

111 lines
4.7 KiB
Bash
Executable File

#!/bin/bash
APBS_EXE="apbs"
BASE_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
export PATH="$BASE_PATH/../../../bin:$PATH"
cd $BASE_PATH
echo $BASE_PATH
which apbs
run_example() {
echo # blank line
run_subdir=$1
in_file=$2
curr_dir=`pwd`
echo "current dir: $curr_dir"
cd $run_subdir
if [[ $? -ne 0 ]]; then
echo "Invalid subdirectory: $run_subdir}"
((total_status+=1))
return 1
fi
echo "Running in: $(pwd)"
echo -n "$APBS_EXE $in_file "
SECONDS=0
$APBS_EXE $in_file >> ${curr_dir}/${in_file}.OUTPUT.txt 2>&1
status=$?
duration=$SECONDS
echo "$(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed."
if [[ "$status" -ne "0" ]]; then
echo " failed: $status"
echo " printing execution log"
cat ${curr_dir}/${in_file}.OUTPUT.txt
fi
((total_status+=$status))
cd $curr_dir
}
total_status=0
# pbam and pbsam examples are currently disabled; pbam/pbsam integration needs further development
#run_example "pbsam-barn_bars" "barn_bars_electro.in"
run_example "bem" "1a63_NanoShaper_SES.in"
run_example "geoflow" "glycerol.in"
run_example "born" "apbs-mol-fem-extmesh.in"
run_example "born" "apbs-mol-fem.in"
run_example "born" "apbs-mol-auto.in"
run_example "FKBP" "1d7h-dmso-mol.in"
run_example "bem-pKa" "2LZT-noASH66.in"
run_example "actin-dimer" "apbs-mol-auto.in"
#run_example "actin-dimer" "apbs-smol-parallel.in"
#run_example "pbam" "toy_electrostatic.in"
#run_example "pbsam-gly/msms" "gly_electrostatic.in"
echo "exit: $total_status"
exit $total_status
# This is a record of which examples run, and which fail + why
# Last updated from commit 91de12f98e1f23ee3ade0b89bc23f915f24ca041
#run_example "pbsam-barn_bars/barn_bars_electro.in" (fails, 13)
# NOsh_parseELEC: The method ("mg","fem", "pygbe", "bem", "geoflow" "pbam", "pbsam") or "name" must be the first keyword in the ELEC section
# Error while parsing input file.
#run_example "bem/1a63_NanoShaper_SES.in" (runs)
#run_example "geoflow/glycerol.in" (seg fault, failed, 139)
# Program received signal SIGSEGV, Segmentation fault.
# Valist_getNumberAtoms (thee=thee@entry=0x100000014) at /src/src/generic/valist.c:111
# 111 return thee->number;
# (gdb) bt
# #0 Valist_getNumberAtoms (thee=thee@entry=0x100000014) at /src/src/generic/valist.c:111
# #1 0x000055989f52fdca in runGeometricFlowWrapAPBS (geoflowParams=..., molecules=0x100000014)
# at /src/src/geoflow/geoflow_wrap_apbs.cpp:78
# #2 0x000055989f4db593 in solveGeometricFlow (molecules=0x7ffd4f828420, nosh=<optimized out>, pbeparm=0x5598a1721ac0,
# apolparm=0x5598a17150f0, parm=0x5598a17150d0) at /src/src/routines.c:5645
# #3 0x000055989f4b12aa in main (argc=<optimized out>, argv=<optimized out>) at /src/src/main.c:818
#run_example "born/apbs-mol-fem-extmesh.in" (seg fault, fails, 134;VASSERT: ASSERTION FAILURE! filename /home/runner/work/FETK/FETK/mc/src/gem/gem.c, line 915, ((*thee) != ((void *)0)), 134)
# Breakpoint 1, Gem_dtor (thee=thee@entry=0x7ffe69194230) at /src/build-docker/_deps/fetk-src/mc/src/gem/gem.c:915
# 915 VASSERT( (*thee) != VNULL );
# (gdb) bt
# #0 Gem_dtor (thee=thee@entry=0x7ffe69194230) at /src/build-docker/_deps/fetk-src/mc/src/gem/gem.c:915
# #1 0x0000559b6a395777 in killFE (nosh=0x7fc835391010, pbe=<optimized out>, fetk=<optimized out>, gm=<optimized out>)
# at /src/src/routines.c:4083
# #2 0x0000559b6a36e9ce in main (argc=<optimized out>, argv=<optimized out>) at /src/src/main.c:967
####
# Breakpoint 3, main (argc=<optimized out>, argv=<optimized out>) at /src/src/main.c:967
# 967 killFE(nosh, pbe, fetk, gm);
# (gdb) p gm
# $3 = {0x0 <repeats 20 times>}
####
# Elements of gm are never initialized. Why? Is that intended? Is that a problem?
# Can we solve the problem by removing the requirement in the gm destructor that the pointer be non-null?
# It could just only do destruction if it's not null (which it already checks after the assertion).
# Code is fetk/mc/src/gem/gem.c
#run_example "born/apbs-mol-fem.in" (runs)
#run_example "born/apbs-mol-auto.in" (runs)
#run_example "FKBP/1d7h-dmso-mol.in" (runs)
#run_example "bem-pKa/2LZT-noASH66.in" (runs)
#run_example "actin-dimer/apbs-mol-auto.in" (runs)
#run_example "actin-dimer/apbs-smol-parallel.in" (seg fault, fails, 139; not compiled with MPI)
#run_example "pbam/toy_electrostatic.in" (fails, 13)
# PBAM: 3dmap keyword has been deprecated! Please use in conjuction with the write keyword.NOsh: Unrecognized keyword: 3dmap
# Error while parsing input file.
#run_example "pbsam-gly/msms/gly_electrostatic.in" (fails, 13)
# NOsh_parseELEC: The method ("mg","fem", "pygbe", "bem", "geoflow" "pbam", "pbsam") or "name" must be the first keyword in the ELEC section
# Error while parsing input file.