Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
aff7f7bd
"vscode:/vscode.git/clone" did not exist on "731545bddca8ddf830f3c401a7ec5ea7bb44e137"
Commit
aff7f7bd
authored
Jul 08, 2011
by
Mark Friedrichs
Browse files
Mods to allow CudaAmoeba units tests to run w/o setting plugin directory
parent
f9d0115f
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
57 additions
and
158 deletions
+57
-158
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernelFactory.cpp
...ins/amoeba/platforms/cuda/src/AmoebaCudaKernelFactory.cpp
+16
-1
plugins/amoeba/platforms/cuda/tests/AmoebaTinkerParameterFile.h
...s/amoeba/platforms/cuda/tests/AmoebaTinkerParameterFile.h
+2
-0
plugins/amoeba/platforms/cuda/tests/CMakeLists.txt
plugins/amoeba/platforms/cuda/tests/CMakeLists.txt
+10
-33
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaForceFromParameterFile.cpp
...forms/cuda/tests/TestCudaAmoebaForceFromParameterFile.cpp
+1
-1
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaHarmonicAngleForce.cpp
...platforms/cuda/tests/TestCudaAmoebaHarmonicAngleForce.cpp
+2
-10
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaHarmonicBondForce.cpp
.../platforms/cuda/tests/TestCudaAmoebaHarmonicBondForce.cpp
+5
-13
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaHarmonicInPlaneAngleForce.cpp
...ms/cuda/tests/TestCudaAmoebaHarmonicInPlaneAngleForce.cpp
+2
-11
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaOutOfPlaneBendForce.cpp
...latforms/cuda/tests/TestCudaAmoebaOutOfPlaneBendForce.cpp
+2
-15
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaPME.cpp
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaPME.cpp
+3
-4
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaPiTorsionForce.cpp
...eba/platforms/cuda/tests/TestCudaAmoebaPiTorsionForce.cpp
+2
-12
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaStretchBendForce.cpp
...a/platforms/cuda/tests/TestCudaAmoebaStretchBendForce.cpp
+2
-11
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaTorsionForce.cpp
...moeba/platforms/cuda/tests/TestCudaAmoebaTorsionForce.cpp
+2
-10
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaTorsionTorsionForce.cpp
...latforms/cuda/tests/TestCudaAmoebaTorsionTorsionForce.cpp
+3
-14
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaUreyBradleyForce.cpp
...a/platforms/cuda/tests/TestCudaAmoebaUreyBradleyForce.cpp
+2
-12
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaVdwForce.cpp
...ns/amoeba/platforms/cuda/tests/TestCudaAmoebaVdwForce.cpp
+3
-11
No files found.
plugins/amoeba/platforms/cuda/src/AmoebaCudaKernelFactory.cpp
View file @
aff7f7bd
...
...
@@ -37,7 +37,6 @@ extern "C" void registerPlatforms() {
}
extern
"C"
OPENMMCUDA_EXPORT
void
registerKernelFactories
()
{
//fprintf( stderr,"In registerKernelFactories AmoebaCudaKernelFactory\n" ); fflush( stderr );
for
(
int
ii
=
0
;
ii
<
Platform
::
getNumPlatforms
();
ii
++
){
Platform
&
platform
=
Platform
::
getPlatform
(
ii
);
if
(
platform
.
getName
()
==
"Cuda"
){
...
...
@@ -62,6 +61,22 @@ extern "C" OPENMMCUDA_EXPORT void registerKernelFactories() {
}
}
extern
"C"
OPENMMCUDA_EXPORT
void
registerAmoebaCudaKernelFactories
(
void
)
{
int
hasCudaPlatform
=
0
;
for
(
int
ii
=
0
;
ii
<
Platform
::
getNumPlatforms
()
&&
hasCudaPlatform
==
0
;
ii
++
){
Platform
&
platform
=
Platform
::
getPlatform
(
ii
);
if
(
platform
.
getName
()
==
"Cuda"
){
hasCudaPlatform
=
1
;
}
}
if
(
hasCudaPlatform
==
0
){
if
(
gpuIsAvailable
()
){
Platform
::
registerPlatform
(
new
CudaPlatform
());
}
}
registerKernelFactories
();
}
static
std
::
map
<
ContextImpl
*
,
AmoebaCudaData
*>
contextToAmoebaDataMap
;
// look up AmoebaCudaData for input contextImpl in contextToAmoebaDataMap
...
...
plugins/amoeba/platforms/cuda/tests/AmoebaTinkerParameterFile.h
View file @
aff7f7bd
...
...
@@ -61,6 +61,8 @@
#include <typeinfo>
#include <time.h>
extern
"C"
void
registerAmoebaCudaKernelFactories
();
// force enums
#define MAX_PRINT 5
...
...
plugins/amoeba/platforms/cuda/tests/CMakeLists.txt
View file @
aff7f7bd
...
...
@@ -2,7 +2,7 @@
# Testing
#
ENABLE_TESTING
()
# INCLUDE(${CMAKE_SOURCE_DIR}/platforms/cuda/cuda-cmake/FindCuda.cmake)
INCLUDE_DIRECTORIES
(
${
CUDA_INCLUDE
}
)
INCLUDE_DIRECTORIES
(
${
OPENMM_DIR
}
/platforms/cuda/include
)
INCLUDE_DIRECTORIES
(
${
OPENMM_DIR
}
/openmmapi/include/openmm
)
...
...
@@ -13,23 +13,23 @@ SET(SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET "AmoebaTinkerParameterFile" )
SET
(
AMOEBA_TINKER_PARAMETER_FILE_SOURCE_FILES
"AmoebaTinkerParameterFile.cpp"
)
SET
(
AMOEBA_TINKER_PARAMETER_FILE_INCLUDE_FILES
"AmoebaTinkerParameterFile.h"
)
Set
(
SHARED_OPENMM__AMOEBA_TARGET OpenMMAmoeba
)
Set
(
STATIC_OPENMM_TARGET OpenMMAmoeba_static
)
Set
(
SHARED_CUDA_TARGET OpenMMAmoebaCuda
)
Set
(
SHARED_OPENMM_AMOEBA_TARGET OpenMMAmoeba
)
Set
(
SHARED_CUDA_TARGET OpenMMCuda
)
Set
(
SHARED_AMOEBA_CUDA_TARGET OpenMMAmoebaCuda
)
Set
(
STATIC_CUDA_TARGET OpenMMCuda_static OpenMMAmoebaCuda_static
)
Set
(
STATIC_OPENMM_TARGET OpenMMAmoeba_static
)
ADD_LIBRARY
(
${
SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET
}
SHARED
${
AMOEBA_TINKER_PARAMETER_FILE_SOURCE_FILES
}
${
AMOEBA_TINKER_PARAMETER_FILE_INCLUDE_FILES
}
)
SET_TARGET_PROPERTIES
(
${
SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET
}
PROPERTIES COMPILE_FLAGS
"-DOPENMM_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY -DOPENMM_VALIDATE_BUILDING_SHARED_LIBRARY"
)
TARGET_LINK_LIBRARIES
(
${
SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET
}
debug
${
OPENMM_LIBRARY_NAME
}
_d optimized
${
OPENMM_LIBRARY_NAME
}
)
TARGET_LINK_LIBRARIES
(
${
SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET
}
debug
${
SHARED_OPENMM_
_
AMOEBA_TARGET
}
_d optimized
${
SHARED_OPENMM_
_
AMOEBA_TARGET
}
)
TARGET_LINK_LIBRARIES
(
${
SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET
}
debug
${
SHARED_CUDA_TARGET
}
_d optimized
${
SHARED_CUDA_TARGET
}
)
TARGET_LINK_LIBRARIES
(
${
SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET
}
debug
${
SHARED_OPENMM_AMOEBA_TARGET
}
_d optimized
${
SHARED_OPENMM_AMOEBA_TARGET
}
)
TARGET_LINK_LIBRARIES
(
${
SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET
}
debug
${
SHARED_
AMOEBA_
CUDA_TARGET
}
_d optimized
${
SHARED_
AMOEBA_
CUDA_TARGET
}
)
IF
(
UNIX AND CMAKE_BUILD_TYPE MATCHES Debug
)
SET
(
SHARED_CUDA_TARGET
${
SHARED_CUDA_TARGET
}
_d
)
SET
(
SHARED_
AMOEBA_
CUDA_TARGET
${
SHARED_
AMOEBA_
CUDA_TARGET
}
_d
)
SET
(
SHARED_OPENMM__AMOEBA_TARGET
${
SHARED_OPENMM__AMOEBA_TARGET
}
_d
)
#SET(STATIC_CUDA_TARGET ${STATIC_CUDA_TARGET}_d)
#Set(STATIC_OPENMM_TARGET ${STATIC_OPENMM_TARGET}_d)
ENDIF
(
UNIX AND CMAKE_BUILD_TYPE MATCHES Debug
)
#LINK_DIRECTORIES
...
...
@@ -42,7 +42,7 @@ FOREACH(TEST_PROG ${TEST_PROGS})
# Link with shared library
CUDA_ADD_EXECUTABLE
(
${
TEST_ROOT
}
${
TEST_PROG
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_TARGET
}
${
SHARED_OPENMM_TARGET
}
${
SHARED_CUDA_TARGET
}
${
SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET
}
)
TARGET_LINK_LIBRARIES
(
${
TEST_ROOT
}
${
SHARED_TARGET
}
${
SHARED_OPENMM_TARGET
}
${
SHARED_
OPENMM_AMOEBA_TARGET
}
${
SHARED_CUDA_TARGET
}
${
SHARED_AMOEBA_
CUDA_TARGET
}
${
SHARED_AMOEBA_TINKER_PARAMETER_FILE_TARGET
}
)
ADD_TEST
(
${
TEST_ROOT
}
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST_ROOT
}
)
# Link with static library
...
...
@@ -56,26 +56,3 @@ FOREACH(TEST_PROG ${TEST_PROGS})
# ADD_TEST(${TEST_STATIC} ${EXECUTABLE_OUTPUT_PATH}/${TEST_STATIC})
ENDFOREACH
(
TEST_PROG
${
TEST_PROGS
}
)
# TestCudaUsingParameterFile customized w/ command-line argument (input file name used in test)
#ADD_EXECUTABLE(TestAmoebaCudaUsingParameterFile TstAmoebaCudaUsingParameterFile.cpp)
#TARGET_LINK_LIBRARIES(TestAmoebaCudaUsingParameterFile ${SHARED_TARGET} ${SHARED_OPENMM_TARGET} ${SHARED_CUDA_TARGET})
#ADD_TEST(TestCudaUsingParameterFile "${EXECUTABLE_OUTPUT_PATH}/TestCudaUsingParameterFile" "-parameterFileName" "${CMAKE_CURRENT_SOURCE_DIR}/lambdaSdObcParameters.txt")
#ADD_TEST(TestCudaUsingParameterFile "${EXECUTABLE_OUTPUT_PATH}/TestCudaUsingParameterFile" "-parameterFileName" "${CMAKE_CURRENT_SOURCE_DIR}/bptiMdRfNoPbcParameters.txt")
#
#SET(TEST_ROOT TestCudaUsingParameterFile)
#SET(TEST_PROG TstCudaUsingParameterFile.cpp)
#SET(TEST_STATIC ${TEST_ROOT}Static)
#SET(INCLUDE_CUDA_STATIC 1)
#IF(INCLUDE_CUDA_STATIC)
# ADD_EXECUTABLE(${TEST_STATIC} ${TEST_PROG})
# SET_TARGET_PROPERTIES(${TEST_STATIC}
# PROPERTIES
# COMPILE_FLAGS "-DOPENMM_USE_STATIC_LIBRARIES"
# )
# TARGET_LINK_LIBRARIES(${TEST_STATIC} ${STATIC_TARGET} ${STATIC_BROOK_TARGET})
# ADD_TEST(${TEST_STATIC} "${EXECUTABLE_OUTPUT_PATH}/TestCudaUsingParameterFileStatic" "-parameterFileName" "${CMAKE_CURRENT_SOURCE_DIR}/lambdaSdObcParameters.txt")
# ADD_TEST(${TEST_STATIC} "${EXECUTABLE_OUTPUT_PATH}/TestCudaUsingParameterFileStatic" "-parameterFileName" "${CMAKE_CURRENT_SOURCE_DIR}/bptiMdRfNoPbcParameters.txt")
# ADD_TEST(${TEST_STATIC} "${EXECUTABLE_OUTPUT_PATH}/TestCudaUsingParameterFileStatic" "-parameterFileName" "${CMAKE_CURRENT_SOURCE_DIR}/bptiMdRfPbcParameters.txt" " +checkEnergyForceConsistent -checkForces" )
#ENDIF(INCLUDE_CUDA_STATIC)
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaForceFromParameterFile.cpp
View file @
aff7f7bd
...
...
@@ -45,7 +45,7 @@ int main( int numberOfArguments, char* argv[] ) {
try
{
std
::
cout
<<
"Running test..."
<<
std
::
endl
;
Platform
::
loadPluginsFromDirectory
(
Platform
::
getDefaultPluginsDirectory
()
);
registerAmoebaCudaKernelFactories
(
);
if
(
numberOfArguments
>
1
){
MapStringString
argumentMap
;
argumentMap
[
INCLUDE_OBC_CAVITY_TERM
]
=
"0"
;
...
...
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaHarmonicAngleForce.cpp
View file @
aff7f7bd
...
...
@@ -305,23 +305,15 @@ int main( int numberOfArguments, char* argv[] ) {
try
{
std
::
cout
<<
"TestCudaAmoebaHarmonicAngleForce running test..."
<<
std
::
endl
;
Platform
::
loadPluginsFromDirectory
(
Platform
::
getDefaultPluginsDirectory
()
);
//FILE* log = fopen( "AmoebaHarmonicAngleForce.log", "w" );;
registerAmoebaCudaKernelFactories
();
FILE
*
log
=
NULL
;
testOneAngle
(
log
);
#ifdef AMOEBA_DEBUG
if
(
log
&&
log
!=
stderr
)
(
void
)
fclose
(
log
);
#endif
}
catch
(
const
std
::
exception
&
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cout
<<
"exception: "
<<
e
.
what
()
<<
std
::
endl
;
std
::
cout
<<
"FAIL - ERROR. Test failed."
<<
std
::
endl
;
return
1
;
}
//std::cout << "PASS - Test succeeded." << std::endl;
std
::
cout
<<
"Done"
<<
std
::
endl
;
return
0
;
}
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaHarmonicBondForce.cpp
View file @
aff7f7bd
...
...
@@ -34,6 +34,7 @@
*/
#include "../../../tests/AssertionUtilities.h"
#include "CudaPlatform.h"
#include "AmoebaTinkerParameterFile.h"
#include "openmm/Context.h"
#include "OpenMMAmoeba.h"
...
...
@@ -45,7 +46,6 @@
using
namespace
OpenMM
;
const
double
TOL
=
1e-5
;
static
void
computeAmoebaHarmonicBondForce
(
int
bondIndex
,
std
::
vector
<
Vec3
>&
positions
,
AmoebaHarmonicBondForce
&
amoebaHarmonicBondForce
,
std
::
vector
<
Vec3
>&
forces
,
double
*
energy
)
{
...
...
@@ -174,6 +174,7 @@ void testOneBond( FILE* log ) {
void
testTwoBond
(
FILE
*
log
)
{
System
system
;
registerAmoebaCudaKernelFactories
();
system
.
addParticle
(
1.0
);
system
.
addParticle
(
1.0
);
...
...
@@ -194,6 +195,7 @@ void testTwoBond( FILE* log ) {
system
.
addForce
(
amoebaHarmonicBondForce
);
Context
context
(
system
,
integrator
,
Platform
::
getPlatformByName
(
"Cuda"
));
//Context context(system, integrator, platform );
std
::
vector
<
Vec3
>
positions
(
3
);
positions
[
0
]
=
Vec3
(
0
,
1
,
0
);
...
...
@@ -208,24 +210,14 @@ int main( int numberOfArguments, char* argv[] ) {
try
{
std
::
cout
<<
"TestCudaAmoebaHarmonicBondForce running test..."
<<
std
::
endl
;
Platform
::
loadPluginsFromDirectory
(
Platform
::
getDefaultPluginsDirectory
()
);
registerAmoebaCudaKernelFactories
(
);
FILE
*
log
=
NULL
;
//FILE* log = stderr;
//testOneBond( log );
testTwoBond
(
log
);
#ifdef AMOEBA_DEBUG
if
(
log
&&
log
!=
stderr
)
(
void
)
fclose
(
log
);
#endif
}
catch
(
const
std
::
exception
&
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cout
<<
"exception: "
<<
e
.
what
()
<<
std
::
endl
;
std
::
cout
<<
"FAIL - ERROR. Test failed."
<<
std
::
endl
;
return
1
;
}
//std::cout << "PASS - Test succeeded." << std::endl;
std
::
cout
<<
"Done"
<<
std
::
endl
;
return
0
;
}
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaHarmonicInPlaneAngleForce.cpp
View file @
aff7f7bd
...
...
@@ -382,23 +382,14 @@ int main( int numberOfArguments, char* argv[] ) {
try
{
std
::
cout
<<
"TestCudaAmoebaHarmonicInPlaneAngleForce running test..."
<<
std
::
endl
;
Platform
::
loadPluginsFromDirectory
(
Platform
::
getDefaultPluginsDirectory
()
);
registerAmoebaCudaKernelFactories
(
);
FILE
*
log
=
NULL
;
//FILE* log = fopen( "AmoebaHarmonicInPlaneAngleForce.log", "w" );;
testOneAngle
(
NULL
);
#ifdef AMOEBA_DEBUG
if
(
log
&&
log
!=
stderr
)
(
void
)
fclose
(
log
);
#endif
}
catch
(
const
std
::
exception
&
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cout
<<
"exception: "
<<
e
.
what
()
<<
std
::
endl
;
std
::
cout
<<
"FAIL - ERROR. Test failed."
<<
std
::
endl
;
return
1
;
}
//std::cout << "PASS - Test succeeded." << std::endl;
std
::
cout
<<
"Done"
<<
std
::
endl
;
return
0
;
}
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaOutOfPlaneBendForce.cpp
View file @
aff7f7bd
...
...
@@ -511,29 +511,16 @@ int main( int numberOfArguments, char* argv[] ) {
try
{
std
::
cout
<<
"TestCudaAmoebaOutOfPlaneBendForce running test..."
<<
std
::
endl
;
Platform
::
loadPluginsFromDirectory
(
Platform
::
getDefaultPluginsDirectory
()
);
//FILE* log = stderr;
registerAmoebaCudaKernelFactories
();
FILE
*
log
=
NULL
;
//FILE* log = fopen( "AmoebaOutOfPlaneBendForce.log", "w" );;
testOneOutOfPlaneBend
(
log
);
//testOneOutOfPlaneBend2( log, atoi( argv[1] ) );
//for( int ii = 1; ii <= 6; ii++ ){
// testOneOutOfPlaneBend2( log, ii );
//}
#ifdef AMOEBA_DEBUG
if
(
log
&&
log
!=
stderr
)
(
void
)
fclose
(
log
);
#endif
}
catch
(
const
std
::
exception
&
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cout
<<
"exception: "
<<
e
.
what
()
<<
std
::
endl
;
std
::
cout
<<
"FAIL - ERROR. Test failed."
<<
std
::
endl
;
return
1
;
}
//std::cout << "PASS - Test succeeded." << std::endl;
std
::
cout
<<
"Done"
<<
std
::
endl
;
return
0
;
}
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaPME.cpp
View file @
aff7f7bd
...
...
@@ -34,6 +34,7 @@
*/
#include "../../../tests/AssertionUtilities.h"
#include "AmoebaTinkerParameterFile.h"
#include "openmm/Context.h"
#include "CudaPlatform.h"
#include "openmm/AmoebaMultipoleForce.h"
...
...
@@ -123,14 +124,12 @@ void testPMEWater() {
int
main
()
{
try
{
Platform
::
loadPluginsFromDirectory
(
Platform
::
getDefaultPluginsDirectory
()
);
registerAmoebaCudaKernelFactories
(
);
testPMEWater
();
}
catch
(
const
exception
&
e
)
{
}
catch
(
const
exception
&
e
)
{
cout
<<
"exception: "
<<
e
.
what
()
<<
endl
;
return
1
;
}
//cout << "Done" << endl;
std
::
cout
<<
"Done"
<<
std
::
endl
;
return
0
;
}
...
...
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaPiTorsionForce.cpp
View file @
aff7f7bd
...
...
@@ -308,24 +308,14 @@ int main( int numberOfArguments, char* argv[] ) {
try
{
std
::
cout
<<
"TestCudaAmoebaPiTorsionForce running test..."
<<
std
::
endl
;
Platform
::
loadPluginsFromDirectory
(
Platform
::
getDefaultPluginsDirectory
()
);
registerAmoebaCudaKernelFactories
(
);
FILE
*
log
=
NULL
;
//FILE* log = stderr;
//FILE* log = fopen( "AmoebaPiTorsionForce1.log", "w" );;
testOnePiTorsion
(
log
);
#ifdef AMOEBA_DEBUG
if
(
log
&&
log
!=
stderr
)
(
void
)
fclose
(
log
);
#endif
}
catch
(
const
std
::
exception
&
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cout
<<
"exception: "
<<
e
.
what
()
<<
std
::
endl
;
std
::
cout
<<
"FAIL - ERROR. Test failed."
<<
std
::
endl
;
return
1
;
}
//std::cout << "PASS - Test succeeded." << std::endl;
std
::
cout
<<
"Done"
<<
std
::
endl
;
return
0
;
}
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaStretchBendForce.cpp
View file @
aff7f7bd
...
...
@@ -292,24 +292,15 @@ int main( int numberOfArguments, char* argv[] ) {
try
{
std
::
cout
<<
"TestCudaAmoebaStretchBendForce running test..."
<<
std
::
endl
;
Platform
::
loadPluginsFromDirectory
(
Platform
::
getDefaultPluginsDirectory
()
);
registerAmoebaCudaKernelFactories
(
);
FILE
*
log
=
NULL
;
//FILE* log = stderr;
//FILE* log = fopen( "AmoebaStretchBendForce1.log", "w" );;
testOneStretchBend
(
log
);
#ifdef AMOEBA_DEBUG
if
(
log
&&
log
!=
stderr
)
(
void
)
fclose
(
log
);
#endif
}
catch
(
const
std
::
exception
&
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cout
<<
"exception: "
<<
e
.
what
()
<<
std
::
endl
;
std
::
cout
<<
"FAIL - ERROR. Test failed."
<<
std
::
endl
;
return
1
;
}
//std::cout << "PASS - Test succeeded." << std::endl;
std
::
cout
<<
"Done"
<<
std
::
endl
;
return
0
;
}
...
...
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaTorsionForce.cpp
View file @
aff7f7bd
...
...
@@ -337,23 +337,15 @@ int main( int numberOfArguments, char* argv[] ) {
try
{
std
::
cout
<<
"TestCudaAmoebaTorsionForce running test..."
<<
std
::
endl
;
Platform
::
loadPluginsFromDirectory
(
Platform
::
getDefaultPluginsDirectory
()
);
//FILE* log = stderr;
registerAmoebaCudaKernelFactories
();
FILE
*
log
=
NULL
;
//FILE* log = fopen( "AmoebaTorsionForce.log", "w" );;
testOneTorsion
(
log
);
#ifdef AMOEBA_DEBUG
if
(
log
&&
log
!=
stderr
)
(
void
)
fclose
(
log
);
#endif
}
catch
(
const
std
::
exception
&
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cout
<<
"exception: "
<<
e
.
what
()
<<
std
::
endl
;
std
::
cout
<<
"FAIL - ERROR. Test failed."
<<
std
::
endl
;
return
1
;
}
//std::cout << "PASS - Test succeeded." << std::endl;
std
::
cout
<<
"Done"
<<
std
::
endl
;
return
0
;
}
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaTorsionTorsionForce.cpp
View file @
aff7f7bd
...
...
@@ -34,11 +34,10 @@
*/
#include "../../../tests/AssertionUtilities.h"
//#include "AmoebaTinkerParameterFile.h"
const
double
DegreesToRadians
=
3.14159265
/
180.0
;
#include "openmm/Context.h"
#include "OpenMMAmoeba.h"
#include "openmm/System.h"
#include "AmoebaTinkerParameterFile.h"
#include "openmm/AmoebaTorsionTorsionForce.h"
#include "openmm/LangevinIntegrator.h"
#include <iostream>
...
...
@@ -2684,25 +2683,15 @@ int main( int numberOfArguments, char* argv[] ) {
try
{
std
::
cout
<<
"TestCudaAmoebaTorsionTorsionForce running test..."
<<
std
::
endl
;
Platform
::
loadPluginsFromDirectory
(
Platform
::
getDefaultPluginsDirectory
()
);
registerAmoebaCudaKernelFactories
(
);
FILE
*
log
=
NULL
;
//FILE* log = stderr;
//FILE* log = fopen( "AmoebaTorsionTorsionForce1.log", "w" );;
// testTorsionTorsion( log, 0 );
testTorsionTorsion
(
log
,
1
);
#ifdef AMOEBA_DEBUG
if
(
log
&&
log
!=
stderr
)
(
void
)
fclose
(
log
);
#endif
}
catch
(
const
std
::
exception
&
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cout
<<
"exception: "
<<
e
.
what
()
<<
std
::
endl
;
std
::
cout
<<
"FAIL - ERROR. Test failed."
<<
std
::
endl
;
return
1
;
}
//std::cout << "PASS - Test succeeded." << std::endl;
std
::
cout
<<
"Done"
<<
std
::
endl
;
return
0
;
}
...
...
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaUreyBradleyForce.cpp
View file @
aff7f7bd
...
...
@@ -208,25 +208,15 @@ int main( int numberOfArguments, char* argv[] ) {
try
{
std
::
cout
<<
"TestCudaAmoebaUreyBradleyForce running test..."
<<
std
::
endl
;
Platform
::
loadPluginsFromDirectory
(
Platform
::
getDefaultPluginsDirectory
()
);
registerAmoebaCudaKernelFactories
(
);
FILE
*
log
=
NULL
;
//FILE* log = stderr;
//testOneBond( log );
testTwoBond
(
log
);
#ifdef AMOEBA_DEBUG
if
(
log
&&
log
!=
stderr
)
(
void
)
fclose
(
log
);
#endif
}
catch
(
const
std
::
exception
&
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cout
<<
"exception: "
<<
e
.
what
()
<<
std
::
endl
;
std
::
cout
<<
"FAIL - ERROR. Test failed."
<<
std
::
endl
;
return
1
;
}
//std::cout << "PASS - Test succeeded." << std::endl;
std
::
cout
<<
"Done"
<<
std
::
endl
;
return
0
;
}
plugins/amoeba/platforms/cuda/tests/TestCudaAmoebaVdwForce.cpp
View file @
aff7f7bd
...
...
@@ -36,6 +36,7 @@
#include "../../../tests/AssertionUtilities.h"
#include "openmm/Context.h"
#include "OpenMMAmoeba.h"
#include "AmoebaTinkerParameterFile.h"
#include "openmm/System.h"
#include "openmm/AmoebaVdwForce.h"
#include "openmm/LangevinIntegrator.h"
...
...
@@ -174,24 +175,15 @@ int main( int numberOfArguments, char* argv[] ) {
try
{
std
::
cout
<<
"TestCudaAmoebaVdwForce running test..."
<<
std
::
endl
;
Platform
::
loadPluginsFromDirectory
(
Platform
::
getDefaultPluginsDirectory
()
);
registerAmoebaCudaKernelFactories
(
);
FILE
*
log
=
NULL
;
//FILE* log = stderr;
//FILE* log = fopen( "AmoebaVdwForce1.log", "w" );;
testVdw
(
log
);
#ifdef AMOEBA_DEBUG
if
(
log
&&
log
!=
stderr
)
(
void
)
fclose
(
log
);
#endif
}
catch
(
const
std
::
exception
&
e
)
{
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cout
<<
"exception: "
<<
e
.
what
()
<<
std
::
endl
;
std
::
cout
<<
"FAIL - ERROR. Test failed."
<<
std
::
endl
;
return
1
;
}
//std::cout << "PASS - Test succeeded." << std::endl;
std
::
cout
<<
"Done"
<<
std
::
endl
;
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment