Giter VIP home page Giter VIP logo

mmsp's Introduction

Mesoscale Microstructure Simulation Project

Build Status DOI

The goal of the Mesoscale Microstructure Simulation Project (MMSP) is to provide a simple, consistent, and extensible programming interface for all grid and mesh based microstructure evolution methods. Simple means that the package has a very small learning curve, and for most routine simulations, only a minimal amount of code must be written. By consistent we mean, for example, that code for two-dimensional simulations is nearly identical to that for three-dimensional simulations, single processor programs are easily parallelized, and fundamentally different methods like Monte Carlo or phase field have the same look and feel. Finally, extensible means that it's straightforward to add new grid types or physical behaviors to the package. Other considerations include efficiency and portability (MMSP is written entirely in ISO compliant C++). For more details, see the documentation.

MMSP is nothing more than a collection of C++ header files that declare a number of grid objects (classes) and define how most of their methods (member functions) are implemented.

Some things MMSP provides include:

  • A simple, extensible programming interface
  • Computational grids of arbitrary dimension
  • Parallel implementations using MPI
  • Automatic, optimal parallel mesh topologies
  • Utility programs for grid visualization
  • Monte Carlo methods
  • Cellular automata methods
  • Phase field methods (conventional)
  • Phase field methods (sparsePF)
  • General finite difference PDE solvers
  • 22+ example problems that run in 2D and 3D, single and parallel

Typical MMSP applications include:

  • Grain growth and coarsening
  • Precipitation reactions
  • Crystal growth and solidification
  • Lattice based kinetic Monte Carlo
  • Statistical mechanics: Ising model, classical Heisenberg model, etc.
  • Spinodal decomposition and other second order transformations

MMSP requires:

  • Minimal programming experience
  • An ISO compliant C++ compiler (e.g. gcc 2.95 or later)
  • zlib libraries for data compression (e.g. zlib 1.2.7)
  • libpng headers for mmsp2png image generation utility (e.g. libpng12-dev)
  • ParaView VTK headers for VTI and PVD visualization utilities (e.g. paraview and paraview-dev)
  • MPI libraries if compiling parallel programs (e.g. openmpi)

Documentation

The MMSP manual is a work in progress. It is currently the only source for detailed documentation about MMSP.

Contact us

The administrators for the MMSP source code are Jason Gruber ([email protected]), Trevor Keller ([email protected]) and Dan Lewis ([email protected]). Please do not hesitate to send questions or comments. Please cite using the following DOI:

DOI

This work was supported in part by the US NSF under award #1056704 through the Metals and Metallic Nanostructures Program, Division of Materials Research.

mmsp's People

Contributors

davidkleiven avatar fields4242 avatar lauera avatar lucentdan avatar pdetwiler44 avatar tkphd avatar yixuantan avatar zhyrek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mmsp's Issues

Dependencies Broken

There's a broken feature in MMSP

  • make utilities fails on Ubuntu Focal-Fossa
  • libvtk7 and dependencies are installed.
  • expected "make utilities" to complete.
  • The observed behavior is that make fails.

Running "locate --limit 1 vtkCommonCore.so" returns nothing in the shell.

Is it possible that a libvtk update has broken MMSP?

Poisson example is broken

  • With np>1, the multigrid algorithm hangs. Implementation decisions suggest that parallel was not intended:
    • Ghostswap is never called, and
    • stock Gauss-Seidel iterative scheme is used where red-black Gauss-Seidel is more appropriate.
    • The multigrid algorithm may not be parallelizable.
  • Serial code alternates between (-\infty, 0] and [0, +\infty) every timestep, with zeros along the border. This not the desired result.

Dirichlet Boundary Conditions

Dirichlet boundary conditions need information that is not currently stored with the grid or that can be derived from the grid. A means to store/retrieve this information from a grid should be provided by MMSP. Thoughts on how to do this? Anyone? I'm happy to write the code, but some thoughts on design are welcome.

Unified formatting in example code

Most examples are organized (typedef in hpp, generate() and update() in cpp) and implement best practices in templating and grid access. A few retain grid[x][y] access and separate update<2,...> and update<3,...> implementations. These holdovers should be brought in line. Also, while "grid" is a valid name for a grid object, oldGrid/newGrid or similar would be more instructive than grid/update.

  • hpp, cpp
  • oldGrid, newGrid
  • templated update
  • boundary-aware grid access

Issue with large grids?

An issue that I've been having recently involves reading microstructural data from a file and then using that to create an MMSP grid representation of the microstructure. The code that I've developed to do this is fairly simple and works well. After the data is imported, I use a function that I developed which does a linear expansion of the grid in whatever dimension you want by an arbitrary, integral value, eg by making a new grid with a length in the chosen dimension that is x many times larger than the original grid, and has a dx in that dimension which is 1/x the original. This function also produces the results as I would expect, with one exception: it doesn't work for any values larger than x=4.

The initialization runs just fine and the output file is written with what appears to be the correct data judging by the visual representation of the data that is made by converting the MMSP binary file to a vti file. However, upon attempting to run it, the simulation quits with a Signal 6 termination code before even going through one step. The simulations are being run on the AMOS BG/Q system.

Main Header is Restrictive

The MMSP.main.hpp header currently enforces a highly restrictive usage of the MMSP functions, requiring definitions of grid types to be used and messages for the command line before its inclusion. This creates the need to separate the inclusion of MMSP as a whole and MMSP.main.hpp. Rather than requiring this, the main header may be done away with altogether, allowing the user to create and implement their own functions for grid generation, updating, and output using the functionality within MMSP, without use of command line arguments if the user chooses. A template for properly structured code without the main header may also be included within the project.

function template documentation

For new users, the use of templated functions in example code may be confusing. Document our usage, explaining

  • where to read more about C++ templates
  • that examples are written as generally as feasible for maximum reusability
  • specification of template parameters in example.hpp files
  • how templates improve readability and reusability while reducing code duplication in our specific examples
  • how a motivated user could approach specializing an example to remove templates in experimental codes

streamline vector calc

Finite differencing should have better performance

  • Bug appears in MMSP.grid.cpp in functions laplacian(GRID,...), etc.
  • The expected behavior is fast computation of gradients, Laplacians, and divergence using built-in functions.
  • The observed behavior in profiling is unusually high residence time in laplacian() and operator()(GRID, vector<int>).

Proposed fix

  • Our stock implementation of discrete Laplacian and gradient operators computes the addresses of neighboring cells every time the function is called, despite neighboring coords being static entities.
  • Operators then call operator()(GRID, vector<int>), which passes coords through check_boundary before computing the index location.
  • Entire process would be much faster by creating a function neighbor_coords which would store a grid of n-dimensional coordinates for high- and low-side neighboring cells, and applying check_boundaries to each stored position vector.
  • Discrete vector operators could then call GRID[x][y] instead of GRID(x) to efficiently access stored values, reducing overhead and improving performance.

Visualization utilities with unexpected results

  • TKmmsp2vti is not a helpful name, but the utility's function (generating VTI files with coloring by grain ID from vector-valued MMSP data) is useful. Either choose a descriptive name or merge into mmsp2vti with a flag to switch modes.
  • mmsp2png is a useful idea, but currently there are several implementations depending on the type of data to visualize. Merge the disparate pieces, harmonize rastering with PNG library, and enable command-line switching between visual styles.
  • VTK expects column-major data, while MMSP data is row-major. Utilities that raster of nodes(grid) (or, equivalently, nested loops over i, j, k) will therefore produce visualizations rotated 90 degrees. Replace with nested loops over k, j, i.

mmsp2pvd throws a segmentation fault

The utility for converting MMSP grid data to the ParaView Data format, mmsp2pvd, is outdated, and may no longer fit in the MMSP output framework. At present, the utility throws a segmentation fault when executed using the pattern recommended by the help message, mmsp2pvd --output=test.pvd test.dat, which should simply produce test.pvd and test.vti. This bug is difficult to track down, since the utility internals don't match up with the advertised usage pattern or the best practices for grid access.

mmsp2pvd takes as command-line input an output filename and a list of input filenames for conversion. The expected output is one PVD file (.pvd) describing some global grid properties (dimensions, spacing) and a list of VTK image files (.vti), plus one VTI file generated from each input file. This framework is useful if each MPI rank writes its local sub-domain to a file of its own, e.g. for the checkpoint at t=100 timesteps, result.0100_r0.dat, result.0100_r1.dat, ..., result.0100_rN.dat. mmsp2pvd should then generate result.0100.pvd, result.0100_r0.vti, result.0100_r1.vti, ..., result.0100_rN.vti.

However, MMSP currently does not have an output mode that matches this pattern. Instead, checkpoints comprise one single file, into which each MPI rank writes its subdomain description and compressed data as a contiguous block. mmsp2pvd could be re-written to export each block as its own vti file, which might be useful for visualizing unreasonably enormous datasets. The alternative utility, mmsp2vti, converts the MMSP checkpoint file into one VTK Image file (VTI).

The incompatibility between MMSP file I/O and the mmsp2pvd utility is a bit of a conundrum. It is not unreasonable to believe that some users would like to have the option to write one file-per-rank and visualize just one block at a time, or the whole, at will. Until such a need arises, however, the best course is to remove mmsp2pvd from the repository. If extremely large grid support becomes necessary, the appropriate checkpoint input and output functions will be written, then mmsp2pvd may be resurrected.

example Makefile dependencies

Commit a01bf6b removed the core MMSP includes as dependencies from the example Makefiles. This was erroneous in most cases: as a result of this commit, running make will not rebuild the binaries when the MMSP includes change, only when the example code changes. Proper usage defines a core variable containing the external files necessary to build an up-to-date binary, and including those files on the dependency line.

To clarify, using one of the anisotropic vector-valued grain growth codes as an example:

Current Makefile

graingrowth: graingrowth.cpp
    $(compiler) $(flags) $< -o $@ -lz

Former Makefile

core = $(incdir)/MMSP.hpp \
       $(incdir)/MMSP.main.hpp \
       $(incdir)/MMSP.utility.hpp \
       $(incdir)/MMSP.grid.hpp \
       $(incdir)/MMSP.vector.hpp
graingrowth: graingrowth.cpp anisotropy.hpp
    $(compiler) $(flags) $< -I$(core) -o $@ -lz

Correct Makefile

core = $(incdir)/MMSP.hpp \
       $(incdir)/MMSP.main.hpp \
       $(incdir)/MMSP.utility.h \
       $(incdir)/MMSP.utility.cpp \
       $(incdir)/MMSP.grid.h \
       $(incdir)/MMSP.grid.cpp \
       $(incdir)/MMSP.vector.h \
       $(incdir)/MMSP.vector.cpp
graingrowth: graingrowth.cpp graingrowth.hpp anisotropy.hpp $(core)
    $(compiler) $(flags) $< -o $@ -lz

Protip: $< denotes the first prerequisite, which in this example is graingrowth.cpp, not the whole slew of dependencies. The first item is critical, but order makes no difference for the remainder.

Utilities don't distinguish unsigned types

Simple grid type parsing means the utilities see "grid:unsigned int" as both int_type and unsigned_int_type. The utility then constructs the grid and tries to fill it with unsigned int data, triggering an error message.

Simple fix, use else if() instead of if() and put unsigned types ahead of signed types.

Parallel jobs require dots in filename

If the initial condition is written to a file with only one ".", for example "test.dat", the program may segfault or hang. A workaround is to name initial conditons with numbers, for example "time.0000.dat" instead. A proper fix would be nice.

Deprecate MMSP.hpp

MMSP.hpp includes all the sub-classes of MMSP. Best practice is to #include only those headers the code actually needs, an approach which reduces compile time and needless dependencies.

Reading in files generated on 64-bit machines with a 32-bit machine

There is a bug with reading 64-bit machine-produced data files on a local 32-bit architecture machine. If, for instance, you generate file.02000.dat on a 64-bit machine, and transfer it to a 32-bit machine and try to convert it to a vti file, you will get a bad_alloc dump. You also run into similar issues trying to compile and run the topology analysis algorithms on 32-bit machines.

MPI_File_preallocate is slow

MMSP.grid.hpp calls MPI_File_preallocate before writing data at specified offsets, to make sure the filesystem has allocated sufficient space for the incoming data. However, profiling with mpiP reveals that this preallocation is a bottleneck. This is explained in "On Implementing MPI-IO Portably and with High Performance": most filesystems do not implement a preallocation routine, so MPI-IO must write data to disk in order to force allocation.

This reflects a minor design flaw, in that MMSP forces something the filesystem clearly does not require. Therefore, it should be safe to drop MPI_File_preallocate from the grid class. Further, it may be desirable to use the collective MPI_File_iwrite_at_all instead of non-collective MPI_File_iwrite_at to perform the file output.

GPL compliance

Our implementation does not satisfy the best practices for using GPL.

  • LICENSE.md should include the full text GPLv3.
  • Every file in the distribution should include the license summary.
  • main() should print the license summary, as part of --help if nowhere else.

unstable gradient discretization

There's a broken feature in MMSP

  • Bug appears in MMSP.grid.cpp
  • The expected behavior is stable or conditionally-stable discrete gradient operator
  • The observed behavior is not that, exposed on PR #68. See my comment.

Subtle Monte Carlo grain growth memory error

In Debian 7 (Wheezy) using GCC v. 4.7.2 with optimization level 2 or 3 (-O2, -O3) in serial (g++) or parallel (mpic++), both of

  • examples/coarsening/grain_growth/anisotropic/Monte_Carlo and
  • examples/coarsening/grain_growth/isotropic/Monte_Carlo
    hang in the first iteration of update(). The program executes successfully with lower optimization (-g, -O0, -O1), with different compiler versions (more recent GCC or with ICC v. 15.0.3), and in different operating systems (Debian Sid, Raspbian Jessie, Ubuntu Trusty).

It is possible, but extremely unlikely that this is a compiler bug. It's more likely a subtle memory error in either update() or ghostswap(grid,sublattice).

@fakemusleman, have you seen intermittent bugs with this code elsewhere? Any suggestions for places to look? I'll keep poking around with a debugger, but with limited familiarity with the algorithm, I'm not sure how far I'll get.

mmsp2png fails to compile

Currently installing MMSP (git cloned; Ubuntu Linux 16.04) following the manual, but running into the following problem:

[amj][~/projects/mmsp/utility]> make
g++ -O2 -Wall -I ../include/ mmsp2vti.cpp -o mmsp2vti -lz
g++ -O2 -Wall -I ../include/ mmsp2pvd.cpp -o mmsp2pvd -lz
g++ -O2 -Wall -I ../include/ mmsp2png.cpp -o mmsp2png -lz -lpng
mmsp2png.cpp:13:16: fatal error: png.h: No such file or directory
compilation terminated.
Makefile:25: recipe for target 'mmsp2png' failed
make: *** [mmsp2png] Error 1

I believe I'm missing a particular library, but would prefer you to specify before I hunt for the dependency myself.

Anisotropic solidification filenames break convention

In solidification/anisotropic/phase_field example, dendritic.cpp and dendritic.hpp should be names solidification.cpp and solidification.hpp, respectively, following the same pattern as other example directories (e.g., coarsening/grain_growth/...).

Anisotropy example broken after latest merge

  • Bug appears in mmsp/examples/phase_transitions/solidification/anisotropy/solidification.cpp
  • Variable dgpX is misused on line 136 (called as DgpX), which causes compilation to fail

document workflow

There's a confusing feature in MMSP

  • Rolling releases is a more natural model than fixed releases for a project of this size (lines of code and user base)
  • master and develop are redundant branches: only one is necessary
  • Recommend deleting develop and documenting the branching workflow using master as the trunk

Poisson example throws segmentation fault

The mulitigrid algorithm implemented in examples/differential_equations/elliptic/Poisson contains a memory error. This will take some effort and expertise in the algorithm to track down and repair.

Header Organization

MMSP does not follow canonical header file organization. A simple re-org of code should fix this and make it easier for folks to use it.

Race condition in stat mech examples

The statistical mechanics examples (Heisenberg, Ising, Potts) will only call ghostswap() when index % sqrt(nodes(grid)) is zero. This is meant to trigger ghostswap when a boundary cell has changed state, in order to maintain coherency across parallel boundaries. Depending on the number of ranks requested of mpirun, the grids may have uneven sizes, which produces a race condition when one rank has already passed over the conditional (leaving all the rest to wait, forever). This could be addressed by collectively reducing index % sqrt(nodes(grid)) to its minimal value, effectively asking if any rank has changed a boundary cell, instead of checking only the local rank.

Templated update function confusing in examples?

I wonder if we should avoid using only templated functions in examples? I wonder if less general example in (for example) the isotropic phase field grain growth directory would be more helpful to users?

I agree that the templated code permits the three tests to run appropriately.

Just wanted to have a couple of exchanges on this topic.

Undefined reference during installation

There's a broken feature in MMSP

  • Bug appears in during installation
  • Encountered running on Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz using Linux Fedora with VTK from Paraview 5.5.0 64.bit, GCC version 8.2.1
  • The expected behavior is no 'undefined references'
  • The observed behavior is 'undefined references' during linking.

The error message I observe is

/usr/lib64/paraview/libvtkIOXML.so: undefined reference to `vtkLZ4DataCompressor::New()'
/usr/lib64/paraview/libvtkCommonDataModel.so: undefined reference to `vtkLinearTransform::TransformPointsNormalsVectors(vtkPoints*, vtkPoints*, vtkDataArray*, vtkDataArray*, vtkDataArray*, vtkDataArray*, int, vtkDataArray**, vtkDataArray**)'
/usr/lib64/paraview/libvtkIOXML.so: undefined reference to `vtksys::SystemTools::Stat(char const*, stat*)'
//usr/lib64/vtk/libvtkCommonExecutionModel.so.1: undefined reference to `vtkDataSetAttributes::CopyStructuredData(vtkDataSetAttributes*, int const*, int const*)'
//usr/lib64/vtk/libvtkCommonExecutionModel.so.1: undefined reference to `vtkInstantiatorInitialize::vtkInstantiatorInitialize()'
/usr/lib64/paraview/libvtkIOXML.so: undefined reference to `vtksys::SystemTools::MakeDirectory(char const*, unsigned int const*)'
//usr/lib64/vtk/libvtkCommonExecutionModel.so.1: undefined reference to `vtkInstantiatorInitialize::~vtkInstantiatorInitialize()'
/usr/lib64/paraview/libvtkIOXML.so: undefined reference to `vtkLZMADataCompressor::New()'
collect2: error: ld returned 1 exit status
make: *** [Makefile:41: mmsp2vti] Error 1

This is most likely a VTK issue and not MMSP, but I was wondering what is the highest VTK version this package has been confirmed to compile against?

build_examples.sh in mmsp/test fails

Happens in develop and master branches, it looks like the serial versions of the examples build, but parallel build fails. Here is output for the first test that tries to build:

[amj][~/projects/mmsp/test]> ./build_examples.sh
Building examples in serial and parallel, 2-dimensional, taking 1000 steps, using 4/8 MPI ranks
mmsp2png utility not found. Please check your installation, or pass --noviz.

1/25 beginners_diffusion/ 0 seconds
example does not match generic pattern for execution
2/25 coarsening/grain_growth/anisotropic/Monte_Carlo/ /tmp/ccYRAxVP.o: In function void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .isra.60]': graingrowth.cpp:(.text+0xab): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_create(unsigned long&, unsigned long)'
/tmp/ccYRAxVP.o: In function std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*)': graingrowth.cpp:(.text._ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_[_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_]+0x48): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_append(char const*, unsigned long)'
/tmp/ccYRAxVP.o: In function std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > MMSP::name<3, int>(MMSP::grid<3, int> const&)': graingrowth.cpp:(.text._ZN4MMSP4nameILi3EiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_4gridIXT_ET0_EE[_ZN4MMSP4nameILi3EiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_4gridIXT_ET0_EE]+0x6d): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_append(char const*, unsigned long)'
/tmp/ccYRAxVP.o: In function _GLOBAL__sub_I__ZN4MMSP4nameB5cxx11ERKb': graingrowth.cpp:(.text.startup+0x3c): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::~basic_string()'
graingrowth.cpp:(.text.startup+0x5f): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()' /tmp/ccYRAxVP.o: In function main':
graingrowth.cpp:(.text.startup+0x1c5): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_first_not_of(char const*, unsigned long, unsigned long) const' graingrowth.cpp:(.text.startup+0x232): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::assign(char const*)'
graingrowth.cpp:(.text.startup+0x2c5): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*)' graingrowth.cpp:(.text.startup+0x310): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::find_first_not_of(char const*, unsigned long, unsigned long) const'
graingrowth.cpp:(.text.startup+0x340): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*)' graingrowth.cpp:(.text.startup+0x36b): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::find_first_not_of(char const*, unsigned long, unsigned long) const'
graingrowth.cpp:(.text.startup+0x41a): undefined reference to std::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char)' graingrowth.cpp:(.text.startup+0x436): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::substr(unsigned long, unsigned long) const'
graingrowth.cpp:(.text.startup+0x448): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const' graingrowth.cpp:(.text.startup+0x4a1): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::find_first_of(char const*, unsigned long, unsigned long) const'
graingrowth.cpp:(.text.startup+0x4bc): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_last_of(char const*, unsigned long, unsigned long) const' graingrowth.cpp:(.text.startup+0x4dd): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::find_last_of(char const*, unsigned long, unsigned long) const'
graingrowth.cpp:(.text.startup+0x4f7): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_first_of(char const*, unsigned long, unsigned long) const' graingrowth.cpp:(.text.startup+0x50b): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::substr(unsigned long, unsigned long) const'
graingrowth.cpp:(.text.startup+0x571): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_first_of(char const*, unsigned long, unsigned long) const' graingrowth.cpp:(.text.startup+0x589): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::find(char const*, unsigned long, unsigned long) const'
graingrowth.cpp:(.text.startup+0x5ab): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_last_of(char const*, unsigned long, unsigned long) const' graingrowth.cpp:(.text.startup+0x5c3): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::rfind(char, unsigned long) const'
graingrowth.cpp:(.text.startup+0x5e1): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned long, unsigned long) const' graingrowth.cpp:(.text.startup+0x63e): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::find_last_of(char const*, unsigned long, unsigned long) const'
graingrowth.cpp:(.text.startup+0x655): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned long, unsigned long) const' graingrowth.cpp:(.text.startup+0x68a): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_assign(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
graingrowth.cpp:(.text.startup+0x6fd): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_last_of(char const*, unsigned long, unsigned long) const' graingrowth.cpp:(.text.startup+0x71b): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::find_last_of(char const*, unsigned long, unsigned long) const'
graingrowth.cpp:(.text.startup+0x72f): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned long, unsigned long) const' graingrowth.cpp:(.text.startup+0x73f): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_assign(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
graingrowth.cpp:(.text.startup+0x772): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream(std::_Ios_Openmode)' graingrowth.cpp:(.text.startup+0x790): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits, std::allocator >::str() const'
graingrowth.cpp:(.text.startup+0x7bf): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()' graingrowth.cpp:(.text.startup+0x940): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::basic_stringstream(std::_Ios_Openmode)'
graingrowth.cpp:(.text.startup+0x959): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const' graingrowth.cpp:(.text.startup+0x9dd): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)'
graingrowth.cpp:(.text.startup+0xa0b): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::_M_sync(char*, unsigned long, unsigned long)' graingrowth.cpp:(.text.startup+0xaac): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits, std::allocator >::str() const'
graingrowth.cpp:(.text.startup+0xb1c): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const' graingrowth.cpp:(.text.startup+0xb4a): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits, std::allocator >::str() const'
graingrowth.cpp:(.text.startup+0xb85): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()' graingrowth.cpp:(.text.startup+0xbcc): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::~basic_stringstream()'
graingrowth.cpp:(.text.startup+0xcf6): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream(std::_Ios_Openmode)' graingrowth.cpp:(.text.startup+0xd0f): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits, std::allocator >::str() const'
graingrowth.cpp:(.text.startup+0xd95): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)' graingrowth.cpp:(.text.startup+0xdc3): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits, std::allocator >::_M_sync(char*, unsigned long, unsigned long)'
graingrowth.cpp:(.text.startup+0xe64): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const' graingrowth.cpp:(.text.startup+0xecc): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits, std::allocator >::str() const'
graingrowth.cpp:(.text.startup+0xefc): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const' graingrowth.cpp:(.text.startup+0xf35): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::~basic_stringstream()'
graingrowth.cpp:(.text.startup+0xf7c): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()' graingrowth.cpp:(.text.startup+0x1005): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::basic_stringstream(std::_Ios_Openmode)'
graingrowth.cpp:(.text.startup+0x101e): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const' graingrowth.cpp:(.text.startup+0x10a5): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)'
graingrowth.cpp:(.text.startup+0x10d3): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::_M_sync(char*, unsigned long, unsigned long)' graingrowth.cpp:(.text.startup+0x1174): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits, std::allocator >::str() const'
graingrowth.cpp:(.text.startup+0x11dc): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const' graingrowth.cpp:(.text.startup+0x120c): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits, std::allocator >::str() const'
graingrowth.cpp:(.text.startup+0x1245): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()' graingrowth.cpp:(.text.startup+0x128c): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::~basic_stringstream()'
graingrowth.cpp:(.text.startup+0x12a6): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()' graingrowth.cpp:(.text.startup+0x1349): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::find_last_of(char const*, unsigned long, unsigned long) const'
graingrowth.cpp:(.text.startup+0x1361): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::rfind(char const*, unsigned long, unsigned long) const' graingrowth.cpp:(.text.startup+0x1378): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::substr(unsigned long, unsigned long) const'
graingrowth.cpp:(.text.startup+0x13a7): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' graingrowth.cpp:(.text.startup+0x1431): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::find_last_of(char const*, unsigned long, unsigned long) const'
graingrowth.cpp:(.text.startup+0x1448): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned long, unsigned long) const' graingrowth.cpp:(.text.startup+0x1477): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_assign(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
graingrowth.cpp:(.text.startup+0x15b3): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_first_not_of(char const*, unsigned long, unsigned long) const' graingrowth.cpp:(.text.startup+0x1738): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::assign(char const*)'
graingrowth.cpp:(.text.startup+0x1763): undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_first_not_of(char const*, unsigned long, unsigned long) const' graingrowth.cpp:(.text.startup+0x17da): undefined reference to std::__cxx11::basic_string<char, std::char_traits, std::allocator >::find_first_not_of(char const*, unsigned long, unsigned long) const'
/tmp/ccYRAxVP.o: In function MMSP::grid<1, int>::input(char const*, int, int)': graingrowth.cpp:(.text._ZN4MMSP4gridILi1EiE5inputEPKcii[_ZN4MMSP4gridILi1EiE5inputEPKcii]+0x5f): undefined reference to std::basic_istream<char, std::char_traits >& std::getline<char, std::char_traits, std::allocator >(std::basic_istream<char, std::char_traits >&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, char)'
/tmp/ccYRAxVP.o: In function MMSP::grid<2, int>::input(char const*, int, int)': graingrowth.cpp:(.text._ZN4MMSP4gridILi2EiE5inputEPKcii[_ZN4MMSP4gridILi2EiE5inputEPKcii]+0x5f): undefined reference to std::basic_istream<char, std::char_traits >& std::getline<char, std::char_traits, std::allocator >(std::basic_istream<char, std::char_traits >&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, char)'
/tmp/ccYRAxVP.o: In function MMSP::grid<2, int>::output(char const*) const': graingrowth.cpp:(.text._ZNK4MMSP4gridILi2EiE6outputEPKc[_ZNK4MMSP4gridILi2EiE6outputEPKc]+0x12f): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::basic_stringstream(std::_Ios_Openmode)'
graingrowth.cpp:(.text._ZNK4MMSP4gridILi2EiE6outputEPKc[_ZNK4MMSP4gridILi2EiE6outputEPKc]+0x2d0): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const' graingrowth.cpp:(.text._ZNK4MMSP4gridILi2EiE6outputEPKc[_ZNK4MMSP4gridILi2EiE6outputEPKc]+0x336): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits, std::allocator >::str() const'
graingrowth.cpp:(.text._ZNK4MMSP4gridILi2EiE6outputEPKc[_ZNK4MMSP4gridILi2EiE6outputEPKc]+0x38d): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()' graingrowth.cpp:(.text._ZNK4MMSP4gridILi2EiE6outputEPKc[_ZNK4MMSP4gridILi2EiE6outputEPKc]+0x413): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::basic_stringstream(std::_Ios_Openmode)'
graingrowth.cpp:(.text._ZNK4MMSP4gridILi2EiE6outputEPKc[_ZNK4MMSP4gridILi2EiE6outputEPKc]+0x5de): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const' graingrowth.cpp:(.text._ZNK4MMSP4gridILi2EiE6outputEPKc[_ZNK4MMSP4gridILi2EiE6outputEPKc]+0x65c): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits, std::allocator >::str() const'
graingrowth.cpp:(.text._ZNK4MMSP4gridILi2EiE6outputEPKc[_ZNK4MMSP4gridILi2EiE6outputEPKc]+0x714): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()' graingrowth.cpp:(.text._ZNK4MMSP4gridILi2EiE6outputEPKc[_ZNK4MMSP4gridILi2EiE6outputEPKc]+0x161d): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::~basic_stringstream()'
graingrowth.cpp:(.text._ZNK4MMSP4gridILi2EiE6outputEPKc[_ZNK4MMSP4gridILi2EiE6outputEPKc]+0x16fd): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()' /tmp/ccYRAxVP.o: In function MMSP::grid<1, int>::output(char const*) const':
graingrowth.cpp:(.text._ZNK4MMSP4gridILi1EiE6outputEPKc[_ZNK4MMSP4gridILi1EiE6outputEPKc]+0x12e): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream(std::_Ios_Openmode)' graingrowth.cpp:(.text._ZNK4MMSP4gridILi1EiE6outputEPKc[_ZNK4MMSP4gridILi1EiE6outputEPKc]+0x276): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits, std::allocator >::str() const'
graingrowth.cpp:(.text._ZNK4MMSP4gridILi1EiE6outputEPKc[_ZNK4MMSP4gridILi1EiE6outputEPKc]+0x2dc): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const' graingrowth.cpp:(.text._ZNK4MMSP4gridILi1EiE6outputEPKc[_ZNK4MMSP4gridILi1EiE6outputEPKc]+0x333): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::~basic_stringstream()'
graingrowth.cpp:(.text._ZNK4MMSP4gridILi1EiE6outputEPKc[_ZNK4MMSP4gridILi1EiE6outputEPKc]+0x3b9): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream(std::_Ios_Openmode)' graingrowth.cpp:(.text._ZNK4MMSP4gridILi1EiE6outputEPKc[_ZNK4MMSP4gridILi1EiE6outputEPKc]+0x52f): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits, std::allocator >::str() const'
graingrowth.cpp:(.text._ZNK4MMSP4gridILi1EiE6outputEPKc[_ZNK4MMSP4gridILi1EiE6outputEPKc]+0x5ad): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const' graingrowth.cpp:(.text._ZNK4MMSP4gridILi1EiE6outputEPKc[_ZNK4MMSP4gridILi1EiE6outputEPKc]+0x665): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::~basic_stringstream()'
graingrowth.cpp:(.text._ZNK4MMSP4gridILi1EiE6outputEPKc[_ZNK4MMSP4gridILi1EiE6outputEPKc]+0x151e): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()' graingrowth.cpp:(.text._ZNK4MMSP4gridILi1EiE6outputEPKc[_ZNK4MMSP4gridILi1EiE6outputEPKc]+0x15fe): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::~basic_stringstream()'
/tmp/ccYRAxVP.o: In function MMSP::grid<3, int>::output(char const*) const': graingrowth.cpp:(.text._ZNK4MMSP4gridILi3EiE6outputEPKc[_ZNK4MMSP4gridILi3EiE6outputEPKc]+0x12f): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::basic_stringstream(std::_Ios_Openmode)'
graingrowth.cpp:(.text._ZNK4MMSP4gridILi3EiE6outputEPKc[_ZNK4MMSP4gridILi3EiE6outputEPKc]+0x2ad): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const' graingrowth.cpp:(.text._ZNK4MMSP4gridILi3EiE6outputEPKc[_ZNK4MMSP4gridILi3EiE6outputEPKc]+0x313): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits, std::allocator >::str() const'
graingrowth.cpp:(.text._ZNK4MMSP4gridILi3EiE6outputEPKc[_ZNK4MMSP4gridILi3EiE6outputEPKc]+0x36a): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()' graingrowth.cpp:(.text._ZNK4MMSP4gridILi3EiE6outputEPKc[_ZNK4MMSP4gridILi3EiE6outputEPKc]+0x3f0): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::basic_stringstream(std::_Ios_Openmode)'
graingrowth.cpp:(.text._ZNK4MMSP4gridILi3EiE6outputEPKc[_ZNK4MMSP4gridILi3EiE6outputEPKc]+0x58f): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const' graingrowth.cpp:(.text._ZNK4MMSP4gridILi3EiE6outputEPKc[_ZNK4MMSP4gridILi3EiE6outputEPKc]+0x60c): undefined reference to std::__cxx11::basic_stringbuf<char, std::char_traits, std::allocator >::str() const'
graingrowth.cpp:(.text._ZNK4MMSP4gridILi3EiE6outputEPKc[_ZNK4MMSP4gridILi3EiE6outputEPKc]+0x6c4): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()' graingrowth.cpp:(.text._ZNK4MMSP4gridILi3EiE6outputEPKc[_ZNK4MMSP4gridILi3EiE6outputEPKc]+0x15cd): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::~basic_stringstream()'
graingrowth.cpp:(.text._ZNK4MMSP4gridILi3EiE6outputEPKc[_ZNK4MMSP4gridILi3EiE6outputEPKc]+0x16ad): undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()' /tmp/ccYRAxVP.o: In function MMSP::grid<3, int>::input(char const*, int, int)':
graingrowth.cpp:(.text._ZN4MMSP4gridILi3EiE5inputEPKcii[_ZN4MMSP4gridILi3EiE5inputEPKcii]+0x62): undefined reference to `std::basic_istream<char, std::char_traits >& std::getline<char, std::char_traits, std::allocator >(std::basic_istream<char, std::char_traits >&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, char)'
collect2: error: ld returned 1 exit status
Makefile:19: recipe for target 'parallel' failed
make: *** [parallel] Error 1
3 seconds

Warning issued when compiling mmsp/utility MC2sPF

Not sure how concerning, but I figured I'd report it:

g++ -O2 -Wall -pedantic -I ../include/ MC2sPF.cpp -o MC2sPF -lz
MC2sPF.cpp: In function β€˜int main(int, char**)’:
MC2sPF.cpp:91:17: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
if (not fields == 1) {
^

Implicit casting error in GCC 6.4.0

  • Bug appears in /MMSP/utilities/mmsp2z.cpp
  • Encountered running on Windows in Cygwin

In mmsp2z.cpp, the function fexists implicitly converts the std::ifstream object ifile to a bool in line 11. This raises an issue for my version of GCC (6.4.0) during compilation, as it cannot convert ifstream to bool implicitly. However, changing the line from "return ifile;" to "return !!ifile;" works, as the explicit cast is accepted by the compiler.

Error in serial grid constructor in anisotropic solidification example

The grid constructor used on line 53 of solidification.cpp, static grid<dim,T> refGrid(oldGrid,0);, in the anisotropic solidification example creates non-physical values at several nodes of the grid, regardless of changing grid dimensions and other parameters. This error does not occur when compiling the parallel version.

Style and contribution guidelines

Briefly summarize the MMSP source code style/formatting and how to maximize the chances that a contributed patch will be acceptable. Outline proper usage of the build_examples.sh script, for local testing before uploading to GitHub.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.