The usage of the new Makefile |
|
For Linux a Makefile was written for RMC_POT++ to make
the usage of the different option switches easier. Originally the option
switches had to be switched ON or OFF in the altern.h file. Switching an
option OFF had to be done by commenting it out from the code.
The user does not have to
edit the altern.h file, the state of the option switches in the file
does not matter. The generated code depends on the command line options passed
to make. To avoid mixing up the executables created with different set of
option switches, the executable name will contain indication, what switches are
turned ON for the given compilation. Further more, the program will display at
the beginning of the screen output, which compiler option were used.
The
program name will begin with rmcp.
The following table will
contain the command line options and the indicators in the file name for the
different option switches.
Command line option for make |
Indicators in the executable name |
Option switch |
MULTI=0 |
_multi |
_MULTI
for multi-threading |
NOPER=0 |
_nop |
_NO_PERIODIC for the simulation without periodic
boundary condition |
AT=0 |
_atlas |
_ATLAS is ON |
SUMP=0 |
_sp |
_SUM_PPCF is ON,
the ppcf_s will be averaged and written at the end of the *.ppcf file |
TEST=X |
_t |
_TEST_MODE is
ON, X is the number of generated steps to do |
OLDOUT=0 |
_oo |
_OLDFORMAT_OUT is
ON, a *.out file will be created containing the output in old format |
MULQ=0 |
_mq |
_Q_SWITCH_SQ_FQ is ON, for all the S(Q) and F(Q) data
sets Q*S(Q) or Q*F(Q) is expected, this is fitted and saved |
MAC=0 |
_mac |
_CODE_WARRIOR_MAC
is ON, the code if compiled for this platform. |
OH=0 |
_oh |
_OLD_HEADER
(only needed if the computer has the old style C++ header files) |
NEI=0 |
_nei |
_NEI option is
on, neighbour list is saved into the *.nei file. |
NEI=e |
_neie |
_NEIE option is
on, neighbour list, squared neighbour distances and vector is saved into the
*.nei file. |
AVM=0 |
_avm |
_AV_MOVE, the
average moved distance of the atoms will be written at each screen display. |
POT=0 |
_pot |
_POTENTIAL, the code is compiled for potential
using simulation, a *.top file will be required. |
LOC=0 |
_loc |
_LOCAL_INV, local invariance will be
calculated. |
LOC=ns |
_locns |
_LOCAL_INV _LOCA_INV_NS is ON (no *.lhgm file will be
created during the local invariance calculation) |
RGR=0 |
_rgr |
_R_SWITCH_GR_MIN_1 option is ON, the program will
expect r*[g(r)-1] data for all the g(r) data sets, and will fit and save that
as well |
VIBRAMP=0 |
_vamp |
_VIBR_AMP, the vibrational motions of the atoms
will be calculated. |
CHI =0 |
_chi |
_WRITE_CHI2_DETAIL
is ON (the c2 components will
be written in to the *.chi file for every rejected move). |
I64=0 |
_i64 |
_USE_INT64, if
it is on, use integer 64 (8 byte) for longint, otherwise int will be used (4
byte). |
INT =0 |
_i |
Use
this, if you want to compile with Intel icpc compiler instead of the default
gcc. |
ARCH=X |
X |
X
is a character string indicating the architecture (like 64 for 64-bit
processors) added to the filename before .exe extension. |
You can use any number of different
option switches in the same time.
Always delete the
*.o object files before starting compilation with a new set of options, as make cannot detect in the
object files which options were used during their compilation, and it will use
the old compilation’s object files instead of recompiling them if the source
was not modified!
Example:
If you want to compile the
RMC_POT++ program with potential usage and summing for parallel execution on a
64-bit processor, use the command
make MULTI=0 POT=0 ARCH=64
This will result in the
executable named rmcp_multi_pot64.exe
Typing ‘make help’ in the command line in the directory
where the Makefile located will give instruction on the usage as well.
Availability
The Source packages on the download page will contain the Makefile from now on,
but you can download it separately from here as well.
Last modified 28/07/2015 by Orsolya Gereben