report compile time options (-DLAMMPS_XXX) in help output and info config
This commit is contained in:
@ -262,6 +262,7 @@ void Info::command(int narg, char **arg)
|
|||||||
|
|
||||||
fprintf(out,"\nLAMMPS version: %s / %s\n",
|
fprintf(out,"\nLAMMPS version: %s / %s\n",
|
||||||
universe->version, universe->num_ver);
|
universe->version, universe->num_ver);
|
||||||
|
lmp->print_config(out);
|
||||||
fprintf(out,"sizeof(smallint): %3d-bit\n",(int)sizeof(smallint)*8);
|
fprintf(out,"sizeof(smallint): %3d-bit\n",(int)sizeof(smallint)*8);
|
||||||
fprintf(out,"sizeof(imageint): %3d-bit\n",(int)sizeof(imageint)*8);
|
fprintf(out,"sizeof(imageint): %3d-bit\n",(int)sizeof(imageint)*8);
|
||||||
fprintf(out,"sizeof(tagint): %3d-bit\n",(int)sizeof(tagint)*8);
|
fprintf(out,"sizeof(tagint): %3d-bit\n",(int)sizeof(tagint)*8);
|
||||||
|
|||||||
@ -31,6 +31,7 @@
|
|||||||
#include "style_region.h"
|
#include "style_region.h"
|
||||||
#include "universe.h"
|
#include "universe.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
#include "info.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
@ -823,6 +824,8 @@ void LAMMPS::help()
|
|||||||
"-var varname value : set index style variable (-v)\n\n",
|
"-var varname value : set index style variable (-v)\n\n",
|
||||||
exename);
|
exename);
|
||||||
|
|
||||||
|
|
||||||
|
print_config(fp);
|
||||||
fprintf(fp,"List of style options included in this LAMMPS executable\n\n");
|
fprintf(fp,"List of style options included in this LAMMPS executable\n\n");
|
||||||
|
|
||||||
int pos = 80;
|
int pos = 80;
|
||||||
@ -974,3 +977,64 @@ void print_style(FILE *fp, const char *str, int &pos)
|
|||||||
pos += 80;
|
pos += 80;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char lammps_config_options[]
|
||||||
|
= "LAMMPS compile time settings:\n"
|
||||||
|
"Integer sizes setting: "
|
||||||
|
#if defined(LAMMPS_SMALLSMALL)
|
||||||
|
" -DLAMMPS_SMALLSMALL"
|
||||||
|
#elif defined(LAMMPS_SMALLBIG)
|
||||||
|
" -DLAMMPS_SMALLBIG"
|
||||||
|
#elif defined(LAMMPS_BIGBIG)
|
||||||
|
" -DLAMMPS_BIGBIG"
|
||||||
|
#else
|
||||||
|
" (unkown)"
|
||||||
|
#endif
|
||||||
|
"\nExternal commands support:"
|
||||||
|
#if defined(LAMMPS_GZIP)
|
||||||
|
" -DLAMMPS_GZIP"
|
||||||
|
#endif
|
||||||
|
#if defined(LAMMPS_FFMPEG)
|
||||||
|
" -DLAMMPS_FFMPEG"
|
||||||
|
#endif
|
||||||
|
"\nImage library support: "
|
||||||
|
#if defined(LAMMPS_JPEG)
|
||||||
|
" -DLAMMPS_JPEG"
|
||||||
|
#endif
|
||||||
|
#if defined(LAMMPS_PNG)
|
||||||
|
" -DLAMMPS_PNG"
|
||||||
|
#endif
|
||||||
|
"\nFFT library support: "
|
||||||
|
#if defined(FFT_SINGLE)
|
||||||
|
" -DFFT_SINGLE"
|
||||||
|
#endif
|
||||||
|
#if defined(FFT_FFTW) || defined(FFT_FFTW3)
|
||||||
|
" -DFFT_FFTW3"
|
||||||
|
#elif defined(FFT_FFTW2)
|
||||||
|
" -DFFT_FFTW2"
|
||||||
|
#elif defined(FFT_MKL)
|
||||||
|
" -DFFT_MKL"
|
||||||
|
#else
|
||||||
|
" -DFFT_KISSFFT"
|
||||||
|
#endif
|
||||||
|
"\nMemory alignment: "
|
||||||
|
#if defined(LAMMPS_MEMALIGN)
|
||||||
|
#define lmp_str(s) #s
|
||||||
|
#define lmp_xstr(s) lmp_str(s)
|
||||||
|
" -DLAMMPS_MEMALIGN=" lmp_xstr(LAMMPS_MEMALIGN)
|
||||||
|
#else
|
||||||
|
" (default)"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
"\nException support: "
|
||||||
|
#if defined(LAMMPS_EXCEPTIONS)
|
||||||
|
" -DLAMMPS_EXCEPTIONS\n"
|
||||||
|
#else
|
||||||
|
" (not enabled)\n"
|
||||||
|
#endif
|
||||||
|
"\n";
|
||||||
|
|
||||||
|
void LAMMPS::print_config(FILE *fp)
|
||||||
|
{
|
||||||
|
fputs(lammps_config_options,fp);
|
||||||
|
}
|
||||||
|
|||||||
@ -65,6 +65,7 @@ class LAMMPS {
|
|||||||
void post_create();
|
void post_create();
|
||||||
void init();
|
void init();
|
||||||
void destroy();
|
void destroy();
|
||||||
|
void print_config(FILE *); // print compile time settings
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void help();
|
void help();
|
||||||
|
|||||||
Reference in New Issue
Block a user