CMySql::CMySql() : ServerBase("MySQL", MYSQL_DEFAULT_PORT) { char szMySqlExe[4][_MAX_PATH] = { "mysqld.exe", "mysqld-nt.exe", "mysqld-opt.exe", "mysqld-shareware.exe"}; char szMyIniPath[_MAX_PATH] = {0}, szExePath[_MAX_PATH] = {0}; _snprintf(m_sMySqlPath, sizeof(m_sMySqlPath)-1, "%sMySql\\", CUtils::GetEasyPhpPath()); for (int niI = 0; niI <= 3; niI++) { _snprintf(szExePath, _MAX_PATH-1, "%sbin\\%s", (LPCTSTR) m_sMySqlPath, szMySqlExe[niI]); if (_access(szExePath, 0) != -1) { SetExePath(szExePath); break; } } /* GetWindowsDirectory(szMyIniPath, MAX_PATH); strcat(szMyIniPath, "\\My.Ini");*/ _snprintf(szMyIniPath, sizeof(szMyIniPath)-1, "%smy.ini", m_sMySqlPath); SetConfFile(szMyIniPath); char szTempPath[MAX_PATH] = {0}; _snprintf(szTempPath, sizeof(szTempPath)-1, "%sconf_files\\my.ini", CUtils::GetEasyPhpPath()); SetTemplateConfFile(szTempPath); m_szMySqlParams[0] = '\0'; CUtils::ScanProcess(GetExePath(), m_stProcInfo.dwProcessId); ReadConfFile(); }
//int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow) int main(int argc,char *argv[]) { // Init socket under win32 WSADATA wsaData; WORD wVersionRequested=MAKEWORD(1,1); if (WSAStartup(wVersionRequested,&wsaData)) return(-1); if ((LOBYTE(wsaData.wVersion)!=1) || (HIBYTE(wsaData.wVersion)!=1)) { WSACleanup(); return(-1); } // End init socket ReadConfFile(params); printf("%s\n%s\n%s\n%s\n%s\n", params.Login.c_str(), params.Password.c_str(), params.ServerName.c_str(), params.SchemeName.c_str(), params.BaseFiles.c_str()); if ((argc==2) && (!strcmp(argv[1],"i"))) IndexData(); return(StartServer(8090)); }
int main() { // Test the system SystemTest(); // Read the configure file ReadConfFile(); // Load all the frames LoadFrames(); // Put both topological and geometrical data into arrays GetTopologyAndGeometry(); // Get the global bounding box GetGlobalBoundingBox(); // Calculate the number of blocks in X, Y and Z CalculateNumOfBlocksInXYZ(); // Divide the flow domain into blocks //Division(); InitializationForNaiveTracing(); // Initially locate global tetrahedral cells for interesting Cartesian grid points InitialCellLocation(); //int xRes = configure->GetBoundingBoxXRes(); //int yRes = configure->GetBoundingBoxYRes(); //int zRes = configure->GetBoundingBoxZRes(); //int numOfGridPoints = (xRes + 1) * (yRes + 1) * (zRes + 1); //// Evaluate the device usage //int need = SizeOfDeviceArrays(globalNumOfPoints, globalNumOfCells, numOfGridPoints, numOfInitialActiveParticles, numOfQueries, // startOffsetInPoint[numOfInterestingBlocks], startOffsetInCell[numOfInterestingBlocks], // numOfInterestingBlocks); //printf("need = %d bytes\n", need); ///// Check the natural coordinates of some points //CheckNaturalCoordinates(); ///// DEBUG /// ////return 0; // Main Tracing Process Tracing(); // Get final positions for initial active particles GetFinalPositions(); return 0; }
int main(int argc, char **argv) { char ErrorMsg[256]; timebomb(); fFile_Run_Log = fopen(szName_Run_Log, "w"); if(fFile_Run_Log==NULL) { sprintf(ErrorMsg, "Fail to create the log file.\n\n"); Quit_With_Error_Msg(ErrorMsg); } strcpy(szName_Conf_File, argv[1]); ReadConfFile(szName_Conf_File); //eliot MPI_Init(&argc, &argv); // MPI_Comm_rank(MPI_COMM_WORLD, &ProgID); // MPI_Comm_size(MPI_COMM_WORLD, &nProc); ForceField.ReadForceField(szName_Force_Field); Mol_ESP.ReadPSF(szName_XPSF, 0); Read_Rtf_File(); strcpy(Mol_ESP.MolName, Mol_ESP.ResName[0]); Mol_ESP.AssignForceFieldParameters(&ForceField); Read_Soft_DihedralList(); Mol_ESP.Is_Phi_Psi_Constrained = 0; Mol_ESP.E_CMap_On = 0; Read_QM_Rotamer_Data(); if( nRotamer == 0 ) { printf("No rotamers found. The should be at least one in all-rotamer.dat. Something has gone wrong in the previous step\n" ); exit(0); } Read_Tor_Para_1D_Fitting(); Assign_Torsion_Parameters(); Read_1D_Scan_QM_Data(); // Cal_E_MM_Scaned(); // Cal_E_MM_Rotamer(); fFitting = fopen("fitting.dat", "w"); Fitting_Torsion_Parameters(); fclose(fFitting); // FILE *fOut; // fOut = fopen("rotamer-E.dat", "w"); // for(i=0; i<nRotamer; i++) { // fprintf(fOut, "%d %lf %lf %lf\n", i+1, E_Rotamer_QM[i], E_Rotamer_MM[i], rmsd_Rotamer[i]); // } // fclose(fOut); // Cal_E_MM_QM_Diff(7); // for(i=0; i<n_Phi; i++) { // Cal_E_MM_QM_Diff(i); // } // Fit_Torsion_Parameters(7); // fPara = fopen("torsion-para.dat", "w"); // for(i=0; i<n_Phi; i++) { // Fit_Torsion_Parameters(i); // } // fclose(fPara); // Geoometry_Optimization_With_Constraint(&Mol_ESP); fflush(fFile_Run_Log); fclose(fFile_Run_Log); // MPI_Finalize(); return 0; }