Commit Graph
129 Commits
Author SHA1 Message Date
Tzanio 05125e19d5 Removed a space 2020-03-09 15:36:41 -07:00
Tzanio 58872c9e7b Merge branch 'master' into okina-mmu
Conflicts:
	fem/datacollection.cpp
	tests/unit/CMakeLists.txt
2020-03-04 15:19:33 -08:00
Tzanio ca55ef0217 The release number for mfem-4.1 is LLNL-CODE-806117 2020-03-02 17:18:46 -08:00
Tzanio 88a78bb6aa Merge branch 'master' into bsd-relicense
Conflicts:
	CONTRIBUTING.md
2020-03-02 09:28:37 -08:00
camierjs e4d0496931 Merge branch 'master' into okina-mmu 2020-02-29 10:20:37 -08:00
Tzanio 2caa222edf A number of changes to switch the code from LGPL-2.1 to BSD-3:
- Updated LICENSE, README, CHANGELOG and CONTRIBUTING.md
- Removed COPYRIGHT, added NOTICE
- Updated the headers in all source files, makefiles, etc.
2020-02-23 11:16:46 -08:00
camierjs 519a0cbb10 Revert to keep the verify and device disable 2020-02-18 14:32:06 -08:00
camierjs 39d6614642 Revert sample-runs and examples
HIP managed addons
Sparsmat transpose on host
2020-02-18 11:52:00 -08:00
camierjs 4eecaf7625 Revert transpose kernel to stay on host for the atomics 2020-02-15 08:37:13 -08:00
Veselin Dobrev 9499d49e9f Variour tweaks and simplifications, coordinated with @camierjs. 2020-02-14 16:25:40 -08:00
Dylan Copeland a02409f8c9 Removed absolute value in diagonal assembly, by using a new MultTransposeUnsigned function in ElementRestriction. Made some changes for gpu support. 2020-02-03 09:58:28 -08:00
camierjs 0aee38c60c All serial examples with valgrind and debug/host32 allocators 2020-01-31 18:51:31 -08:00
camierjs 8b667b09c4 Simplify MFEM_ENV_DEVICE logic 2020-01-30 10:21:58 -08:00
camierjs 88c40b9705 Wrap picks existing registered host memory type or fall back to MemoryType::HOST 2020-01-29 14:20:10 -08:00
camierjs 764b34c1a8 Cleanup + all tests 2020-01-28 17:44:28 -08:00
camierjs 822e2be19d Merge branch 'master' into okina-mmu 2020-01-21 20:35:44 -08:00
Tzanio 5534584ef8 Merge branch 'master' into rectop-bc-dev 2020-01-08 16:44:22 -08:00
camierjs 47f2aa0de7 Merge branch 'master' into okina-mmu 2019-12-16 17:59:40 -08:00
camierjs bf2d1eb59a Cuda, debug examples but last mt 2019-11-25 15:31:54 -08:00
Julian Andrej c84af9586d first step picking hunks for rectangular operators 2019-11-18 16:49:44 -08:00
Veselin Dobrev 6e457ec497 Fix a few issues related to using the classes SparseMatrix,
HypreParVector, HypreParMatrix, and HypreSmoother with GPU backends.

Add 2 versions of a new method: Vector::MakeRef -- one that takes
a Vector and an offset and another that takes a Vector, an offset
and a new size.

Add some simple debugging tools:
 * Add a new output "trace" stream: mfem::trc. By default, the output
   of mfem::trc goes to std::cout; the new function mfem::OpenTraceFile()
   can be used to redirect the output of mfem::trc to a file called
   'mfem-trace-<pid>' where <pid> is the process id. Note that this
   function can be called from a debugger.
 * In class Vector, add a new method Vector::PrintTrace() that prints a
   Vector to the mfem::trc stream -- this method can be called from a
   debugger, unlike Vector::Print with mfem::trc as argument (at least
   in gdb this did not work).
 * In class Memory<T>, add 2 new methods: PrintFlags() and
   CompareHostAndDevice() which are explicitly instantiated for T=int
   and T=double, so that they can be called inside a debugger for
   these two types.
2019-06-17 18:55:17 -07:00
camierjs bd08fa9592 Merge branch 'memory-dev' of github.com:mfem/mfem into memory-dev 2019-05-24 14:21:12 -07:00
camierjs 283264ade4 {Read,Write,ReadWrite}Access => {Read,Write,ReadWrite}
Add shortcut for Host{Read,Write,ReadWrite}
2019-05-24 14:08:45 -07:00
Tzanio e36d1ea8fd Several change to (hopefully) simplify the interface:
* The parameter of Vector::UseDevice(bool) no longer has a default value. All
  the calls to UseDevice() in operator.cpp bilinearform_ext.cpp gridfunc.?pp and
  linearform.?pp have been replaced with UseDevice(true).

* Added shortcuts for the device flags of the Memory objects inside the Vector
  and Array classes:

    bool Array::UseDevice()
    bool Vector::UseDevice()

* The internal device flag in Memory::FlagMask is now called USE_DEVICE (it was
  previously called EXEC_FLAG). The accessor function for this flag have been
  renamed:

    bool Memory::GetExecFlag()     -> bool Memory::UseDevice()
    void Memory::SetExecFlag(bool) -> void Memory::UseDevice(bool)

* Further renamed:

    Memory::SyncWith         -> Memory::Sync
    Memory::SyncAliasToBase  -> Memory::SyncAlias
    Memory::SyncAliasToBase_ -> Memory::SyncAlias_

* Replaced FIXME with TODO in general/mem_manager.cpp
2019-05-24 14:01:15 -07:00
Veselin Dobrev 798ded1f55 Merge branch 'master' into memory-dev 2019-05-22 23:53:04 -07:00
Veselin Dobrev 534bf51466 Addressing some of the PR feedback. 2019-05-21 02:19:05 -07:00
Veselin Dobrev 31f2ce99cc Some small tweaks and additions related to the classes Memory and
MemoryManager.
2019-05-17 16:26:20 -07:00
Veselin Dobrev 40378a046b Introduce a new Memory class for handling host + device allocations
and transfers.

The Memory class is now used by some MFEM classes (like Array and
Vector) which can be used on the Device. Such classes now provide
methods to access the underlying Memory object, e.g. GetMemory.

Updated ex1/ex1p and ex6/ex6p to not need to enable/disable the
Device at specific points -- the Device is now enabled just at the
start. Also, the same examples can now run on Device (e.g. -d cuda)
without the partial assembly option (-pa) -- full assembly will
be still done on CPU but the sparse matrix action and vector
operations will be done using the Device.

Reverted changes in class DenseMatrix related to using the Device.
At this point, DenseMatrix operations are only used for small matrices
and using the Device in this case is not a good option.
2019-05-16 14:53:39 -07:00
Tzanio 5b00c3d0e6 Merge branch 'master' into stefanozampini/small-improvements
Conflicts:
	fem/bilininteg.hpp
2019-05-15 11:38:18 -07:00
Veselin Dobrev 5b5769dea3 In class SparseMatrix:
* Add methods BuildTranspose() and ResetTranspose() that control
  the use of the internal transpose matrix, At.
* The method AddMultTranspose() will always use At, if it is built.
  If At is not build and the Device is enabled, an error will be
  generated pointing to BuildTranspose().
* Introduce separate non-const and const versions of the methods
  GetI(), GetJ(), and GetData().
* Made the method ActualWidth() const.
* Some edits in the documentation, the code formatting, and the
  error messages.

In the method BilinearForm::FormLinearSystem(), call the method
SparseMatrix::BuildTranspose() for the nonconforming prolongation
matrix, when necessary.
2019-04-23 17:48:40 -07:00
Tzanio dbaa40a116 Renamed tA to At 2019-04-19 12:31:58 -07:00
camierjs 06ee78f67c Switch to use Device::IsEnable 2019-04-19 10:59:01 -07:00
camierjs be8eac8997 Keep legacy AddMultTranspose code for non-accelerated runs 2019-04-19 10:16:02 -07:00
camierjs 890579e228 Cleanup and add a self-transposed sparse matrix that is used 2019-04-19 09:48:15 -07:00
camierjs ceb8bb1417 Remove AtomicAdd from sparsemat AddMultTranspose 2019-04-18 18:21:06 -07:00
Stefano Zampini 6c129fc80d rename SparseMatrix::Chop -> SparseMatrix::Threshold 2019-04-10 11:33:03 +03:00
Tzanio a28a779df1 Merge branch 'okina' into okina-mm-object
Conflicts:
        fem/bilininteg_ext.cpp
        general/mem_manager.cpp
	general/mem_manager.hpp
	general/occa.cpp
2019-04-09 19:19:45 -07:00
camierjs 2020335b50 Renaming + free functions in mfem namespace 2019-04-09 18:17:00 -07:00
Tzanio a49cd5df97 Merge branch 'okina-device-tweaks' into okina-rename
Conflicts:
        fem/bilinearform_ext.cpp
        fem/bilininteg_ext.cpp
        general/cuda.cpp
2019-04-09 18:08:44 -07:00
camierjs 94c5397c7d Remove the memory manager singleton 2019-04-09 17:12:20 -07:00
camierjs 471eba4d2d Move Device::Tracking to mm::Enable/Disable
Swap lasts +=1 for ++
2019-04-09 11:42:12 -07:00
Tzanio e0c45fb9d4 Reserve okina name for future kernel interface 2019-04-08 23:39:10 -07:00
Johann Dahm e357792bf0 Merge branch 'okina' into openmp-warning-dev 2019-04-05 16:18:14 -06:00
Johann Dahm a2614ad20f MFEM_USE_OPENMP -> MFEM_USE_LEGACY_OPENMP 2019-04-04 20:26:38 -07:00
Johann Dahm 8409f6e819 Revert "Renamed the old OpenMP support option to MFEM_LEGACY_USE_OPENP, so"
This reverts commit 575f351419.
2019-04-04 20:25:45 -07:00
Jean-Sylvain Camier bcf4761318 Simplify the use of mm::ptr 2019-04-04 20:24:31 -07:00
Tzanio 575f351419 Renamed the old OpenMP support option to MFEM_LEGACY_USE_OPENP, so
MFEM_LEGACY_OPENMP can be used for OpenMP support in the Okina kernels.
2019-04-04 19:50:46 -07:00
Will Pazner a5ecb742a0 Revert to using new and delete
Also rename mm::malloc to mm::New and mm::free to mm::Delete.
2019-04-04 13:44:10 -07:00
camierjs a920632877 Merge branch 'okina' into okina-free-malloc 2019-04-04 11:52:53 -07:00
camierjs 8a4ae9a556 Rework include hierarchy not to present cuda/occa internal headers
Separate dvector3 from dtensor because it is used in coefficient.hpp
2019-04-04 11:45:46 -07:00