Code: microMegas

From EVOCD
(Difference between revisions)
Jump to: navigation, search
(Run the simulation)
(Added to category of DD)
 
(35 intermediate revisions by 2 users not shown)
Line 20: Line 20:
 
|-
 
|-
 
! Repository  
 
! Repository  
| [https://icme.hpc.msstate.edu/viewvc/CMD%20Codes%20Repository/mM/tags/1.0 mM v1.0] or [https://icme.hpc.msstate.edu/viewvc/CMD%20Codes%20Repository/mMpar/trunk/ mMpar]
+
| [[Repository of codes| mM or mMpar]]
 
|-
 
|-
 
! Documentation
 
! Documentation
| mM: [https://icme.hpc.msstate.edu/viewvc/CMD%20Codes%20Repository/mM/trunk/README.txt?view=markup README.txt (mM/trunk)]; [https://icme.hpc.msstate.edu/viewvc/CMD%20Codes%20Repository/mM/tags/1.0/README.txt?view=markup README.txt (mM/tags/1.0)] or
+
| Included in the distribution
| mMpar: [https://icme.hpc.msstate.edu/viewvc/CMD%20Codes%20Repository/mMpar/trunk/README.txt?view=markup README.txt (mMpar/trunk)]; [https://icme.hpc.msstate.edu/viewvc/CMD%20Codes%20Repository/mMpar/trunk/doc/MSU.CAVS.CMD.2010-R0002.pdf?view=co MSU.CAVS.CMD.2010-R0002.pdf (mMpar/doc)]
+
 
|-
 
|-
 
! Known problems
 
! Known problems
Line 39: Line 38:
 
== Overview of microMegas ==
 
== Overview of microMegas ==
  
MicroMegas (also known as 'mM') is an open source program for DD (Dislocation Dynamics) simulations originally developed at the 'Laboratoire d'Etude des Microstructures', [http://zig.onera.fr/mm_home_page/index.html CNRS-ONERA], France. mM is a free software under the terms of the GNU General Public License as published by the [http://www.gnu.org/philosophy/free-sw.html Free Software Foundation]. Discrete dislocation dynamics (DDD) is a numerical tool used to model the plastic behavior of crystalline materials using the elastic theory of dislocations [http://en.wikipedia.org/wiki/Dislocation]. DDD is the computational counterpart to in site TEM tests. MicroMegas is a legacy simulation code used to study the plasticity of mono-crystalline metals, based on the elasticity theory that models the dislocation interactions into an elastic continuum. In crystalline materials, plastic deformation may be explained by (i) twinning, (ii) martensic transformation or/and (iii) dislocation interactions (see Figure 1).  
+
MicroMegas (also known as 'mM') is an open source program for DD (Dislocation Dynamics) simulations originally developed at the 'Laboratoire d'Etude des Microstructures', [http://zig.onera.fr/mm_home_page/index.html CNRS-ONERA], France. mM is a free software under the terms of the GNU General Public License as published by the [http://www.gnu.org/philosophy/free-sw.html Free Software Foundation]. Discrete dislocation dynamics (DDD) is a numerical tool used to model the plastic behavior of crystalline materials using [http://en.wikipedia.org/wiki/Dislocation the elastic theory of dislocations]. DDD is the computational counterpart to in site TEM tests. MicroMegas is a legacy simulation code used to study the plasticity of mono-crystalline metals, based on the elasticity theory that models the dislocation interactions into an elastic continuum. In crystalline materials, plastic deformation may be explained by (i) twinning, (ii) martensic transformation or/and (iii) dislocation interactions.  
  
 
MicroMegas is used at CAVS for modeling dislocation interactions and reactions in an elastic continuum. The code is used in a hierarchical multiscale framework of the plasticity to obtain information related to the hardening of the material (see for example, the multiscale framework presented in [[Media:Multiscale_Al.pdf | this]] review paper‎). Details of the discrete dislocations model can be found in [[Media:Multiscale_Modeling.pdf‎ | the methodology]]‎ paper and in the references at the bottom of the page.  
 
MicroMegas is used at CAVS for modeling dislocation interactions and reactions in an elastic continuum. The code is used in a hierarchical multiscale framework of the plasticity to obtain information related to the hardening of the material (see for example, the multiscale framework presented in [[Media:Multiscale_Al.pdf | this]] review paper‎). Details of the discrete dislocations model can be found in [[Media:Multiscale_Modeling.pdf‎ | the methodology]]‎ paper and in the references at the bottom of the page.  
Line 47: Line 46:
 
== Available versions of microMegas ==
 
== Available versions of microMegas ==
  
* microMegas [http://zig.onera.fr/mm_home_page/index.html]
+
This section includes links to versions of the discrete dislocation dynamics codes. microMegas is commonly used at CAVS to simulate the behavior of dislocations for metals at the microscale.  
** serial version [[CodeRepository:mM|'''mM''']] (compile it as 'mm')
+
** serial version (MPI) [[CodeRepository:mM|'''mM''']] (compile it as 'mmp')
+
** parallel version (openMP) [[CodeRepository:mMpar|'''mMpar''']] (compile it as 'mm_omp')
+
  
== Setup ==
+
* microMegas (download the original microMegas code from the French Aerospace Lab [http://zig.onera.fr/mm_home_page/index.html here])
 +
** '''mM v.1.0''': serial version with Intel Compiler Optimizations (download mM v. 1.0 from the Codes Repository at CAVS [[CodeRepository:mM| here]], using "Download GNU tarball"; compile it as 'mm')
 +
** '''mM v.1.0''': parallel version with Intel Compiler Optimizations and MPI (download mM v. 1.0 from the Codes Repository at CAVS [[CodeRepository:mM| here]], using "Download GNU tarball"; compile it as 'mmp')
 +
** '''mMpar v.1.0''': parallel version of mM v.1.0 using openMP threads (download mMpar v. 1.0 from the Codes Repository at CAVS [[CodeRepository:mMpar| here]], using "Download GNU tarball"; compile it as 'mm_omp')
  
microMegas  can be freely downloaded from the original development site at the [http://zig.onera.fr/mm_home_page/doc/Releases.html French Aerospace Lab]. It can also be downloaded from the CAVS Cyberinfrastructure [https://icme.hpc.msstate.edu/mediawiki/index.php/Repository_of_codes Repository of Codes] in two versions:
+
== Download and Setup ==
* '''mM ver 1.0''' – serial mM [original ver. 3.2] with various Intel Compiler Optimizations, or
+
* '''mMpar ver. 1.0''' – parallel version of mM [original ver. 3.2], where force calculations for each segment are calculated in parallel using OpenMP threads.
+
+
In this page we describe how to install, configure and run DDD simulations using mM ver. 1.0 (with Intel Compiler optimizations) and mMpar ver. 1.0 (with Intel Compiler optimizations and OpenMP threads). Installation instructions for mM ver. 1.0 and mMpar ver. 1.0 can also be found in the ‘readme’ files provided in each directory and subdirectory of the code.
+
mM can be run in ''batch mode'' to get data analyzed with conventional graphical display programs (exemples of Gnuplot scripts are provided) or it can be used in ''interactive mode'' to simply visualize dislocations activity. Herein, we describe how to run the code in batch mode. For instructions on how to run mM in interactive mode, please refer to the ‘readme’ files provided with the code.
+
  
Before compiling microMegas on any of the HPC-CAVS computing systesm, one needs to route to the proper compiler and MPI path on the system using:
+
microMegas can be freely downloaded from the original development site at the [http://zig.onera.fr/mm_home_page/doc/Releases.html French Aerospace Lab]. It can also be downloaded from the CAVS Cyberinfrastructure [[Repository_of_codes| Repository of Codes]] in two versions:
* '''swsetup intel''' - to use the latest Intel Fortran Compiler installed on the system, and
+
* [https://icme.hpc.msstate.edu/viewvc/CMD%20Codes%20Repository/mM/tags/1.0/ '''mM ver 1.0'''] – serial mM [original ver. 3.2] with various Intel Compiler Optimizations, or
* '''swsetup openmpi-intel-64''' - to use the latest version of the OpenMPI libaries, compiled with the Intel compiler for 64-bit systems.
+
* [https://icme.hpc.msstate.edu/viewvc/CMD%20Codes%20Repository/mMpar/trunk/ '''mMpar ver. 1.0'''] – parallel version of mM [original ver. 3.2], where force calculations for each segment are calculated in parallel using OpenMP threads.
  
== Input files ==
+
=== Download  ===
  
The input files are located in the '''mM/in''' directory. The following files are needed to run the mM simulation.  
+
microMegas is not available in a system-wide implementation on the HPC2 systems. To use microMegas, please choose one of the available versions above to download on your local computer or workstation. After downloading, untar the tarball by typing:
  
* '''ContCu'''
+
<pre>
 +
tar xzf [name_of_the_tarball].tar.gz
  
The input file with parameters used for the simulation. For instance, one can select the type of simulation (initial or restart from previous simulation) via the parameter SIDEJA. One can also select whether cross-slip displacement of dislocations is desired by setting the GLDEV parameter accordingly (‘T’ for enabled and ‘F’ for disabled). Also, one can set the total number of simulation steps via the NSTEP parameter. Each simulation time step corresponds to 10-9 real time seconds. Therefore, for a very small simulation use NSTEP=500 while for a long running simulation set NSTEP to anything from 106 and above. Finally, one can also select how often should the simulation save the current state of the code, via the KISAUVE, KISTAT, KKIM and KPREDRAW parameters. For more details, check the file that comes with code. An example of the content of this file is given below.
+
or
  
 
+
tar xzf [name_of_the_tarball].tar
{|border  ="0"
+
|<pre>
+
0            SIDEJA            Simulation state key: 0=New or restart with control modification;  1=simple restart
+
0            mode_deformation  0=strain rate.; 1=make carto; 2=run carto; 3=stress rate.; 4=creep; 5=fatigue; 6=metalofute; 7=metalofute2
+
 
+
14.8          echelle          simulation reference scale, i.e. size of the elementary BD vectors. (unit = Burgers vectors)
+
 
+
F            Shear            Applied stress is the resolved shear stress on the slip system with the highest Schmid factor (false = uniaxial stress)
+
4.0          Sigma0            Initial stress (MPa)
+
1.00D-9        DELTAT0          Elementary time step (s)
+
1000000      SigmaPoint        Elementary stress increments (units ?)      (mode_deformation=3,6,7)
+
20            EpsilonPoint      Imposed strain rate (s-1)                  (mode_deformation=0,5,6,7)
+
1.5          RAID              Apparente Young modulus                    (mode_deformation=0,5,6,7)
+
3.0D-5        EPSMAX            Maximum plastic strain per cycles          (mode_deformation=5)
+
1.D0          FSIG              Sign of the loading for the first cycle    (mode_deformation=5)
+
 
+
2            LINTEN            Line tension key: 0 -> Friedel approx; 1 -> Isotropic; 2 -> Isotropic Foreman; 3 -> Anisotrpic solution
+
F            GLDEV            Cross slip key:GLDEV=True means cross-slip active
+
 
+
0 0 1        Tensile_axis      Tensile or compression uniaxial test direction (miller indices)
+
300.          TEMPERATURE      Tenperature (Kelvin)
+
100          Facteur_Depmax    Maximum displacement tolerate for a dislocation segment (unit=BD vectors)
+
 
+
50            NstatControl      Number of steps accounted for in the simulation control feedback procedure ((mode_deformation=0,5,6,7)
+
 
+
0            relax_TL          Number of steps for the intial relaxation with only a line tension
+
0            relax_INT        Number of steps for the intial relaxation with no applied loading and no contact reactions
+
0            relax_reac        Number of steps for the intial relaxation with no applied loading
+
500            NSTEP            Number of steps for the simulation
+
 
+
0.25          Ldis_act          Reference mean length to force segments discretization (micron)
+
0.50          Ldis_nact        Reference mean length to force segments discretization on inactive slip systems (micron)
+
 
+
20            Period            Step periodicity at which the force on waiting (quasi-imobile) segments is recalculate
+
10            KRC              Step periodicity at which the long-range contribution to the internal stress is recalculated (if Greengard method)
+
3.0          L_Boite         Linear mean size of the domaines used in the Greengard method (micron), negative value means dynamically defined
+
5.0          AB_LENGTH_SEUIL  Maximum length of segments neglected in the long range contribution (if Greengard method)
+
5            DCFJ              Distance at which stress is calculated on the segments connected to a junction (unit: vector BD)
+
 
+
0            GB                Barriers key: 0-> inactives, 1-> planes, 2->spherical, 3->regular 3D network (polycristal)
+
 
+
100          TauINT_LIMITE    Critical stress at which the segments are considered as singular (MPa)
+
 
+
400            KISAUVE          Writing periodicity of the simulation segment configuration and information needed to restart a computation
+
400            KSTATS            Writing periodicity if simulation results
+
400            KKIM              Writing periodicity of the trajectory film information
+
100            KPREDRAW          Periodicity of the graphical interaface refresh
+
 
+
0            shift_rotation    Key for the translation and rotation of the simulation box boundary conditions (see the file shift_rotation)
+
 
+
-6542        iterinfo          step of debbug  (negative means no debbug)
+
-2            sysinfo          slip system of interest in the debbug procedure (needed in simulations with many segments)
+
 
</pre>
 
</pre>
|}
 
  
* '''Cu'''
+
Go to the directory resulting from the above operations. Please follow the instructions in the '''readme''' files provided in the directory to setup microMegas on your system.
  
This is the file containing the material variables. See the existing file for more details. An example of this file is given below.
+
=== Setup ===
  
{|border  ="0"
+
In this page we describe how to install, configure and run DDD simulations using mM ver. 1.0 (with Intel Compiler optimizations) and mMpar ver. 1.0 (with Intel Compiler optimizations and OpenMP threads). Installation instructions for mM ver. 1.0 and mMpar ver. 1.0 can also be found in the ‘readme’ files provided in each directory and subdirectory of the code.
|<pre>
+
mM can be run in ''batch mode'' to get data analyzed with conventional graphical display programs (exemples of Gnuplot scripts are provided) or it can be used in ''interactive mode'' to simply visualize dislocations activity. Herein, we describe how to run the code in batch mode. For instructions on how to run mM in interactive mode, please refer to the ‘readme’ files provided with the code.
26.6            ModuleG0                : G(0)=Shear modulus (GPa) at T = 0 K
+
0.0             dmusurdT                : rate of the Shear modulus temperature dependency
+
0.347D0        DPOISS                  : Poisson modulus
+
  
30.D6          TAUIII                  : stress defining the begining of stage III (GD) in Pa
+
Before compiling microMegas on any of the HPC-CAVS computing systesm, one needs to route to the proper compiler and MPI path on the system using:
0.9            BETA                    : 1st cross-slip parameter - pre-exp term (GD)
+
* '''swsetup intel''' - to use the latest Intel Fortran Compiler installed on the system, and
0.6            ALPHA                  : 2d cross-slip parameter - Ratio TauG TauD (GD)
+
* '''swsetup openmpi-intel-64''' - to use the latest version of the OpenMPI libaries, compiled with the Intel compiler for 64-bit systems.
  
CFC            crystal_structure      : Cristallographic symetry of the material (VARMVT)[2]
+
The general workflow for running discrete dislocation dynamics simulations using microMegas is illustrated in the figure below:
1              Nb_slip_types          : Number of slip system family (VARMVT)
+
  
2.86378        VecBurgers              : Norme of the Burgers vector (en Angstrom)
+
[[Image:Mm_workflow.png|center|750px|Workflow for running discrete dislocation dynamics simulations (using microMegas) at CAVS]]
-1 -1 -1        Slip % planes          : ireference glide plane
+
-1 0 1          Slip % directions      : reference gliding direction
+
12              Slip % Nsystemes        : number of slip systems (all of the same crystallographic type)
+
2 2 2 2        Numero_loi_brute        : velocitu law applied to the vis,mixte1,edge,mixte2 dislocation caractere
+
  
 +
== Input files ==
  
2              NLV                    : Number of velocity law to consider
+
The input files are located in the '''mM/in''' directory. The following files are needed to run the mM simulation.
  
1              Nloi                    : velocity law index
+
* [[microMegas Input files:input.dd | '''input.dd''']]
0              Slip % Arrhenius        : clef : /=0 thermally activated, 0 = athermal
+
1.D-4          Slip % Coef_visqueux    : viscous friction coeficient
+
0.             Slip % Max_friction    : dry friction coeficient (Peierls) in MPa
+
  
2              Nloi                    : velocity law index
+
In this file, the three files needed to run a microMegas simulation are defined. These input files must be declared in this directory "in". They are used at the beginning of the simulation and correspond to a simple classification.
0              Slip % Arrhenius        : clef : /=0 thermally activated, 0 = athermal
+
5.5D-5          Slip % Coef_visqueux    : viscous friction coeficient
+
0.5            Slip % Max_friction    : dry friction coeficient (Peierls) in MPa
+
  
##################################
+
* [[microMegas Input files:inputconfinit | '''inputconfinit''']]
Velocity law exemples
+
  
-Please notice that one simulation can use several friction law, for different slip systems or even different line characters
+
In this file one enters the necessary parameters for generating the initial configuration.  
-the law with index 1, is the one used during the initial configuration relaxation step (if defined).
+
  
Viscous law:
+
* [[microMegas Input files:INPUTCONFIG.CFC | '''INPUTCONFIG.CFC''']]
  
1              Nloi                    : velocity law index
+
Initial configuration file.  
0              Slip % Arrhenius        : clef : /=0 thermally activated, 0 = athermal
+
1.D-4          Slip % Coef_visqueux    : viscous friction coeficient
+
0.              Slip % Max_friction    : dry friction coeficient (Peierls)
+
  
Thermally activated law:
+
* [[microMegas Input files:ContCu | '''ContCu''']]
  
2              Nloi                    : Velocity law index
+
This is the input file with control parameters used for the simulation. For instance, one can select the type of simulation (initial or restart from previous simulation) via the parameter SIDEJA. One can also select whether cross-slip displacement of dislocations is desired by setting the GLDEV parameter accordingly (‘T’ for enabled and ‘F’ for disabled). Also, one can set the total number of simulation steps via the NSTEP parameter. Each simulation time step corresponds to 10-9 real time seconds. Therefore, for a very small simulation use NSTEP=500 while for a long running simulation set NSTEP to anything from 106 and above. Finally, one can also select how often should the simulation save the current state of the code, via the KISAUVE, KISTAT, KKIM and KPREDRAW parameters. For more details, check the file that comes with code.  
0              Slip % Arrhenius        : clef : /=0 thermally activated, 0 = athermal
+
262.0D6        Slip % taueff0          : effectif tau at zero K  (Pa)
+
1600.           Slip % V0              : constante de la loi de vitesse en m/s
+
5.D-6          Slip % L0              : longueur de refernce des vis pour la loi de vitesse en m.
+
1.06            Slip % deltaG0          : Energie d'activation totale en eV (pour T = 0 K pour les vis)
+
0.757          Slip % coef_p          : exposant p de la loie de vitesse (pour les vis)
+
1.075          Slip % coef_q          : exposant q de la loie de vitesse (pour les vis)
+
</pre>
+
|}
+
  
* '''SegCu'''
+
* [[microMegas Input files:Cu | '''Cu''']]
  
This is the file containing the initial dislocation configuration (e.g., the active slip systems, the number of segments, the dimensions of the simulation reference volume box, etc). See the bottom of the existing file for more details.
+
This is the file containing the material variables. See the existing file for more details.
  
{|border  ="0"
+
* [[microMegas Input files:SegCu | '''SegCu''']]
|<pre>
+
1 1 1 1 1 1 1 1 1 1 1 1
+
1
+
3632 4016 4816
+
    1      1816      1344      1744  664    17      0      0      0      0  F      0  F
+
    1      2476      2008      1744  664      1      0      0      0      0  F      0  F
+
   
+
initial screw dislocation in the middle of the box
+
    1      2476      2008      1744  664      1      0      0      0      0  F      0  F
+
initial edge dislcoation in the middle of the box
+
    1      1152      3336      1748  664      1      0      0      0      0  F      0  F
+
  
 +
This is the file containing the initial dislocation segments configuration (e.g., the active slip systems, the number of segments, the dimensions of the simulation reference volume box, etc). See the bottom of the existing file for more details.
  
    1      2176      1984      3744  664      7    -3    -3    -1    -1  F      0  F
+
* [[microMegas Input files:Segments | '''Segments''']]
    2      848      624      2416  664    11    -1    -1    -1    -1  F      0  F
+
    3      2176      3280      3744  664      3    -1    -1    -1    -1  F      0  F
+
    4      3504      624      256  664    15    -1    -1    -3    -3  F      0  F
+
    5      1952        32      4416  664    11    -3    -3    -1    -1  F      0  F
+
    6      3280      2688      928  664      7    -1    -1    -1    -1  F      0  F
+
    7      1952      1328      4416  664    15    -1    -1    -1    -1  F      0  F
+
    8      624      2688      3088  664      3    -1    -1    -3    -3  F      0  F
+
    9      3488      288      2640  664    19    -3    -3    -1    -1  F      0  F
+
    10      2512      1616      1312  664    27    -1    -1    -1    -1  F      0  F
+
    11      3488      2944      4800  664    23    -1    -1    -1    -1  F      0  F
+
    12      832      1616      1312  664    31    -1    -1    -3    -3  F      0  F
+
    13      2576      1200      1840  664    31    -3    -3    -1    -1  F      0  F
+
    14      1600      3888      3168  664    19    -1    -1    -1    -1  F      0  F
+
    15      624      1200      1840  664    27    -1    -1    -1    -1  F      0  F
+
    16      1600      2528      512  664    23    -1    -1    -3    -3  F      0  F
+
    17      2368      3936      896  664    35    -3    -3    -1    -1  F      0  F
+
    18      1040      2608      3056  664    43    -1    -1    -1    -1  F      0  F
+
    19      3344      1280      896  664    39    -1    -1    -1    -1  F      0  F
+
    20      1040      2608      3552  664    47    -1    -1    -3    -3  F      0  F
+
    21      720      1472      4592  664    47    -3    -3    -1    -1  F      0  F
+
    22      2048      2800      1936  664    35    -1    -1    -1    -1  F      0  F
+
    23      720      1472      4096  664    43    -1    -1    -1    -1  F      0  F
+
    24      3024      144      1936  664    39    -1    -1    -3    -3  F      0  F
+
    25      432      2512      4112  664    55    -3    -3    -1    -1  F      0  F
+
    26      2736      3840      1456  664    63    -1    -1    -1    -1  F      0  F
+
    27      1408      1152      4112  664    51    -1    -1    -1    -1  F      0  F
+
    28      2736      3840      1952  664    59    -1    -1    -3    -3  F      0  F
+
    29      528      1504      1216  664    59    -3    -3    -1    -1  F      0  F
+
    30      1856      176      3376  664    51    -1    -1    -1    -1  F      0  F
+
    31      3184      2864      1216  664    63    -1    -1    -1    -1  F      0  F
+
    32      1856      176      3872  664    55    -1    -1    -3    -3  F      0  F
+
    33      2880      448      1248  664    67    -3    -3    -1    -1  F      0  F
+
    34      224      1776      2576  664    75    -1    -1    -1    -1  F      0  F
+
    35      2880      3104      3904  664    71    -1    -1    -1    -1  F      0  F
+
    36      1904      1776      2576  664    79    -1    -1    -3    -3  F      0  F
+
    37      992      3024      3072  664    79    -3    -3    -1    -1  F      0  F
+
    38      1968      1696      1744  664    67    -1    -1    -1    -1  F      0  F
+
    39      2944      3024      3072  664    75    -1    -1    -1    -1  F      0  F
+
    40      1968      336      4400  664    71    -1    -1    -3    -3  F      0  F
+
    41      2960      1104      3056  664    87    -3    -3    -1    -1  F      0  F
+
    42      656      2464      1728  664    95    -1    -1    -1    -1  F      0  F
+
    43      1984      1104      400  664    83    -1    -1    -1    -1  F      0  F
+
    44      656      3760      1728  664    91    -1    -1    -3    -3  F      0  F
+
    45      3360      1184      2416  664    91    -3    -3    -1    -1  F      0  F
+
    46      2032      2544      3744  664    83    -1    -1    -1    -1  F      0  F
+
    47      704      1184      256  664    95    -1    -1    -1    -1  F      0  F
+
    48      2032      3840      3744  664    87    -1    -1    -3    -3  F      0  F
+
 
+
------------------------------------------------------------------
+
------------------------------------------------------------------
+
The segment file structure :
+
 
+
Line 1: An integer for each slip system is defined to change the Schmid factors of slip systems
+
(1 means that any change is made, 0 means that the Schmid's factor is artificialy set to zero)
+
 
+
line 2: The number of segments
+
 
+
line 3: dimensions of the simulation reference volume
+
 
+
Form line 3 to doted lines: the segments description
+
column 1 - The segment index
+
column 2 - x coordinate of the segment origin
+
column 3 - y coordinate of the segment origin
+
column 4 - y coordinate of the segment origin
+
column 5 - length of the segment in BVD vector
+
column 6 - index of BVD vector for the segment
+
column 7 - first neighbor segment at the origin side (zero for pining point)
+
column 8 - first non zero length neighbor segment at the origine side (idem)
+
column 9 - first neighbor segment at the extremity side (idem)
+
column 10- first non zero length neighbor segment at the extremity side (idem)
+
column 11- Flag for junction segment
+
column 12- index of the junction binome segment
+
column 13- Flag for screw segment in cross-sliped state (blocked at the intersection of two glide planes)
+
 
+
</pre>
+
|}
+
 
+
 
+
* '''Segments'''
+
 
This is the file describing the initial number, type and characteristics of the dislocation segments. See the existing file for more details.
 
This is the file describing the initial number, type and characteristics of the dislocation segments. See the existing file for more details.
  
{|border  ="0"
+
* [[microMegas Input files:b_plan | '''b_plan''']], [[microMegas Input files:b_poly1 | '''b_poly1''']], [[microMegas Input files:b_spher | '''b_spher''']]
|<pre>
+
1 1 1 1 1 1 1 1 1 1 1 1
+
                    96
+
                  6032                  6672                  7984
+
    1      3616      3296      6208 1360      7    -3    -3    -1    -1  F      0  F
+
    2      896      2064      3488 1360    11    -1    -1    -1    -1  F      0  F
+
    3      3616      832      6208 1360      3    -1    -1    -1    -1  F      0  F
+
    4      304      2064      944 1360    15    -1    -1    -3    -3  F      0  F
+
    5      3248        64      7344 1360    11    -3    -3    -1    -1  F      0  F
+
    6      5968      5504      2080 1360      7    -1    -1    -1    -1  F      0  F
+
    7      3248      4272      7344 1360    15    -1    -1    -1    -1  F      0  F
+
    8      528      5504      4624 1360      3    -1    -1    -3    -3  F      0  F
+
    9      5792      480      4384 1360    19    -3    -3    -1    -1  F      0  F
+
    10      5200      3200      1664 1360    27    -1    -1    -1    -1  F      0  F
+
    11      5792      5920      6928 1360    23    -1    -1    -1    -1  F      0  F
+
    12      352      3200      1664 1360    31    -1    -1    -3    -3  F      0  F
+
    13      4288      2000      3056 1360    31    -3    -3    -1    -1  F      0  F
+
    14      3696      5952      5776 1360    19    -1    -1    -1    -1  F      0  F
+
    15      3104      2000      3056 1360    27    -1    -1    -1    -1  F      0  F
+
    16      3696      4720      336 1360    23    -1    -1    -3    -3  F      0  F
+
    17      3952      6544      1488 1360    35    -3    -3    -1    -1  F      0  F
+
    18      1232      3824      4032 1360    43    -1    -1    -1    -1  F      0  F
+
    19      4544      1104      1488 1360    39    -1    -1    -1    -1  F      0  F
+
    20      1232      3824      6928 1360    47    -1    -1    -3    -3  F      0  F
+
    21      1216      2464      7632 1360    47    -3    -3    -1    -1  F      0  F
+
    22      3936      5184      2192 1360    35    -1    -1    -1    -1  F      0  F
+
    23      1216      2464      4736 1360    43    -1    -1    -1    -1  F      0  F
+
    24      4528      6416      2192 1360    39    -1    -1    -3    -3  F      0  F
+
    25      720      4176      6816 1360    55    -3    -3    -1    -1  F      0  F
+
    26      4032      224      1376 1360    63    -1    -1    -1    -1  F      0  F
+
    27      1312      2944      6816 1360    51    -1    -1    -1    -1  F      0  F
+
    28      4032      224      4272 1360    59    -1    -1    -3    -3  F      0  F
+
    29      880      2496      2016 1360    59    -3    -3    -1    -1  F      0  F
+
    30      3600      6448      4560 1360    51    -1    -1    -1    -1  F      0  F
+
    31      288      3728      2016 1360    63    -1    -1    -1    -1  F      0  F
+
    32      3600      6448      7456 1360    55    -1    -1    -3    -3  F      0  F
+
    33      4784      736      2080 1360    67    -3    -3    -1    -1  F      0  F
+
    34      5376      3456      4800 1360    75    -1    -1    -1    -1  F      0  F
+
    35      4784      6176      7520 1360    71    -1    -1    -1    -1  F      0  F
+
    36      4192      3456      4800 1360    79    -1    -1    -3    -3  F      0  F
+
    37      1664      5040      5104 1360    79    -3    -3    -1    -1  F      0  F
+
    38      2256      2320      2384 1360    67    -1    -1    -1    -1  F      0  F
+
    39      2848      5040      5104 1360    75    -1    -1    -1    -1  F      0  F
+
    40      2256      1088      7824 1360    71    -1    -1    -3    -3  F      0  F
+
    41      4928      1824      5056 1360    87    -3    -3    -1    -1  F      0  F
+
    42      1616      3056      2336 1360    95    -1    -1    -1    -1  F      0  F
+
    43      4336      1824      7600 1360    83    -1    -1    -1    -1  F      0  F
+
    44      1616      592      2336 1360    91    -1    -1    -3    -3  F      0  F
+
    45      5568      1968      4016 1360    91    -3    -3    -1    -1  F      0  F
+
    46      2848      3200      6736 1360    83    -1    -1    -1    -1  F      0  F
+
    47      128      1968      1472 1360    95    -1    -1    -1    -1  F      0  F
+
    48      2848      736      6736 1360    87    -1    -1    -3    -3  F      0  F
+
    49      5264      720      2416 1360      3    -3    -3    -1    -1  F      0  F
+
    50      1952      1952      5136 1360    11    -1    -1    -1    -1  F      0  F
+
    51      4672      720      7856 1360      7    -1    -1    -1    -1  F      0  F
+
    52      1952      6160      5136 1360    15    -1    -1    -3    -3  F      0  F
+
    53      4016      5616      7408 1360    15    -3    -3    -1    -1  F      0  F
+
    54      1296      176      4688 1360      7    -1    -1    -1    -1  F      0  F
+
    55      4608      5616      1968 1360    11    -1    -1    -1    -1  F      0  F
+
    56      1296      4384      4688 1360      3    -1    -1    -3    -3  F      0  F
+
    57      5008      2032      224 1360    23    -3    -3    -1    -1  F      0  F
+
    58      5600      5984      2944 1360    27    -1    -1    -1    -1  F      0  F
+
    59      160      2032      224 1360    19    -1    -1    -1    -1  F      0  F
+
    60      5600      4752      5488 1360    31    -1    -1    -3    -3  F      0  F
+
    61      1472      3920      4224 1360    27    -3    -3    -1    -1  F      0  F
+
    62      2064      6640      1504 1360    23    -1    -1    -1    -1  F      0  F
+
    63      2656      3920      4224 1360    31    -1    -1    -1    -1  F      0  F
+
    64      2064      1200      6944 1360    19    -1    -1    -3    -3  F      0  F
+
    65      5024      672      3840 1360    39    -3    -3    -1    -1  F      0  F
+
    66      1712      3392      1296 1360    43    -1    -1    -1    -1  F      0  F
+
    67      5024      672      6736 1360    35    -1    -1    -1    -1  F      0  F
+
    68      2304      4624      1296 1360    47    -1    -1    -3    -3  F      0  F
+
    69      2032      1440      2928 1360    47    -3    -3    -1    -1  F      0  F
+
    70      4752      4160      5472 1360    39    -1    -1    -1    -1  F      0  F
+
    71      1440      208      2928 1360    43    -1    -1    -1    -1  F      0  F
+
    72      4752      4160      384 1360    35    -1    -1    -3    -3  F      0  F
+
    73      3040      2640      6800 1360    55    -3    -3    -1    -1  F      0  F
+
    74      320      5360      1360 1360    63    -1    -1    -1    -1  F      0  F
+
    75      3632      1408      6800 1360    51    -1    -1    -1    -1  F      0  F
+
    76      320      5360      4256 1360    59    -1    -1    -3    -3  F      0  F
+
    77      592      2864      3744 1360    63    -3    -3    -1    -1  F      0  F
+
    78      3904      5584      1200 1360    51    -1    -1    -1    -1  F      0  F
+
    79      592      2864      6640 1360    59    -1    -1    -1    -1  F      0  F
+
    80      3312      144      1200 1360    55    -1    -1    -3    -3  F      0  F
+
    81      5024      4528      6192 1360    67    -3    -3    -1    -1  F      0  F
+
    82      5616      576      928 1360    75    -1    -1    -1    -1  F      0  F
+
    83      5024      3296      3648 1360    71    -1    -1    -1    -1  F      0  F
+
    84      4432      576      928 1360    79    -1    -1    -3    -3  F      0  F
+
    85      4608      4688      6832 1360    79    -3    -3    -1    -1  F      0  F
+
    86      5200      1968      4112 1360    71    -1    -1    -1    -1  F      0  F
+
    87      4608      5920      1392 1360    75    -1    -1    -1    -1  F      0  F
+
    88      4016      1968      4112 1360    67    -1    -1    -3    -3  F      0  F
+
    89      704      3600      6560 1360    83    -3    -3    -1    -1  F      0  F
+
    90      4016      2368      1296 1360    95    -1    -1    -1    -1  F      0  F
+
    91      704      1136      6560 1360    87    -1    -1    -1    -1  F      0  F
+
    92      3424      2368      3840 1360    91    -1    -1    -3    -3  F      0  F
+
    93      3280        16      5840 1360    91    -3    -3    -1    -1  F      0  F
+
    94      560      1248      576 1360    87    -1    -1    -1    -1  F      0  F
+
    95      3280      2480      5840 1360    95    -1    -1    -1    -1  F      0  F
+
    96      6000      1248      3120 1360    83    -1    -1    -3    -3  F      0  F
+
------------------------------------------------------------------
+
------------------------------------------------------------------
+
Latice simulation parameter =  1.498498709443860E-003
+
Size of the simulation box (microns) =    10.0000000000000   
+
Parallelepipede (Non : 0, Oui : PARA) :  0.905000000000000   
+
  1.00000000000000        1.19800000000000   
+
Number of domains used to homogenize the density (NbUd) =
+
                    3
+
Density (*10^12) =    1.00000000000000   
+
Length of sources (microns), dispertion), number of sources (total and per slip
+
  systems) =    10.0000000000000      0.000000000000000E+000
+
                  108                    2
+
Tolerance :   0.800000000000000   
+
Angular dispersion of character  0.349065850398866   
+
Max :  0.543336856878968   
+
Ratio of occupation in domains =    1.00000000000000   
+
Effective density =  0.180451757999050      10^-12
+
</pre>
+
|}
+
 
+
 
+
* '''b_plan''', '''b_poly1''', '''b_spher'''
+
 
These are the input files needed to run polyphase simulations. See the existing files for more details.
 
These are the input files needed to run polyphase simulations. See the existing files for more details.
 
'''b_plan'''
 
{|border  ="0"
 
|<pre>
 
Input file for the simulations working with planes boundaries
 
 
One must define:
 
 
line 1 = the variable named longminseg gives the minimum lenght to discretize segments stopped
 
        on barriers (minimum lenght->modur/longminseg)
 
line 2 = the total number of planes defining the closed domaine of simulation (e.g. a cubic doamine =6)
 
        Notice that "0" means that any closed domaine is defined.
 
line 3 = T means that the intial dislocations must be outside the close area defined above
 
        F means that the intial dislocations must be inside the close area defined above
 
line 4 = The total number of planes to be considered. Additional planes with respect to the definition of line 1
 
        correspond to internal barriers
 
       
 
from line 5 = each normal planes vector (e.g. 0 0 1) and the shifting amplitude D such that Ax + By + Cz = D
 
 
exemple (1) a periodic bicrystal
 
100
 
0
 
F
 
1
 
1 0 0  500
 
 
exemple (2) a finit cubic grain
 
100
 
6
 
F
 
0
 
1 0 0      100.
 
0 1 0      100.               
 
0 0 1      100.             
 
-1 0 0    -4000.   
 
0 -1 0    -4000.           
 
0 0 -1    -4000.             
 
 
> Reading start after the following line
 
###########################################################
 
100                  !  longminseg
 
6                    !  nbplanDom
 
T                    !  InclExcl
 
6                    !  NbPlanMax
 
1 0 0      500.      !  varplan    posplan
 
-1 0 0    -3132.   
 
0 1 0      500.               
 
0 -1 0    -3516.           
 
0 0 1      500.             
 
0 0 -1    -4316.             
 
</pre>
 
|}
 
 
'''b_poly1'''
 
{|border  ="0"
 
|<pre>
 
Tesselation parameters
 
 
##############################
 
100                    the variable named longminseg gives the minimum lenght to discretize segments stopped
 
                      on barriers (minimum lenght->modur/longminseg)
 
F               Desorientation key: TRUE means activation of euler angles (file (eulerangle)
 
4992                  Box Size (X=Y=Z) en a
 
16                    Grain number (2 or 16)
 
POSdeux                COnstant array corresponding to the grain number
 
                      -POSun for system with 2 grains
 
                      -POSdeux for system with 16 grains         
 
</pre>
 
|}
 
 
'''b_spher'''
 
{|border  ="0"
 
|<pre>
 
Commentaire a faire
 
 
###############################
 
2.2  !The sphere grain radius in micron
 
</pre>
 
|}
 
  
 
== Simulation source files ==
 
== Simulation source files ==
Line 565: Line 190:
 
** uses 02bricamat and 04varglob modules
 
** uses 02bricamat and 04varglob modules
  
* '''15main.F90''' - main module containing the simulation time loops; it calls all other modules either implicitly or explicitly; for more details see Figure 2
+
* '''15main.F90''' - main module containing the simulation time loops; it calls all other modules either implicitly or explicitly;
 
** uses 02bricamat, 04varglob, 06debug, 07init, microstructure, 09elasti, 10dynam, 11topolo, 12contact, 13resul and 14bigsave modules
 
** uses 02bricamat, 04varglob, 06debug, 07init, microstructure, 09elasti, 10dynam, 11topolo, 12contact, 13resul and 14bigsave modules
  
Line 578: Line 203:
 
* '''microstructure.F90''' – module containing the subroutines used to detect the obstacles, i.e., subroutine barriere_spherique and subroutine barriere_plane; it prints the segments structure
 
* '''microstructure.F90''' – module containing the subroutines used to detect the obstacles, i.e., subroutine barriere_spherique and subroutine barriere_plane; it prints the segments structure
 
** uses 02bricamat, 03varbase, 04varglob, 06debug and 08connec modules
 
** uses 02bricamat, 03varbase, 04varglob, 06debug and 08connec modules
 
 
  
 
== Compiling microMegas ==
 
== Compiling microMegas ==
Line 619: Line 242:
 
According to the version of microMegas you want to execute, type:
 
According to the version of microMegas you want to execute, type:
  
'''make''' or '''make all''' - to compile all the binaries (this does not include the MPI binary)
+
* '''make''' or '''make all''' - to compile all the binaries (this does not include the MPI binary)
  
'''make mm''' - to compile only the batch version of the simulation
+
* '''make mm''' - to compile only the batch version of the simulation
  
'''make gmm''' - to compile only the simulation with its graphical interface (interactive mode)
+
* '''make gmm''' - to compile only the simulation with its graphical interface (interactive mode)
  
'''make mm_omp''' - to compile only the batch version for OpenMP parallel threads
+
* '''make mm_omp''' - to compile only the batch version for OpenMP parallel threads
  
'''make mmp''' - to compile only the batch version for MPI clusters
+
* '''make mmp''' - to compile only the batch version for MPI clusters
  
'''make cam''' - to compile only the graphical interace (needed to see the simulation film)
+
* '''make cam''' - to compile only the graphical interace (needed to see the simulation film)
  
'''make base''' - to compile only the code needed to generate the simulation vectors base
+
* '''make base''' - to compile only the code needed to generate the simulation vectors base
  
'''make confinit''' - to compile only the code needed to generate random intitial configurations
+
* '''make confinit''' - to compile only the code needed to generate random intitial configurations
  
'''make pavage''' - to compile only the code needed to generate the database needed for the simulation interfaces
+
* '''make pavage''' - to compile only the code needed to generate the database needed for the simulation interfaces
  
'''make clean''' - to sweep out all the useless pieces of codes
+
* '''make clean''' - to sweep out all the useless pieces of codes
  
'''make cleanall''' - to clean up everything
+
* '''make cleanall''' - to clean up everything
  
 
====Run the simulation ====
 
====Run the simulation ====
Line 655: Line 278:
 
====Additional tools ====
 
====Additional tools ====
  
'''cam'''  - The camera code to see after and during calculations the film of the simulation
+
* '''cam'''  - The camera code to see after and during calculations the film of the simulation
  
'''confinit''' - The code used to buildup initial configurations
+
* '''confinit''' - The code used to buildup initial configurations
  
'''base''' - The code you can use to generate alone the base of vectors used in the simulation
+
* '''base''' - The code you can use to generate alone the base of vectors used in the simulation
  
'''pavage''' - The code used to generate the interfaces files "b_poly" needed to simulate periodic polycrystals
+
* '''pavage''' - The code used to generate the interfaces files "b_poly" needed to simulate periodic polycrystals
  
 
====Where and who is who ====
 
====Where and who is who ====
Line 693: Line 316:
 
To run '''serial microMegas''' for production simulations from the command line add the corresponding software modules (compilers, libraries, etc.) to load in your ‘'''.bashrc'''’ file (in your home directory, i.e. /home/<your_username>/). To load the compiler of your choice, e.g., my choice is Intel Fortran, type:
 
To run '''serial microMegas''' for production simulations from the command line add the corresponding software modules (compilers, libraries, etc.) to load in your ‘'''.bashrc'''’ file (in your home directory, i.e. /home/<your_username>/). To load the compiler of your choice, e.g., my choice is Intel Fortran, type:
  
'''swsetup intel'''
+
<pre>
 +
swsetup intel
 +
</pre>
  
 
Then in the  ''''mM/bin'''’ directory, to compile only the batch version of the simulation type:  
 
Then in the  ''''mM/bin'''’ directory, to compile only the batch version of the simulation type:  
  
'''make –f serial-Makefile clean'''
+
<pre>
 +
make –f serial-Makefile clean
  
'''make –f serial-Makefile mm'''
+
make –f serial-Makefile mm
 +
</pre>
  
 
Launch the serial version of the simulation from the same directory by typing:
 
Launch the serial version of the simulation from the same directory by typing:
  
'''mkdir ../production_runs'''
+
<pre>
 +
mkdir ../production_runs
 +
</pre>
  
'''/usr/bin/time -p -o ../production_run/mm.time ./mm | tee ../production_runs/mm.log'''
+
to run the simulation in batch mode, or to record the running time and save the output in a separate directory and files, type:
 +
 
 +
<pre>
 +
/usr/bin/time -p -o ../production_run/mm.time ./mm | tee ../production_runs/mm.log
 +
</pre>
  
 
==== Parallel microMegas (mm_omp - OpenMP version) ====
 
==== Parallel microMegas (mm_omp - OpenMP version) ====
Line 711: Line 344:
 
To run '''parallel microMegas''' for production simulations add the corresponding software modules (compilers, libraries, visualisers, etc.) to load in your ‘'''.bashrc'''’ file. To load the compiler of your choice, e.g., my choice is Intel Fortran, type:
 
To run '''parallel microMegas''' for production simulations add the corresponding software modules (compilers, libraries, visualisers, etc.) to load in your ‘'''.bashrc'''’ file. To load the compiler of your choice, e.g., my choice is Intel Fortran, type:
  
'''swsetup intel'''
+
<pre>
 +
swsetup intel
 +
</pre>
  
 
Then in the  ‘'''mMpar/bin'''’, tp compile only the batch version of the simulation type:
 
Then in the  ‘'''mMpar/bin'''’, tp compile only the batch version of the simulation type:
  
'''make –f openMP-Makefile clean'''
+
<pre>
 +
make –f openMP-Makefile clean
  
'''make –f openMP-Makefile mm_omp'''
+
make –f openMP-Makefile mm_omp
 +
</pre>
  
 
Before running mm_omp, one needs to configure the target system for executing OpenMP programs. This is done by ensuring that the environment variables used by the chosen compiler and its OpenMP extension are properly set. For a quad-core Linux system running SuSE SLES 10, and the Intel Compiler version 11.1, the following values are recommended.  
 
Before running mm_omp, one needs to configure the target system for executing OpenMP programs. This is done by ensuring that the environment variables used by the chosen compiler and its OpenMP extension are properly set. For a quad-core Linux system running SuSE SLES 10, and the Intel Compiler version 11.1, the following values are recommended.  
  
* '''export OMP_THREAD_NUM=4'''                                         
+
<pre>
** This value can be adjusted to match the existing number of cores in the compute node of your choice. E.g., in talon nodes, this can be set to 12.
+
export OMP_THREAD_NUM=4             // This value can be adjusted to match the existing number of cores in the compute node of your choice.  
* '''export KMP_AFFINITY=verbose,respect,granularity=core,scatter'''
+
                                                                  // E.g., in talon nodes, this can be set to 12.
* '''export KMP_LIBRARY=turnaround'''
+
export KMP_AFFINITY=verbose,respect,granularity=core,scatter
* '''export KMP_SETTINGS=1'''
+
export KMP_LIBRARY=turnaround
* '''export KMP_STACKSIZE=512m'''
+
export KMP_SETTINGS=1
* '''export KMP_VERSION=.TRUE.'''
+
export KMP_STACKSIZE=512m
 +
export KMP_VERSION=.TRUE.
 +
</pre>
  
 
For more details on the values and meaning of these environment variables, please consult the Intel Compiler manual and its OpenMP specification. Note that these environment variables are specific to the Intel Compiler and its OpenMP specification, and that they may differ based on the compiler of your choice and the specifics of its own OpenMP extension.  
 
For more details on the values and meaning of these environment variables, please consult the Intel Compiler manual and its OpenMP specification. Note that these environment variables are specific to the Intel Compiler and its OpenMP specification, and that they may differ based on the compiler of your choice and the specifics of its own OpenMP extension.  
Line 733: Line 372:
 
Launch the parallel OpenMP version of the simulation from the same directory by typing:
 
Launch the parallel OpenMP version of the simulation from the same directory by typing:
  
'''mkdir ../production_runs'''
+
<pre>
 +
mkdir ../production_runs
 +
</pre>
  
 
to run the simulation in batch mode, or to record the running time and save the output in a separate directory and files, type:
 
to run the simulation in batch mode, or to record the running time and save the output in a separate directory and files, type:
  
'''/usr/bin/time -p -o ../production_run/mm_omp.time ./mm_omp | tee ../production_runs/mm_omp.log'''
+
<pre>
 +
/usr/bin/time -p -o ../production_run/mm_omp.time ./mm_omp | tee ../production_runs/mm_omp.log
 +
</pre>
  
 
==== Parallel microMegas (mmp - MPI version) ====
 
==== Parallel microMegas (mmp - MPI version) ====
Line 743: Line 386:
 
For the parallel microMegas simulations, also load the MPI libraries, e.g. OpenMPI ver. 1.4.2, by typing:
 
For the parallel microMegas simulations, also load the MPI libraries, e.g. OpenMPI ver. 1.4.2, by typing:
  
'''swsetup openmpi-intel-64'''
+
<pre>
 +
swsetup openmpi-intel-64
 +
</pre>
  
 
Note: To avoid any compilation or execution errors, please make sure that during the selection of any additional libraries, such as MPI, you choose the library version that was compiled using the same compiler of your choice. For instance, if you compile the code using Intel compilers, please select the MPI library that was compiled using Intel compilers. Not doing so, may cause unpredictable errors during the simulation.
 
Note: To avoid any compilation or execution errors, please make sure that during the selection of any additional libraries, such as MPI, you choose the library version that was compiled using the same compiler of your choice. For instance, if you compile the code using Intel compilers, please select the MPI library that was compiled using Intel compilers. Not doing so, may cause unpredictable errors during the simulation.
Line 749: Line 394:
 
Then in the ‘'''mM/bin'''’ directory, to compile only the batch version of the simulation, type:  
 
Then in the ‘'''mM/bin'''’ directory, to compile only the batch version of the simulation, type:  
  
'''make –f openMPI-Makefile clean'''
+
<pre>
 +
make –f openMPI-Makefile clean
  
'''make –f openMPI-Makefile mmp'''
+
make –f openMPI-Makefile mmp
 +
</pre>
  
 
Launch the parallel MPI version of the simulation from the same directory by typing:
 
Launch the parallel MPI version of the simulation from the same directory by typing:
  
'''mkdir ../production_runs'''
+
<pre>
 +
mkdir ../production_runs
 +
</pre>
  
'''/usr/bin/time -p -o ../production_run/mmp.time mpirun –np “x”./mmp | tee ../production_runs/mmp.log'''
+
to run the simulation in batch mode, or to record the running time and save the output in a separate directory and files, type:
 +
 
 +
<pre>
 +
/usr/bin/time -p -o ../production_run/mmp.time mpirun –np “x”./mmp | tee ../production_runs/mmp.log
 +
</pre>
  
 
=== PBS batch execution ===
 
=== PBS batch execution ===
Line 765: Line 418:
 
Below are three sample PBS scripts one could use to run microMegas in any of the three versions on the talon.hpc.msstate.edu high-performance cluster at HPC2. Each of these scripts can be cut and pasted into a file, e.g., mm.pbs.talon or mm_omp.pbs.talon or mmp.pbs.talon. To submit a pbs script to the jobs queue on talon, first log on to the talon-login node, typing:
 
Below are three sample PBS scripts one could use to run microMegas in any of the three versions on the talon.hpc.msstate.edu high-performance cluster at HPC2. Each of these scripts can be cut and pasted into a file, e.g., mm.pbs.talon or mm_omp.pbs.talon or mmp.pbs.talon. To submit a pbs script to the jobs queue on talon, first log on to the talon-login node, typing:
  
'''rlogin talon-login'''
+
<pre>
 +
rlogin talon-login
 +
</pre>
  
 
from any HPC2 machine, and then type:
 
from any HPC2 machine, and then type:
  
'''qsub mm.pbs.talon''' or '''qsub mm_omp.pbs.talon''' or '''qsub mmp.pbs.talon'''.
+
<pre>
 +
qsub mm.pbs.talon           or             qsub mm_omp.pbs.talon         or             qsub mmp.pbs.talon
 +
</pre>
  
 
''Note'': microMegas is a long running code. To run long simulations please contact the HPC2 administrators to request access to the ''''special'''' queue.
 
''Note'': microMegas is a long running code. To run long simulations please contact the HPC2 administrators to request access to the ''''special'''' queue.
  
'''PBS script for serial mM execution (mm executable) on talon.hpc.msstate.edu'''
+
* [[microMegas PBS scripts:mm.pbs.talon | '''PBS script for serial mM execution (mm executable) on talon.hpc.msstate.edu''']]
<pre>
+
#!/bin/bash
+
#PBS -N mm
+
#PBS -q special@talon
+
#PBS -l nodes=1:ppn=12
+
#PBS -l walltime=700:00:00
+
#PBS -m abe
+
#PBS -j oe
+
#PBS -r n
+
#PBS -V
+
# Set the stack size to unlimited
+
  
ulimit -s unlimited
+
* [[microMegas PBS scripts:mm_omp.pbs.talon | '''PBS script for openMP-based mMpar execution (mm_omp executable) on talon.hpc.msstate.edu''']]
# Set the core size to zero
+
  
ulimit -c 0
+
* [[microMegas PBS scripts:mmp.pbs.talon | '''PBS script for MPI-based mMpar execution (mmp executable) on talon.hpc.msstate.edu''']]
# List all resource limits
+
  
ulimit -a
+
== Output files ==
echo "I ran on:"
+
# Print the nodes on which the project will run
+
  
cat $PBS_NODEFILE
+
The output files are located in the '''mM/out''' directory. The most important output are briefly described below. For more details on the content and meaning of each file, please refer to the actual content of these files.
# Change your execution directory to /data/lustre/<your_username> for fast
+
# I/O
+
cd /data/lustre/<your_username>
+
  
# Copy all necessary files from your project directory
+
* [[microMegas Output files:BVD.CFC | '''BVD.CFC''']] - the set of reference vectors used in the simulation for a given crystal
# (/cavs/cmd/data1/users/<your_username>/<your_project_directory>) to the
+
# execution directory (/data/lustre/<your_username>)
+
cp -fr /cavs/cmd/data1/users/<your_username>/<your_project_directory>/mm .
+
  
# Go to the directory with the ‘mm’ executable
+
* [[microMegas Output files:bigsave.bin | '''bigsave.bin''']] - a binary file containing everything needed to re-start a simulation if it is accidentally stopped
cd /data/lustre/<your_username>/mm/bin
+
  
# Run the serial ‘mm’ code with/without cross-slip activated (set GLDEV to be # T or F in /data/lustre/<your_username>/mm/in/ContCu)
+
* [[microMegas Output files:film.bin | '''film.bin''']] - a binary file where the coordinates of segments are periodically saved to buildup a trajectory file
  
/usr/bin/time -p -o ../serial_tests/[no-]cross-slip/mm.time ./mm | tee ../serial_tests/[no-]cross-slip/mm.log
+
* [[microMegas Output files:gamma | '''gamma''']] - a file containing the evolution of gamma for all existing slip systems
  
# Move all files from the execution directory (/data/lustre/<your_username>)
+
* [[microMegas Output files:gammap | '''gammap''']] - a file containing the evolution of the instantaneous gamma dot for all the slip systems
# back to your project directory
+
# (/cavs/cmd/data1/users/<your_username>/<your_project_directory>)
+
  
cd /data/lustre/<your_username>/
+
* [[microMegas Output files:rau | '''rau''']] - a file containing the evolution of rho, the dislocation density, for all the slip systems
cp -fr mm/ /cavs/cmd/data1/users/<your_username>/<your_project_directory>/mm_test/1
+
#
+
  
echo "All Done!"
+
* [[microMegas Output files:raujonc | '''raujonc''']] - a file containing the evolution of the junction density and number for all slip systems
</pre>
+
  
'''PBS script for openMP-based mMpar execution (mm_omp executable) on talon.hpc.msstate.edu'''
+
* [[microMegas Output files:resul | '''resul''']] - a GNU plotting script for plotting various simulation data (run 'gnuplot resul' to see the results)
<pre>
+
#!/bin/bash
+
#PBS -N mm_omp
+
#PBS -q special@talon
+
#PBS -l nodes=1:ppn=12
+
#PBS -l walltime=700:00:00
+
#PBS -m abe
+
#PBS -j oe
+
#PBS -r n
+
#PBS -V
+
# Set the stack size to unlimited
+
  
ulimit -s unlimited
+
* [[microMegas Output files:sigeps | '''sigeps''']] - an output file containing the stress, strain and other information (an accompanying file to "stat")
# Set the core size to zero
+
  
ulimit -c 0
+
* [[microMegas Output files:stat | '''stat''']] - a file where most of the global statistics of the simulation are written
# List all resource limits
+
  
ulimit -a
+
* [[microMegas Output files:travapp | '''travapp''']] - a file containing the evolution of the applied mechanical work (presently do not trust those computations)
echo "I ran on:"
+
# Print the nodes on which the project will run
+
  
cat $PBS_NODEFILE
+
* [[microMegas Output files:travint | '''travint''']] - is a file containing the evolution of the internal mechanical work (presently do not trust those computations)
# Change your execution directory to /data/lustre/<your_username> for fast
+
# I/O
+
cd /data/lustre/<your_username>
+
  
# Copy all necessary files from your project directory
+
== More about microMegas==
# (/cavs/cmd/data1/users/<your_username>/<your_project_directory>) to the  
+
This section also includes links to a ''''Dislocations Generator'''' code, developed by [mailto:Sebastien.Groh@imfd.tu-freiberg.de Sebastien Groh]. To download the code from the Codes Repository at CAVS, click [https://icme.hpc.msstate.edu/viewvc/CMD%20Codes%20Repository/DisloStructures/tags/1.0/ '''here'''] and then click "Download GNU tarball". Information on how to compile and run the code is provided in the ''''readme'''' file.
# execution directory (/data/lustre/<your_username>)
+
cp -fr /cavs/cmd/data1/users/<your_username>/<your_project_directory>/mm_omp .
+
  
# Go to the directory with the ‘mm_omp’ executable
 
cd /data/lustre/<your_username>/mm_omp/bin
 
  
# Run the parallel ‘mm_omp’ code on 12 parallel threads with/without cross-
+
=== Downloading and configuring microMegas ===
# slip activated (set GLDEV to be T or F in
+
# /data/lustre/<your_username>/mm_omp/in/ContCu)
+
  
/usr/bin/time -p -o ../omp_tests/[no-]cross-slip/mm_omp.time ./mm_omp | tee ../omp_tests/[no-]cross-slip/mm_omp.log
+
microMegas is not available in a system-wide implementation on the HPC2 systems. To use microMegas, please choose one of the available versions above to download on your local computer or workstation. After downloading, untar the tarball by typing:
  
# Move all files from the execution directory (/data/lustre/<your_username>)
 
# back to your project directory
 
# (/cavs/cmd/data1/users/<your_username>/<your_project_directory>)
 
 
cd /data/lustre/<your_username>/
 
cp -fr mm_omp/ /cavs/cmd/data1/users/<your_username>/<your_project_directory>/mm_omp_test/1
 
#
 
 
echo "All Done!"
 
</pre>
 
 
'''PBS script for MPI-based mMpar execution (mmp executable) on talon.hpc.msstate.edu'''
 
 
<pre>
 
<pre>
#!/bin/bash
+
tar xzf [name_of_the_tarball].tar.gz
#PBS -N mmp
+
#PBS -q special@talon
+
#PBS -l nodes=4:ppn=12
+
#PBS -l walltime=700:00:00
+
#PBS -m abe
+
#PBS -j oe
+
#PBS -r n
+
#PBS -V
+
# Set the stack size to unlimited
+
 
+
ulimit -s unlimited
+
# Set the core size to zero
+
 
+
ulimit -c 0
+
# List all resource limits
+
 
+
ulimit -a
+
echo "I ran on:"
+
# Print the nodes on which the project will run
+
 
+
cat $PBS_NODEFILE
+
# Change your execution directory to /data/lustre/<your_username> for fast
+
# I/O
+
cd /data/lustre/<your_username>
+
 
+
# Copy all necessary files from your project directory
+
# (/cavs/cmd/data1/users/<your_username>/<your_project_directory>) to the
+
# execution directory (/data/lustre/<your_username>)
+
cp -fr /cavs/cmd/data1/users/<your_username>/<your_project_directory>/mmp .
+
 
+
# Go to the directory with the ‘mmp’ executable
+
cd /data/lustre/<your_username>/mmp/bin
+
 
+
# Run the parallel ‘mmp’ code on 4x12=48 parallel processes with/without
+
# cross-slip activated (set GLDEV to be T or F in
+
# /data/lustre/<your_username>/mmp/in/ContCu)
+
 
+
/usr/bin/time -p -o ../mmp_tests/[no-]cross-slip/mmp.time ./mmp | tee ../mmp_tests/[no-]cross-slip/mmp.log
+
 
+
# Move all files from the execution directory (/data/lustre/<your_username>)
+
# back to your project directory
+
# (/cavs/cmd/data1/users/<your_username>/<your_project_directory>)
+
  
cd /data/lustre/<your_username>/
+
or
cp -fr mmp/ /cavs/cmd/data1/users/<your_username>/<your_project_directory>/mmp_test/1
+
#
+
  
echo "All Done!"
+
tar xzf [name_of_the_tarball].tar
 
</pre>
 
</pre>
  
== Output files ==
+
Go to the directory resulting from the above operations. Please follow the instructions in the '''readme''' files provided in the directory to setup microMegas on your system.
  
The output files are located in the '''mM/out''' directory. The most important output are briefly described below. For more details on the content and meaning of each file, please refer to the actual content of these files.
+
=== Getting Started Tutorial ===
  
* '''BVD.CFC''' - the set of reference vectors used in the simulation for a given crystal
+
For a beginner's step-by-step tutorial on how to use and run '''microMegas''' please visit the [[Code:_microMegas | microMegas]] page.
  
* '''bigsave.bin''' - a binary file containing everything needed to re-start a simulation if it is accidentally stopped
+
For a more detailed step-by-step tutorial, please download the PDF version  [[Media:MicroMegas_manual.pdf |'''TUTORIAL''']].
  
* '''film.bin''' - a binary file where the coordinates of segments are periodically saved to buildup a trajectory file
+
The '''microMegas input decks''' and a step-by-step Tutorial on how to use them to run discrete dislocation dynamics simulations can be downloaded ('Download GNU tarball') [https://icme.hpc.msstate.edu/viewvc/CMD%20Codes%20Repository/inputDecks/microMegas_decks '''here'''], or can be viewed online by clicking on the name of each of the files on the [[Code:_microMegas| microMegas]] page.
 
+
* '''gamma''' - a file containing the evolution of gamma for all existing slip systems
+
 
+
* '''gammap''' - a file containing the evolution of the instantaneous gamma dot for all the slip systems
+
 
+
* '''rau''' - a file containing the evolution of rho, the dislocation density, for all the slip systems
+
 
+
* '''raujonc''' - a file containing the evolution of the junction density and number for all slip systems
+
 
+
* '''resul''' - a GNU plotting script for plotting various simulation data (run 'gnuplot resul' to see the results)
+
 
+
* '''sigeps''' - an output file containing the stress, strain and other information (an accompanying file to "stat")
+
 
+
* '''stat''' - a file where most of the global statistics of the simulation are written
+
 
+
* '''travapp''' - a file containing the evolution of the applied mechanical work (presently do not trust those computations)
+
 
+
* '''travint''' - is a file containing the evolution of the internal mechanical work (presently do not trust those computations)
+
  
 
== References ==
 
== References ==
Line 969: Line 501:
 
* L.P. Kubin and G. R. Canova. The modelling of dislocation patterns. Scripta Metall., 27, pp. 957-962, 1992.
 
* L.P. Kubin and G. R. Canova. The modelling of dislocation patterns. Scripta Metall., 27, pp. 957-962, 1992.
  
[[Material_Models| back to the Material Models home]]
+
[[Multiscale_Simulations| back to the Multiscale Simulation Codes page]]
 +
 
 +
[[Category:Microscale]]
 +
[[Category:microMegas]]
 +
[[Category:Tutorial]]
 +
[[Category:Dislocation Dynamics]]

Latest revision as of 12:49, 23 March 2015

Name microMegas (mM)
Status released
Release Date mM v. 1.0 - 09/2009; mMpar v. 1.0 - 01/2010
Authors Developers Team at CNRS ONERA, France; mMpar v.1.0=extension of original mM v. 3.2 + OpenMP additions, by Florina Ciorba
Contact CNRS-ONERA The Developers' Team or Sebastien Groh
License GNU GPL License
Repository mM or mMpar
Documentation Included in the distribution
Known problems None
Description MicroMegas is a 3-D DDD (Discrete Dislocation Dynamics) simulations

To report bugs, problems or to make comments please use the discussion tab above.


Contents

[edit] Overview of microMegas

MicroMegas (also known as 'mM') is an open source program for DD (Dislocation Dynamics) simulations originally developed at the 'Laboratoire d'Etude des Microstructures', CNRS-ONERA, France. mM is a free software under the terms of the GNU General Public License as published by the Free Software Foundation. Discrete dislocation dynamics (DDD) is a numerical tool used to model the plastic behavior of crystalline materials using the elastic theory of dislocations. DDD is the computational counterpart to in site TEM tests. MicroMegas is a legacy simulation code used to study the plasticity of mono-crystalline metals, based on the elasticity theory that models the dislocation interactions into an elastic continuum. In crystalline materials, plastic deformation may be explained by (i) twinning, (ii) martensic transformation or/and (iii) dislocation interactions.

MicroMegas is used at CAVS for modeling dislocation interactions and reactions in an elastic continuum. The code is used in a hierarchical multiscale framework of the plasticity to obtain information related to the hardening of the material (see for example, the multiscale framework presented in this review paper‎). Details of the discrete dislocations model can be found in the methodology‎ paper and in the references at the bottom of the page.

The discrete dislocation simulation code can be used for HCP, BCC and FCC materials.

[edit] Available versions of microMegas

This section includes links to versions of the discrete dislocation dynamics codes. microMegas is commonly used at CAVS to simulate the behavior of dislocations for metals at the microscale.

  • microMegas (download the original microMegas code from the French Aerospace Lab here)
    • mM v.1.0: serial version with Intel Compiler Optimizations (download mM v. 1.0 from the Codes Repository at CAVS here, using "Download GNU tarball"; compile it as 'mm')
    • mM v.1.0: parallel version with Intel Compiler Optimizations and MPI (download mM v. 1.0 from the Codes Repository at CAVS here, using "Download GNU tarball"; compile it as 'mmp')
    • mMpar v.1.0: parallel version of mM v.1.0 using openMP threads (download mMpar v. 1.0 from the Codes Repository at CAVS here, using "Download GNU tarball"; compile it as 'mm_omp')

[edit] Download and Setup

microMegas can be freely downloaded from the original development site at the French Aerospace Lab. It can also be downloaded from the CAVS Cyberinfrastructure Repository of Codes in two versions:

  • mM ver 1.0 – serial mM [original ver. 3.2] with various Intel Compiler Optimizations, or
  • mMpar ver. 1.0 – parallel version of mM [original ver. 3.2], where force calculations for each segment are calculated in parallel using OpenMP threads.

[edit] Download

microMegas is not available in a system-wide implementation on the HPC2 systems. To use microMegas, please choose one of the available versions above to download on your local computer or workstation. After downloading, untar the tarball by typing:

tar xzf [name_of_the_tarball].tar.gz 

or

tar xzf [name_of_the_tarball].tar

Go to the directory resulting from the above operations. Please follow the instructions in the readme files provided in the directory to setup microMegas on your system.

[edit] Setup

In this page we describe how to install, configure and run DDD simulations using mM ver. 1.0 (with Intel Compiler optimizations) and mMpar ver. 1.0 (with Intel Compiler optimizations and OpenMP threads). Installation instructions for mM ver. 1.0 and mMpar ver. 1.0 can also be found in the ‘readme’ files provided in each directory and subdirectory of the code. mM can be run in batch mode to get data analyzed with conventional graphical display programs (exemples of Gnuplot scripts are provided) or it can be used in interactive mode to simply visualize dislocations activity. Herein, we describe how to run the code in batch mode. For instructions on how to run mM in interactive mode, please refer to the ‘readme’ files provided with the code.

Before compiling microMegas on any of the HPC-CAVS computing systesm, one needs to route to the proper compiler and MPI path on the system using:

  • swsetup intel - to use the latest Intel Fortran Compiler installed on the system, and
  • swsetup openmpi-intel-64 - to use the latest version of the OpenMPI libaries, compiled with the Intel compiler for 64-bit systems.

The general workflow for running discrete dislocation dynamics simulations using microMegas is illustrated in the figure below:

Workflow for running discrete dislocation dynamics simulations (using microMegas) at CAVS

[edit] Input files

The input files are located in the mM/in directory. The following files are needed to run the mM simulation.

In this file, the three files needed to run a microMegas simulation are defined. These input files must be declared in this directory "in". They are used at the beginning of the simulation and correspond to a simple classification.

In this file one enters the necessary parameters for generating the initial configuration.

Initial configuration file.

This is the input file with control parameters used for the simulation. For instance, one can select the type of simulation (initial or restart from previous simulation) via the parameter SIDEJA. One can also select whether cross-slip displacement of dislocations is desired by setting the GLDEV parameter accordingly (‘T’ for enabled and ‘F’ for disabled). Also, one can set the total number of simulation steps via the NSTEP parameter. Each simulation time step corresponds to 10-9 real time seconds. Therefore, for a very small simulation use NSTEP=500 while for a long running simulation set NSTEP to anything from 106 and above. Finally, one can also select how often should the simulation save the current state of the code, via the KISAUVE, KISTAT, KKIM and KPREDRAW parameters. For more details, check the file that comes with code.

This is the file containing the material variables. See the existing file for more details.

This is the file containing the initial dislocation segments configuration (e.g., the active slip systems, the number of segments, the dimensions of the simulation reference volume box, etc). See the bottom of the existing file for more details.

This is the file describing the initial number, type and characteristics of the dislocation segments. See the existing file for more details.

These are the input files needed to run polyphase simulations. See the existing files for more details.

[edit] Simulation source files

Micromegas is written in a mix of Fortran 90 and Fortran 95, consists of 18 source modules and contains roughly 25,000 lines of code. The pseudocode of the MAIN module in Micromegas is shown below.

! Module MAIN: simulation time loop
TIME: do = 1, STEPS
...
call SOLLI ! Apply load 
call DISCRETI ! Discretize the simulation volume !into dislocation lines/segments
call FORCE ! Calculate interaction forces 
!FORCE calls SIGMA_INT_CP to calculate short !range interaction forces
!FORCE calls SIGMA_INT_LP to calculate long !range interaction forces
call DEPPREDIC ! Predict moving segments 
call UPDATE ! Search for obstacles, determine & make contact reactions, update positions of segments
call CORRIGER_CONFIG ! Check the connections between all segments
...
enddo TIME

The source files are located in the mM/src/simu/ directory. These 18 modules are briefly described below. For more information, please refer to the actual content of these files.

  • 01constantes.f90 - module containing the declaration of all simulation constants
  • 02bricamat.f90 - module containing a toolbox of useful subroutines for, e.g., dot products, etc.
    • uses 01constantes module
  • 03varbase.f90 – module containing the data structures and variables database (lattice, etc)
    • uses 01constantes module
  • 04varglob.F90 – module containing initializations of all the constants and variables common to all the modules of the main program
    • uses 01constantes and 03varbase modules
  • 05intergra.f90 – module that enables integration with the graphical module (for interactive modem mM simulations)
    • uses 04varglob module
  • 06debug.f90 – module containing the subroutines required for debugging, i.e., subroutine Conf(i) and subroutine verif_reseau
    • uses 01constantes, 02bricamat, 03varbase and 04varglob modules
  • 07init.F90 – module that reads the input files and assigns values to all other variables not initialized in 04varglob
    • uses 02bricamat, 04varglob, 06debug and carto modules
  • 08connec.f90 – module that checks the connectivity between all segments (not CPU intensive)
    • uses 04varglob and 06debug modules
  • 09elasti.F90 – module where the short-range and long-range interaction forces between each segments pair is calculated
    • uses 02bricamat, 04varglob, 06debug, 08connec and microstructure modules
  • 10dynam.F90 - module where the moving velocity of each segment is calculated
    • uses 01constantes, 04varglob, 06debug and 08connec modules
  • 11topolo.f90 – module containing the procedures used to generate the boundary conditions, to discretize the dislocation lines into segments and to locate the segments before they are eliminated
    • uses 04varglob, 06debug, 08connec and microstructure modules
  • 12contact.f90 – module containing simple displacements and where the interactions between segments are updated in four steps.
    • uses 02bricamat, 04varglob, 06 debug, 08connec and microstructure modules
  1. check for every possible obstacle,
  2. check for every possible contact reaction (annihilation, junction formation, etc.),
  3. make the reactions, and
  4. update the positions of the segments
  • 13resul.F90 – module where the results and statistics are calculated
    • uses 02bricamat, 04varglob, 06 debug and microstructure modules
  • 14bigsave.F90 – module that saves the simulation state either when the number of selected time steps has elapsed or to be able to restart a computation
    • uses 02bricamat and 04varglob modules
  • 15main.F90 - main module containing the simulation time loops; it calls all other modules either implicitly or explicitly;
    • uses 02bricamat, 04varglob, 06debug, 07init, microstructure, 09elasti, 10dynam, 11topolo, 12contact, 13resul and 14bigsave modules
  • base.f90 – module that reads all the data of the main program, in three groups of files:
    • materiaux – given material physical properties
    • control – given simulation parameters
    • seg3D – regroups the characteristics of the segments given at the beginning of the simulation
    • uses 01constantes, 02bricamat and 04varglob modules
  • carto.f90 – to be written
  • microstructure.F90 – module containing the subroutines used to detect the obstacles, i.e., subroutine barriere_spherique and subroutine barriere_plane; it prints the segments structure
    • uses 02bricamat, 03varbase, 04varglob, 06debug and 08connec modules

[edit] Compiling microMegas

[edit] Compiling the original microMegas code

[edit] Compile the simulation

To compile microMegas, you need to buildup a makefile dedicated to the machine you want to run the simulation, in the ‘mM/bin’ or ‘mMpar/bin’ directory. Solutions already exist for many different platforms; you should be able to do your one without too much effort.

The "config" file is the part of "makefiles" which is the same on all the machines

To create a new machine "makefile" you must add at the end of config the corresponding ".PHONY" definition.

Then, you need to buildup your one "Make_DEFS" file. The latter must contains all the headers useful for your new machine. See the following examples.

Make_DEFS.amd -> An AMD Linux platform with gcc and the Intel FORTRAN compilers Make_DEFS.dec -> A DEC Alpha machine with the native C and FORTRAN compilers Make_DEFS.g5 -> An Apple G5 machine with gcc and the IBM FORTRAN compilers Make_DEFS.mac -> An Apple G4 or G3 Machine with gcc and the ABSOFT FORTRAN compilers Make_DEFS.mad -> An AMD Cluster Make_DEFS.madmax -> A cluster of Xeon machines with gcc and the Intel FORTRAN cimpilers Make_DEFS.pc -> A simple PC workstation Make_DEFS.sgi -> An SGI Itanium machine with gcc and the Intel(64) FORTRAN Compiler etc....

Once you have made your "Make_DEFS.machine_type", type:

make -f  config machine_type

For instance for my machine I simply type "make -f config mac")

At that stage you should have a "makefile" file created in the bin directory

[edit] Execute the version of microMegas of your choice

According to the version of microMegas you want to execute, type:

  • make or make all - to compile all the binaries (this does not include the MPI binary)
  • make mm - to compile only the batch version of the simulation
  • make gmm - to compile only the simulation with its graphical interface (interactive mode)
  • make mm_omp - to compile only the batch version for OpenMP parallel threads
  • make mmp - to compile only the batch version for MPI clusters
  • make cam - to compile only the graphical interace (needed to see the simulation film)
  • make base - to compile only the code needed to generate the simulation vectors base
  • make confinit - to compile only the code needed to generate random intitial configurations
  • make pavage - to compile only the code needed to generate the database needed for the simulation interfaces
  • make clean - to sweep out all the useless pieces of codes
  • make cleanall - to clean up everything

[edit] Run the simulation

To run the simulation, simply type:

  • mm > screen & - to run the simulation in batch mode
  • gmm - to run the simulation in interactive mode and with the graphic interface
  • mm_omp - to run the OpenMP-based simulation in batch mode, assuming all the OpenMP-related environment variables are set (see the next subsection for more details).
  • mpirun -np "x" -machinefile ../in/hosts.dd mmp > screen & - to run the MPI batch simulation

[edit] Additional tools

  • cam - The camera code to see after and during calculations the film of the simulation
  • confinit - The code used to buildup initial configurations
  • base - The code you can use to generate alone the base of vectors used in the simulation
  • pavage - The code used to generate the interfaces files "b_poly" needed to simulate periodic polycrystals

[edit] Where and who is who

All the inputs data are defined in the directory "mM/in". Take a look to the README file in this directory for more information.

All the outputs data are written in the directory "mM/out". Take a look to the README file in this directory for more information.


[edit] Running microMegas

A typical simulation run in Micromegas requires somewhere between 10^6 to 10^9 time steps to gain more insight about the plastic deformation range. Simulations with a smaller number of steps will very likely not capture the plastic range of deformation – the region of interest for the materials scientists studying plastic deformation. A simulation run over 10,000 steps using serial version of Micromegas requires 68 hours on average and reaches 0.2% of the plastic deformation on a Nehalem quad-core Xeon W3570 processor, with 6GB of triple channel 133MHz DDR-3 RAM. Simulations of about 10^9 time steps are needed to reach the desired percentage of deformation, that is, the strain rate as high over 1% as possible.

To get an idea of the type of simulations that can be conducted with microMegas, we give here the parameters of a representative simulation selected in the input files, the compilation and execution commands. The simulation parameters of a representative microMegas simulation are:

  • 0.5% plastic deformation
  • 10x10x10 µm^3 simulation box dimensions
  • 1012 1/m^2 initial density
  • 10 1/s strain rate in multi-slip conditions

Note: Multi-slip calculations were performed to evaluate and demonstrate the efficiency of the parallel version of microMegas.

  • Material: representative volume elements of Al (FCC crystal structure with Burgers vector of magnitude b = 2.86 Å) of dimensions 9x10x12 µm^3
  • For tension simulations: loading along the [001] direction
  • For compression simulations: loading along the [100] direction
  • strain rate of 20 1/s
  • temperature of 300 K under periodic boundary conditions
  • time step was considered to be 1/10^9 seconds

Note: Screw dislocations were not allowed to cross-slip at any time.

[edit] Simple batch execution

[edit] Serial microMegas (mm)

To run serial microMegas for production simulations from the command line add the corresponding software modules (compilers, libraries, etc.) to load in your ‘.bashrc’ file (in your home directory, i.e. /home/<your_username>/). To load the compiler of your choice, e.g., my choice is Intel Fortran, type:

swsetup intel

Then in the 'mM/bin’ directory, to compile only the batch version of the simulation type:

make –f serial-Makefile clean

make –f serial-Makefile mm

Launch the serial version of the simulation from the same directory by typing:

mkdir ../production_runs

to run the simulation in batch mode, or to record the running time and save the output in a separate directory and files, type:

/usr/bin/time -p -o ../production_run/mm.time ./mm | tee ../production_runs/mm.log

[edit] Parallel microMegas (mm_omp - OpenMP version)

To run parallel microMegas for production simulations add the corresponding software modules (compilers, libraries, visualisers, etc.) to load in your ‘.bashrc’ file. To load the compiler of your choice, e.g., my choice is Intel Fortran, type:

swsetup intel

Then in the ‘mMpar/bin’, tp compile only the batch version of the simulation type:

make –f openMP-Makefile clean

make –f openMP-Makefile mm_omp

Before running mm_omp, one needs to configure the target system for executing OpenMP programs. This is done by ensuring that the environment variables used by the chosen compiler and its OpenMP extension are properly set. For a quad-core Linux system running SuSE SLES 10, and the Intel Compiler version 11.1, the following values are recommended.

export OMP_THREAD_NUM=4              // This value can be adjusted to match the existing number of cores in the compute node of your choice. 
                                                                   // E.g., in talon nodes, this can be set to 12.
export KMP_AFFINITY=verbose,respect,granularity=core,scatter
export KMP_LIBRARY=turnaround
export KMP_SETTINGS=1
export KMP_STACKSIZE=512m
export KMP_VERSION=.TRUE.

For more details on the values and meaning of these environment variables, please consult the Intel Compiler manual and its OpenMP specification. Note that these environment variables are specific to the Intel Compiler and its OpenMP specification, and that they may differ based on the compiler of your choice and the specifics of its own OpenMP extension.

Launch the parallel OpenMP version of the simulation from the same directory by typing:

mkdir ../production_runs

to run the simulation in batch mode, or to record the running time and save the output in a separate directory and files, type:

/usr/bin/time -p -o ../production_run/mm_omp.time ./mm_omp | tee ../production_runs/mm_omp.log

[edit] Parallel microMegas (mmp - MPI version)

For the parallel microMegas simulations, also load the MPI libraries, e.g. OpenMPI ver. 1.4.2, by typing:

swsetup openmpi-intel-64

Note: To avoid any compilation or execution errors, please make sure that during the selection of any additional libraries, such as MPI, you choose the library version that was compiled using the same compiler of your choice. For instance, if you compile the code using Intel compilers, please select the MPI library that was compiled using Intel compilers. Not doing so, may cause unpredictable errors during the simulation.

Then in the ‘mM/bin’ directory, to compile only the batch version of the simulation, type:

make –f openMPI-Makefile clean

make –f openMPI-Makefile mmp

Launch the parallel MPI version of the simulation from the same directory by typing:

mkdir ../production_runs

to run the simulation in batch mode, or to record the running time and save the output in a separate directory and files, type:

/usr/bin/time -p -o ../production_run/mmp.time mpirun –np “x”./mmp | tee ../production_runs/mmp.log

[edit] PBS batch execution

The serial code (mm), the OpenMP-based code (mm_omp) and the OpenMPI-based code (mmp) can be launched either locally (as described in the Subsection above - Simple batch execution) or remotely. For remote execution on high performance compute clusters, a PBS (Portable Batch Script) is needed to submit the execution as a job.

Below are three sample PBS scripts one could use to run microMegas in any of the three versions on the talon.hpc.msstate.edu high-performance cluster at HPC2. Each of these scripts can be cut and pasted into a file, e.g., mm.pbs.talon or mm_omp.pbs.talon or mmp.pbs.talon. To submit a pbs script to the jobs queue on talon, first log on to the talon-login node, typing:

rlogin talon-login

from any HPC2 machine, and then type:

qsub mm.pbs.talon           or             qsub mm_omp.pbs.talon         or             qsub mmp.pbs.talon

Note: microMegas is a long running code. To run long simulations please contact the HPC2 administrators to request access to the 'special' queue.

[edit] Output files

The output files are located in the mM/out directory. The most important output are briefly described below. For more details on the content and meaning of each file, please refer to the actual content of these files.

  • BVD.CFC - the set of reference vectors used in the simulation for a given crystal
  • bigsave.bin - a binary file containing everything needed to re-start a simulation if it is accidentally stopped
  • film.bin - a binary file where the coordinates of segments are periodically saved to buildup a trajectory file
  • gamma - a file containing the evolution of gamma for all existing slip systems
  • gammap - a file containing the evolution of the instantaneous gamma dot for all the slip systems
  • rau - a file containing the evolution of rho, the dislocation density, for all the slip systems
  • raujonc - a file containing the evolution of the junction density and number for all slip systems
  • resul - a GNU plotting script for plotting various simulation data (run 'gnuplot resul' to see the results)
  • sigeps - an output file containing the stress, strain and other information (an accompanying file to "stat")
  • stat - a file where most of the global statistics of the simulation are written
  • travapp - a file containing the evolution of the applied mechanical work (presently do not trust those computations)
  • travint - is a file containing the evolution of the internal mechanical work (presently do not trust those computations)

[edit] More about microMegas

This section also includes links to a 'Dislocations Generator' code, developed by Sebastien Groh. To download the code from the Codes Repository at CAVS, click here and then click "Download GNU tarball". Information on how to compile and run the code is provided in the 'readme' file.


[edit] Downloading and configuring microMegas

microMegas is not available in a system-wide implementation on the HPC2 systems. To use microMegas, please choose one of the available versions above to download on your local computer or workstation. After downloading, untar the tarball by typing:

tar xzf [name_of_the_tarball].tar.gz 

or

tar xzf [name_of_the_tarball].tar

Go to the directory resulting from the above operations. Please follow the instructions in the readme files provided in the directory to setup microMegas on your system.

[edit] Getting Started Tutorial

For a beginner's step-by-step tutorial on how to use and run microMegas please visit the microMegas page.

For a more detailed step-by-step tutorial, please download the PDF version TUTORIAL.

The microMegas input decks and a step-by-step Tutorial on how to use them to run discrete dislocation dynamics simulations can be downloaded ('Download GNU tarball') here, or can be viewed online by clicking on the name of each of the files on the microMegas page.

[edit] References

Please remember to cite the relevant references from the articles below when publishing results obtained with microMegas:

  • F. M. Ciorba, S. Groh and M. F. Horstemeyer. Parallelizing discrete dislocation dynamics simulations on multi-core systems. 10th Int. Conf. on Computational Science, Procedia Computer Science, 1:1, pp. 2129-2137, 2010.
  • S. Groh, E. B. Marin, M. F. Horstemeyer, and H. M. Zbib. Multiscale modeling of the plasticity in an aluminum single crystal. Int. J. of Plasticity, 25, pp. 1456-1473, 2009.
  • S. Groh and H. M. Zbib. Advances in Discrete Dislocations Dynamics and Multiscale Modeling, J. Eng. Mater. Technol. vol. 131:4, 041209 (10 pages), 2009.
  • Multiscale Modeling of Heterogenous Materials: From microstructure to macro-scale properties. Chapter 2: Discrete Dislocation Dynamics: Principles and Recent Applications (by Marc Fivel). Edited by Oana Cazacu. Published by Wiley. ISBN: 9781848210479, 2008.
  • B. Devincre, V. Pontikis, Y. Brechet, G.R. Canova, M. Condat and L.P. Kubin. Three-dimensional Simulations of Plastic Flow in Crystals. Plenum Press: New York, M. Marechal, B.L. Holian (eds.), 1992, p. 413
  • L.P. Kubin and G. R. Canova. The modelling of dislocation patterns. Scripta Metall., 27, pp. 957-962, 1992.

back to the Multiscale Simulation Codes page

Personal tools
Namespaces

Variants
Actions
home
Materials
Material Models
Design
Resources
Projects
Education
Toolbox