Skip to content

Commit

Permalink
use Git version for all solvers except Fortran and MovingBoundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed Aug 11, 2023
1 parent 23933cb commit bcfd07f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 42 deletions.
9 changes: 2 additions & 7 deletions IDAWin/SundialsSolverStandalone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "VCellIDASolver.h"
#include "OdeResultSet.h"
#include "StoppedByUserException.h"
#include <VCELL/GitDescribe.h>

#include <stdio.h>
#include <iomanip>
Expand Down Expand Up @@ -113,16 +114,10 @@ void errExit(int returnCode, string& errorMsg) {
}
#endif
}
#if !defined(SVNVERSION)
#error SVNVERSION version not defined
#endif
#define VCELLSVNQ(x) #x
#define VCELLSVNQUOTE(x) VCELLSVNQ(x)


int main(int argc, char *argv[]) {
std::cout
<< "Sundials Standalone version $URL$" VCELLSVNQUOTE(SVNVERSION)
<< "Sundials Standalone version " << g_GIT_DESCRIBE
<< std::endl;
cout << setprecision(20);

Expand Down
9 changes: 2 additions & 7 deletions NFsim_v1.11/VCell/src/VCellNFSim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <cstring>
#include <stdexcept>
#include <VCELL/SimulationMessaging.h>
#include <VCELL/GitDescribe.h>
#include <VCellException.h>
#include <vcellxml.h>
#include "JMSHolder.h"
Expand Down Expand Up @@ -38,19 +39,13 @@ namespace {
#define NETWORK_MESSAGING(x,y) y
#endif

#if !defined(SVNVERSION)
#error SVNVERSION version not defined
#endif
#define VCELLSVNQ(x) #x
#define VCELLSVNQUOTE(x) VCELLSVNQ(x)

int main(int argc, char **argv) {

std::string errorMessage = "Exception: ";
vcell::JMSHolder holder; //we need to keep these strings in memory until end of program
try {
std::cout
<< "NFsim " << NETWORK_MESSAGING( "network","console" ) << " messaging version $URL: svn://code3.cam.uchc.edu/vcell/trunk/numerics/NFsim_v1.11/VCell/src/VCellNFSim.cpp $" VCELLSVNQUOTE(SVNVERSION)
<< "NFsim " << NETWORK_MESSAGING( "network","console" ) << " messaging version " << g_GIT_DESCRIBE
<< std::endl;
bool isMessaging = startupMessaging(argc,argv,holder);
std::cout << " messaging is " << onOrOff(isMessaging) << std::endl;
Expand Down
11 changes: 3 additions & 8 deletions Stochastic/VCellStoch/src/VCellStoch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <VCELL/SimulationMessaging.h>
#endif
#include "../include/Gibson.h"
#include <VCELL/GitDescribe.h>
using namespace std;

static void printUsage() {
Expand Down Expand Up @@ -89,12 +90,6 @@ static void errExit(int returnCode, string& errorMsg) {
#endif

}
#if !defined(SVNVERSION)
#error SVNVERSION version not defined
#endif
#define VCELLSVNQ(x) #x
#define VCELLSVNQUOTE(x) VCELLSVNQ(x)


/* This file is the entrance of the Virtual Cell stochastic simulation package.
* It parses the commandline arguments to load different simulators. Four parameters
Expand All @@ -107,8 +102,8 @@ static void errExit(int returnCode, string& errorMsg) {
*/
int main(int argc, char *argv[])
{
std::cout
<< "Stochastic simulation version $URL$" VCELLSVNQUOTE(SVNVERSION)
std::cout
<< "Stochastic simulation version " << g_GIT_DESCRIBE
<< std::endl;
if (argc != 4 && argc != 6) {
cout << "Wrong arguments!" << endl;
Expand Down
8 changes: 2 additions & 6 deletions VCell/src/FiniteVolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ using namespace std;
#include <sys/stat.h>
#include <VCELL/SimTool.h>
#include <VCELL/SimulationMessaging.h>
#include <VCell/GitDescribe.h>
#include <Exception.h>
#include <vcellhybrid.h>
#ifdef VCELL_PETSC
Expand Down Expand Up @@ -35,11 +36,6 @@ void printUsage() {
cout << "Arguments : [-d output] [-nz] fvInputFile" << endl;
#endif
}
#if !defined(SVNVERSION)
#error SVNVERSION version not defined
#endif
#define VCELLSVNQ(x) #x
#define VCELLSVNQUOTE(x) VCELLSVNQ(x)

#ifdef VCELL_PETSC
PetscErrorCode VCellPetscReturnErrorHandler(MPI_Comm comm,int line,const char *fun,const char *file,PetscErrorCode n,PetscErrorType p,const char *mess,void *ctx)
Expand All @@ -55,7 +51,7 @@ PetscErrorCode VCellPetscReturnErrorHandler(MPI_Comm comm,int line,const char *f
int main(int argc, char *argv[])
{
std::cout
<< "Finite Volume version $URL$" VCELLSVNQUOTE(SVNVERSION) << " with smoldyn version " << VERSION
<< "Finite Volume version " << g_GIT_DESCRIBE << " with smoldyn version " << VERSION
<< std::endl;

#ifdef VCELL_PETSC
Expand Down
9 changes: 2 additions & 7 deletions VCellChombo/src/FiniteVolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ using namespace std;
#include <VCELL/SimTool.h>
#include <string.h>
#include <VCELL/SimulationMessaging.h>
#include <VCELL/GitDescribe.h>
#include <Exception.h>

#ifdef CH_MPI
Expand Down Expand Up @@ -88,12 +89,6 @@ void onExit()
}
}

#if !defined(SVNVERSION)
#error SVNVERSION version not defined
#endif
#define VCELLSVNQ(x) #x
#define VCELLSVNQUOTE(x) VCELLSVNQ(x)

int main(int argc, char *argv[])
{
#ifdef CH_MPI
Expand All @@ -103,7 +98,7 @@ int main(int argc, char *argv[])
#endif

pout()
<< "Chombo solver " << mpiStatus << VCELLSVNQUOTE(CH_SPACEDIM)"D version $URL$"VCELLSVNQUOTE(SVNVERSION)
<< "Chombo solver " << mpiStatus << CH_SPACEDIM << "D version " << g_GIT_DESCRIBE
<< std::endl;
printUsage();

Expand Down
11 changes: 4 additions & 7 deletions bridgeVCellSmoldyn/vcell_smoldyn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <sstream>
#include <cstdarg>
#include <VCELL/SimulationMessaging.h>
#include <VCELL/GitDescribe.h>
#include "opengl2.h"
#include "smoldyn.h"
#include "random2.h"
Expand All @@ -29,11 +30,6 @@ namespace {
/* ***************************************************************** */
/* ********************** main() segment *************************** */
/* ***************************************************************** */
#if !defined(SVNVERSION)
#error SVNVERSION version not defined
#endif
#define VCELLSVNQ(x) #x
#define VCELLSVNQUOTE(x) VCELLSVNQ(x)


#ifdef USE_MESSAGING
Expand All @@ -45,8 +41,9 @@ namespace {
/* main */
int main(int argc,char **argv) {
std::cout
<< "Smoldyn solver version " << Variant << " $URL: svn://code3.cam.uchc.edu/vcell/trunk/numerics/smoldyn/source/vcell/vcell_smoldyn.c $" VCELLSVNQUOTE(SVNVERSION)
<< std::endl;
<< "Smoldyn solver version " << Variant << " " << g_GIT_DESCRIBE
<< std::endl;
std::cout.flush();
const int errMsgLen = 2048;
char errorMsg[errMsgLen];
int exitCode = 0;
Expand Down

0 comments on commit bcfd07f

Please sign in to comment.