| 54 |
|
#include "math/Vector3.hpp" |
| 55 |
|
#include "primitives/Molecule.hpp" |
| 56 |
|
#include "primitives/StuntDouble.hpp" |
| 57 |
– |
#include "UseTheForce/DarkSide/neighborLists_interface.h" |
| 58 |
– |
#include "UseTheForce/doForces_interface.h" |
| 57 |
|
#include "utils/MemoryUtils.hpp" |
| 58 |
|
#include "utils/simError.h" |
| 59 |
|
#include "selection/SelectionManager.hpp" |
| 61 |
|
#include "UseTheForce/ForceField.hpp" |
| 62 |
|
#include "nonbonded/SwitchingFunction.hpp" |
| 63 |
|
|
| 66 |
– |
#ifdef IS_MPI |
| 67 |
– |
#include "UseTheForce/mpiComponentPlan.h" |
| 68 |
– |
#include "UseTheForce/DarkSide/simParallel_interface.h" |
| 69 |
– |
#endif |
| 70 |
– |
|
| 64 |
|
using namespace std; |
| 65 |
|
namespace OpenMD { |
| 66 |
|
|
| 886 |
|
int* oneThreeList = oneThreeInteractions_.getPairList(); |
| 887 |
|
int* oneFourList = oneFourInteractions_.getPairList(); |
| 888 |
|
|
| 889 |
< |
setFortranSim( &fInfo_, &nGlobalAtoms_, &nAtoms_, &identArray_[0], |
| 890 |
< |
&nExclude, excludeList, |
| 891 |
< |
&nOneTwo, oneTwoList, |
| 892 |
< |
&nOneThree, oneThreeList, |
| 893 |
< |
&nOneFour, oneFourList, |
| 894 |
< |
&molMembershipArray[0], &mfact[0], &nCutoffGroups_, |
| 895 |
< |
&fortranGlobalGroupMembership[0], &isError); |
| 903 |
< |
|
| 904 |
< |
if( isError ){ |
| 905 |
< |
|
| 906 |
< |
sprintf( painCave.errMsg, |
| 907 |
< |
"There was an error setting the simulation information in fortran.\n" ); |
| 908 |
< |
painCave.isFatal = 1; |
| 909 |
< |
painCave.severity = OPENMD_ERROR; |
| 910 |
< |
simError(); |
| 911 |
< |
} |
| 889 |
> |
//setFortranSim( &fInfo_, &nGlobalAtoms_, &nAtoms_, &identArray_[0], |
| 890 |
> |
// &nExclude, excludeList, |
| 891 |
> |
// &nOneTwo, oneTwoList, |
| 892 |
> |
// &nOneThree, oneThreeList, |
| 893 |
> |
// &nOneFour, oneFourList, |
| 894 |
> |
// &molMembershipArray[0], &mfact[0], &nCutoffGroups_, |
| 895 |
> |
// &fortranGlobalGroupMembership[0], &isError); |
| 896 |
|
|
| 897 |
+ |
// if( isError ){ |
| 898 |
+ |
// |
| 899 |
+ |
// sprintf( painCave.errMsg, |
| 900 |
+ |
// "There was an error setting the simulation information in fortran.\n" ); |
| 901 |
+ |
// painCave.isFatal = 1; |
| 902 |
+ |
// painCave.severity = OPENMD_ERROR; |
| 903 |
+ |
// simError(); |
| 904 |
+ |
//} |
| 905 |
|
|
| 914 |
– |
sprintf( checkPointMsg, |
| 915 |
– |
"succesfully sent the simulation information to fortran.\n"); |
| 906 |
|
|
| 907 |
< |
errorCheckPoint(); |
| 907 |
> |
// sprintf( checkPointMsg, |
| 908 |
> |
// "succesfully sent the simulation information to fortran.\n"); |
| 909 |
|
|
| 910 |
+ |
// errorCheckPoint(); |
| 911 |
+ |
|
| 912 |
|
// Setup number of neighbors in neighbor list if present |
| 913 |
< |
if (simParams_->haveNeighborListNeighbors()) { |
| 914 |
< |
int nlistNeighbors = simParams_->getNeighborListNeighbors(); |
| 915 |
< |
setNeighbors(&nlistNeighbors); |
| 916 |
< |
} |
| 913 |
> |
//if (simParams_->haveNeighborListNeighbors()) { |
| 914 |
> |
// int nlistNeighbors = simParams_->getNeighborListNeighbors(); |
| 915 |
> |
// setNeighbors(&nlistNeighbors); |
| 916 |
> |
//} |
| 917 |
|
|
| 918 |
|
#ifdef IS_MPI |
| 919 |
< |
mpiSimData parallelData; |
| 919 |
> |
// mpiSimData parallelData; |
| 920 |
|
|
| 921 |
|
//fill up mpiSimData struct |
| 922 |
< |
parallelData.nMolGlobal = getNGlobalMolecules(); |
| 923 |
< |
parallelData.nMolLocal = getNMolecules(); |
| 924 |
< |
parallelData.nAtomsGlobal = getNGlobalAtoms(); |
| 925 |
< |
parallelData.nAtomsLocal = getNAtoms(); |
| 926 |
< |
parallelData.nGroupsGlobal = getNGlobalCutoffGroups(); |
| 927 |
< |
parallelData.nGroupsLocal = getNCutoffGroups(); |
| 928 |
< |
parallelData.myNode = worldRank; |
| 929 |
< |
MPI_Comm_size(MPI_COMM_WORLD, &(parallelData.nProcessors)); |
| 922 |
> |
// parallelData.nMolGlobal = getNGlobalMolecules(); |
| 923 |
> |
// parallelData.nMolLocal = getNMolecules(); |
| 924 |
> |
// parallelData.nAtomsGlobal = getNGlobalAtoms(); |
| 925 |
> |
// parallelData.nAtomsLocal = getNAtoms(); |
| 926 |
> |
// parallelData.nGroupsGlobal = getNGlobalCutoffGroups(); |
| 927 |
> |
// parallelData.nGroupsLocal = getNCutoffGroups(); |
| 928 |
> |
// parallelData.myNode = worldRank; |
| 929 |
> |
// MPI_Comm_size(MPI_COMM_WORLD, &(parallelData.nProcessors)); |
| 930 |
|
|
| 931 |
|
//pass mpiSimData struct and index arrays to fortran |
| 932 |
|
//setFsimParallel(¶llelData, &(parallelData.nAtomsLocal), |
| 933 |
|
// &localToGlobalAtomIndex[0], &(parallelData.nGroupsLocal), |
| 934 |
|
// &localToGlobalCutoffGroupIndex[0], &isError); |
| 935 |
|
|
| 936 |
< |
if (isError) { |
| 937 |
< |
sprintf(painCave.errMsg, |
| 938 |
< |
"mpiRefresh errror: fortran didn't like something we gave it.\n"); |
| 939 |
< |
painCave.isFatal = 1; |
| 940 |
< |
simError(); |
| 941 |
< |
} |
| 936 |
> |
// if (isError) { |
| 937 |
> |
// sprintf(painCave.errMsg, |
| 938 |
> |
// "mpiRefresh errror: fortran didn't like something we gave it.\n"); |
| 939 |
> |
// painCave.isFatal = 1; |
| 940 |
> |
// simError(); |
| 941 |
> |
// } |
| 942 |
|
|
| 943 |
< |
sprintf(checkPointMsg, " mpiRefresh successful.\n"); |
| 944 |
< |
errorCheckPoint(); |
| 943 |
> |
// sprintf(checkPointMsg, " mpiRefresh successful.\n"); |
| 944 |
> |
// errorCheckPoint(); |
| 945 |
|
#endif |
| 946 |
|
|
| 947 |
< |
initFortranFF(&isError); |
| 948 |
< |
if (isError) { |
| 949 |
< |
sprintf(painCave.errMsg, |
| 950 |
< |
"initFortranFF errror: fortran didn't like something we gave it.\n"); |
| 951 |
< |
painCave.isFatal = 1; |
| 952 |
< |
simError(); |
| 953 |
< |
} |
| 954 |
< |
fortranInitialized_ = true; |
| 947 |
> |
// initFortranFF(&isError); |
| 948 |
> |
// if (isError) { |
| 949 |
> |
// sprintf(painCave.errMsg, |
| 950 |
> |
// "initFortranFF errror: fortran didn't like something we gave it.\n"); |
| 951 |
> |
// painCave.isFatal = 1; |
| 952 |
> |
// simError(); |
| 953 |
> |
// } |
| 954 |
> |
// fortranInitialized_ = true; |
| 955 |
|
} |
| 956 |
|
|
| 957 |
|
void SimInfo::addProperty(GenericData* genData) { |