Skip to content

Commit

Permalink
Merge pull request #8 from cdslaborg/dev
Browse files Browse the repository at this point in the history
Resolves #3, resolves #4, resolves #5
  • Loading branch information
shahmoradi authored Dec 18, 2020
2 parents 3a76a06 + 9a59b3f commit c8a5634
Show file tree
Hide file tree
Showing 197 changed files with 13,797 additions and 4,207 deletions.
2 changes: 1 addition & 1 deletion .VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1.4.2
1.5.0
# ParaMonte core library version file.
# This version number should be incremented
# only when the version has been released.
Expand Down
20 changes: 11 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,22 @@ Thumbs.db
#########################

**/src/kernel/ParaMonte_mod@version@kernel.inc.f90
**/paramonte-kernel-doc
**/.ipynb_checkpoints
**/benchmark
**/codecov
**/.ipynb_checkpoints/*
**/benchmark/*
**/build/*
**/trash/*
**/temp/*
**/bin/*
**/R/*
**/___*___/*
**/build
**/trash
**/temp
**/bin
**/R
**/___*___

#########################
# ParaMonte temp files
#########################

*sc.html
*_log.txt
*_time.txt
*_chain.txt
Expand Down Expand Up @@ -189,8 +191,8 @@ _deps
# documentation
#########################

**/paramonte-kernel-doc/*
**/devscripts/*
**/doxygen/*
**/draft/*
**/doc/*

Expand Down
62 changes: 56 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@ cache:
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew

after_success:
#- bash <(curl -s https://codecov.io/bash)
- bash <(curl --connect-timeout 10 --retry 10 --retry-max-time 0 https://codecov.io/bash) || (sleep 30 && bash <(curl --connect-timeout 10 --retry 10 --retry-max-time 0 https://codecov.io/bash))

matrix:
include:

################################################################################################################################
#### linux test latest release
################################################################################################################################

- os: linux
dist: trusty
addons:
Expand Down Expand Up @@ -50,6 +58,10 @@ matrix:
- cd libparamonte_cpp_linux_x64_gnu_release_dynamic_heap_mpi && ./build.sh && ./run.sh --nproc 2 && cd ..
- cd libparamonte_fortran_linux_x64_gnu_release_dynamic_heap_mpi && ./build.sh && ./run.sh --nproc 2 && cd ..

################################################################################################################################
#### linux complete build
################################################################################################################################

- os: linux
dist: trusty
addons:
Expand Down Expand Up @@ -99,6 +111,34 @@ matrix:
#- cd ${pmRootDir}/bin/libparamonte_cpp_linux_x64_gnu_release_dynamic_heap_mpi && ./build.sh && ./run.sh --nproc 2
#- cd ${pmRootDir}/bin/libparamonte_fortran_linux_x64_gnu_release_dynamic_heap_mpi && ./build.sh && ./run.sh --nproc 2

################################################################################################################################
#### code coverage
################################################################################################################################

- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- lcov
- cmake
- gcc-9
- gfortran-9
- libmpich-dev
- mpich
script:
- echo "FCFLAG = ${FCFLAG}"
- cmake --version || echo "cmake not found..."
- gfortran --version && FCFLAG="-f $(which gfortran)" || echo "gfortran not found..."
- gfortran-9 --version && FCFLAG="-f $(which gfortran-9)" || echo "gfortran-9 not found..."
- ./install.sh --codecov --par none --yes-to-all ${FCFLAG}

################################################################################################################################
#### macOS
################################################################################################################################

- &macOS
os: osx
osx_image: xcode12
Expand All @@ -122,12 +162,22 @@ matrix:
- ./install.sh --lang "C C++ Fortran" --build release --lib dynamic --mem heap --par "none mpi" #-s gnu
- pmRootDir=$(pwd)
- ls ${pmRootDir}/bin/
- cd ${pmRootDir}/bin/libparamonte_c_darwin_x64_gnu_release_dynamic_heap && ls && ./build.sh && ./run.sh
- cd ${pmRootDir}/bin/libparamonte_cpp_darwin_x64_gnu_release_dynamic_heap && ls && ./build.sh && ./run.sh
- cd ${pmRootDir}/bin/libparamonte_fortran_darwin_x64_gnu_release_dynamic_heap && ls && ./build.sh && ./run.sh
- cd ${pmRootDir}/bin/libparamonte_c_darwin_x64_gnu_release_dynamic_heap_mpi && ls && ./build.sh && ./run.sh --nproc 2
- cd ${pmRootDir}/bin/libparamonte_cpp_darwin_x64_gnu_release_dynamic_heap_mpi && ls && ./build.sh && ./run.sh --nproc 2
- cd ${pmRootDir}/bin/libparamonte_fortran_darwin_x64_gnu_release_dynamic_heap_mpi && ls && ./build.sh && ./run.sh --nproc 2
- |
for buildDir in ${pmRootDir}/bin/*; do
echo ""
echo "Running example in ${buildDir}"
echo ""
if [[ "${dir}" =~ .*"_impi".* || "${dir}" =~ .*"_mpich".* || "${dir}" =~ .*"_openmpi".* ]]; then
cd ${buildDir} && ls && ./build.sh && ./run.sh --nproc 2
else
cd ${buildDir} && ls && ./build.sh && ./run.sh
fi
cd "${pmRootDir}"
done
####################################################################################################################################
#### OTHER
####################################################################################################################################

# - &macOS
# os: osx
Expand Down
5 changes: 1 addition & 4 deletions ACKNOWLEDGMENT.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
**The ParaMonte library is an honor-ware and its currency is acknowledgment and citations**.

As per the ParaMonte library license agreement terms, if you use any parts of
this library for any purposes, kindly acknowledge the use of ParaMonte in your
work (education/research/industry/development/...) by citing the ParaMonte
library's main publications as listed here:
If you use ParaMonte, please acknowledge it by citing the ParaMonte library's main publications as listed here:

### The ParaMonte Python library

Expand Down
28 changes: 21 additions & 7 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,20 @@ To access the latest release of the package, visit [the ParaMonte GitHub reposit

## **Version 1.x.x**

### **Version 1.4.2** -- November 27, 2020
### **Version 1.5** -- Dec 17, 2020

**Enhancements**
**Major Enhancements**

+ This version introduces numerous performance and accuracy enhancements to the ParaMonte library.
+ The entire kernel library is now fully documented and verified with over 866 tests that cover close
to 100% of all lines and functions in the kernel.
+ New prebuilt libraries with GNU compilers and Open-MPI on Linux are added.
+ New flags are now added to the build scripts of the library that automate the process of code coverage generation.
+ The `testing` builds are now removed from the ParaMonte release page as this build is mostly useful for development purposes.
+ The issue of Windows file locking, that led to the occasional crashes of the
ParaDRAM and ParaDISE simulations in `multiChain` parallelism mode, is now resolved.

**Minor Enhancements**

+ Minor enhancements to the ParaMonte C/C++/Fortran example build scripts `build.sh` and `build.bat`.
+ The default build settings are now limited to `heap` memory allocation with `dynamic` library builds
Expand All @@ -17,23 +28,26 @@ To access the latest release of the package, visit [the ParaMonte GitHub reposit
build the library with `stack` memory allocation by specifying the appropriate build flags with
the `install.sh` on Unix or `install.bat` script on Windows systems. For further information,
see the installation guidelines on the ParaMonte documentation website.
+ The temporary array creations in debug mode are now resolved.
+ All temporary array creations in debug mode are now resolved,
except when Intel compilers are used, in which case, the debug warning messages are silenced.

**Compiler support**
**Compiler Compatibility**

| Compiler Suite | Windows (64bit) | Linux | macOS |
|----------------------------------:|:---------------:|:-----:|:-----:|
| GNU Compiler Collection > 8.4 ||||
| Intel Parallel Studio > 18.0.0 ||||
| Intel Parallel Studio > 19.1.1 ||||
| Microsoft C/C++ Compiler > 16.0.0 ||||

**Compiler / MPI library used for this binary release**

+ **Windows**: Intel Parallel Studio Version 19.0.4.245 Build 20190417 / Intel(R) MPI Library 2019 Update 4 for Windows
+ **Linux**: Intel Parallel Studio Version 18.0.2 20180210 / Intel(R) MPI Library for Linux OS, Version 2018 Update 2 Build 20180125
+ **Windows**: Intel Parallel Studio Version 19.1.1.216 Build 20200306 / Intel(R) MPI Library 2019 Update 7 for Windows
+ **Linux**: Intel Parallel Studio Version 19.1.1.217 20200306 / Intel(R) MPI Library for Linux OS, Version 2019 Update 7 Build 20200312
+ **Linux**: GNU 10.2.0 / Open-MPI 4.0.3
+ **Linux**: GNU 10.1.0 / MPICH 3.2
+ **macOS**: Intel Parallel Studio Version 19.1.0.216 20200306
+ **macOS**: GNU 10.2.0 / Open-MPI 4.0.5
+ **macOS**: GNU 10.2.0 / MPICH 3.3.2

### **Version 1.4.1** -- November 15, 2020

Expand Down
52 changes: 38 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ endif()

set(pmcolor "${BoldCyan}")
set(pmattn " ${pmcolor}ParaMonte -${ColorReset}")
set(pmnote "${pmattn} ${BoldMagenta}NOTE:${ColorReset}")
set(pmwarn "${pmattn} ${BoldYellow}WARNING:${ColorReset}")
set(pmnote "${pmattn} ${BoldYellow}NOTE:${ColorReset}")
set(pmwarn "${pmattn} ${BoldMagenta}WARNING:${ColorReset}")
set(pmfatal "${pmattn} ${BoldRed}FATAL ERROR:${ColorReset}")

#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Expand All @@ -139,7 +139,7 @@ if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
" $ buildDir=$(uname -s)$(uname -m) # set build folder to OS name + architecture\n"
" $ mkdir $\{buildDir\}\n"
" $ cd $\{buildDir\}\n"
" $ CC=gcc FC=gfortran cmake -DBUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/path/to/install/dir /path/to/ParaMonte/kernel/src/dir\n\n"
" $ CC=gcc CMAKE_Fortran_COMPILER=gfortran cmake -DBUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/path/to/install/dir /path/to/ParaMonte/kernel/src/dir\n\n"
" substituting the appropriate syntax for your shell (the above line assumes the bash shell)."
)
endif()
Expand Down Expand Up @@ -254,7 +254,7 @@ else()
endif()
string(TOLOWER ${COMPILER_SUITE} COMPILER_SUITE)

message(STATUS "CMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}")
message(STATUS "${pmattn} CMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}")

#if(DEFINED CMAKE_BUILD_TYPE AND "${CMAKE_BUILD_TYPE}" MATCHES "[Rr][Ee][Ll]") # release mode requested
# if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
Expand Down Expand Up @@ -447,6 +447,10 @@ set(ParaMonteTest_SRC_DIR
"${CMAKE_SOURCE_DIR}/src/kernel/tests"
CACHE PATH "ParaMonte test source files directory" )

set(ParaMonteTest_SRC_INPUT_DIR
"${ParaMonteTest_SRC_DIR}/input"
CACHE PATH "ParaMonte test source files directory" )

# set the ParaMonte interface source files directory and loop over them to ensure their existence

set(ParaMonteInterface_SRC_DIR
Expand Down Expand Up @@ -561,16 +565,17 @@ endif()
#set(ParaMonteTest_BIN_DIR "${ParaMonteTest_BLD_DIR}")
set(ParaMonteTest_BIN_DIR "${ParaMonteTest_BLD_DIR}/bin")
message( STATUS "${pmattn} ParaMonteTest_BIN_DIR: ${ParaMonteTest_BIN_DIR}" )
file(REMOVE_RECURSE "${ParaMonteTest_BIN_DIR}/")
if (NOT EXISTS "${ParaMonteTest_BIN_DIR}/")
file(MAKE_DIRECTORY "${ParaMonteTest_BIN_DIR}")
endif()

# set up test bin directory

set(ParaMonteTest_INPUT_DIR "${ParaMonteTest_BIN_DIR}/input")
message( STATUS "${pmattn} ParaMonteTest_INPUT_DIR: ${ParaMonteTest_INPUT_DIR}" )
if (NOT EXISTS "${ParaMonteTest_INPUT_DIR}/")
file(MAKE_DIRECTORY "${ParaMonteTest_INPUT_DIR}")
set(ParaMonteTest_BIN_INPUT_DIR "${ParaMonteTest_BIN_DIR}/input")
message( STATUS "${pmattn} ParaMonteTest_BIN_INPUT_DIR: ${ParaMonteTest_BIN_INPUT_DIR}" )
if (NOT EXISTS "${ParaMonteTest_BIN_INPUT_DIR}/")
file(MAKE_DIRECTORY "${ParaMonteTest_BIN_INPUT_DIR}")
endif()

#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Expand All @@ -585,7 +590,26 @@ endif()
set(ParaMonteTest_EXE_NAME testParaMonte)

# Define the library name
if (NOT DEFINED PMLIB)
if (NOT DEFINED PMLIB_NAME)

# \todo
# This library name definition requires further enhancement to match the name defined by the bash installer, whenever cmake is used directly.

message ( WARNING
" \n"
" ${pmwarn} The ParaMonte Library name is not predefined.\n"
" ${pmwarn} This is highly unusual and should not happen.\n"
" ${pmwarn} Normally, the library name is defined by the ParaMonte installer \n"
" ${pmwarn} or passed to cmake for abuild via cmake. The most likely cause of this\n"
" ${pmwarn} warning message is that you are either building the library directly via\n"
" ${pmwarn} cmake and forgot to predefine the library name or, the Bash installation that you\n"
" ${pmwarn} are using is corrupted. If the latter is the case, please report the issue at:\n"
" ${pmwarn} \n"
" ${pmwarn} https://github.com/cdslaborg/paramonte/issues,\n"
" ${pmwarn} \n"
" ${pmwarn} to resolve it. Note that even if the library might be properly built, the naming \n"
" ${pmwarn} used might not follow the conventional naming rules of the ParaMonte library.\n"
)

if (HEAP_ARRAY_ENABLED)
set(MEMORY_ALLOCATION heap)
Expand All @@ -606,22 +630,22 @@ if (NOT DEFINED PMLIB)
else()
set(LANG_ABBR ${INTERFACE_LANGUAGE})
endif()
set(PMLIB paramonte_${LANG_ABBR}_${PLATFORM}_${ARCHITECTURE}_${PMCS}_${BTYPE}_${LTYPE}_${MEMORY_ALLOCATION} )
set(PMLIB_NAME paramonte_${LANG_ABBR}_${PLATFORM}_${ARCHITECTURE}_${PMCS}_${BTYPE}_${LTYPE}_${MEMORY_ALLOCATION} )

if (CAF_ENABLED)
set(PMLIB ${PMLIB}_caf${CAFTYPE})
set(PMLIB_NAME ${PMLIB_NAME}_caf${CAFTYPE})
endif()

if (MPI_ENABLED)
set(PMLIB ${PMLIB}_mpi)
set(PMLIB_NAME ${PMLIB_NAME}_mpi)
endif()

if (OMP_ENABLED)
set(PMLIB ${PMLIB}_omp)
set(PMLIB_NAME ${PMLIB_NAME}_omp)
endif()

#if (MT_ENABLED)
# set(PMLIB ${PMLIB}_mt)
# set(PMLIB_NAME ${PMLIB_NAME}_mt)
#endif()

endif()
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Currently, the following compiler suites are supported for builds from source:
| Compiler Suite | Linux | macOS | Windows (64bit) |
|----------------------------------:|:-----:|:-----:|:---------------:|
| GNU Compiler Collection > 8.4 |&check;|&check;| &cross; |
| Intel Parallel Studio > 18.0.0 |&check;|&check;| &check; |
| Intel Parallel Studio > 19.0.4 |&check;|&check;| &check; |

For more information and quick-start in the programming language of your choice, visit the [ParaMonte library homepage](https://www.cdslab.org/paramonte).

Expand Down Expand Up @@ -133,9 +133,8 @@ Citing ParaMonte

The ParaMonte library is an honor-ware and its currency is acknowledgment and citations.

As per the ParaMonte library license agreement terms, if you use any parts of this library for any purposes,
kindly acknowledge the use of the ParaMonte library in your work (education/research/industry/development/...)
by citing the ParaMonte library's main publications as listed in [ACKNOWLEDGMENT.md](https://github.com/cdslaborg/paramonte/blob/master/ACKNOWLEDGMENT.md).
If you use ParaMonte, please acknowledge it by citing the ParaMonte library's main publications
as listed in [ACKNOWLEDGMENT.md](https://github.com/cdslaborg/paramonte/blob/master/ACKNOWLEDGMENT.md).

Visit [the ParaMonte library homepage](https://www.cdslab.org/paramonte/notes/overview/preface/#how-to-acknowledge-the-use-of-the-paramonte-library-in-your-work)
to access the PDF version of these files free of charge.
Expand Down
Empty file modified auxil/btar.sh
100644 → 100755
Empty file.
7 changes: 3 additions & 4 deletions auxil/genReadme.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def getLogFunc(point): return -0.5 * np.sum( point**2 )
| Compiler Suite | Linux | macOS | Windows (64bit) |
|----------------------------------:|:-----:|:-----:|:---------------:|
| GNU Compiler Collection > 8.4 |&check;|&check;| &cross; |
| Intel Parallel Studio > 18.0.0 |&check;|&check;| &check; |
| Intel Parallel Studio > 19.0.4 |&check;|&check;| &check; |
For more information and quick-start in the programming language of your choice, visit the [ParaMonte library homepage](https://www.cdslab.org/paramonte).
"""
Expand Down Expand Up @@ -318,9 +318,8 @@ def getLogFunc(point): return -0.5 * np.sum( point**2 )
readme["citation"]["main"] = readme["citation"]["title"] + """
The ParaMonte library is an honor-ware and its currency is acknowledgment and citations.
As per the ParaMonte library license agreement terms, if you use any parts of this library for any purposes,
kindly acknowledge the use of the ParaMonte library in your work (education/research/industry/development/...)
by citing the ParaMonte library's main publications as listed in [ACKNOWLEDGMENT.md](https://github.com/cdslaborg/paramonte/blob/master/ACKNOWLEDGMENT.md).
If you use ParaMonte, please acknowledge it by citing the ParaMonte library's main publications
as listed in [ACKNOWLEDGMENT.md](https://github.com/cdslaborg/paramonte/blob/master/ACKNOWLEDGMENT.md).
Visit [the ParaMonte library homepage](https://www.cdslab.org/paramonte/notes/overview/preface/#how-to-acknowledge-the-use-of-the-paramonte-library-in-your-work)
to access the PDF version of these files free of charge.
Expand Down
8 changes: 6 additions & 2 deletions auxil/testMPI.f90
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,16 @@ program testMPI

integer(IK) :: ierrMPI, imageID, imageCount
logical :: isInitialized


logical :: isFinalized

call mpi_initialized( isInitialized, ierrMPI )
if (.not. isInitialized) call mpi_init(ierrMPI)
call mpi_comm_rank(mpi_comm_world, imageID, ierrMPI)
call mpi_comm_size(mpi_comm_world, imageCount, ierrMPI)
call mpi_finalized( isFinalized, ierrMPI )
if (.not. isFinalized) then
call mpi_barrier(mpi_comm_world,ierrMPI)
call mpi_finalize(ierrMPI)
end if

end program testMPI
Loading

0 comments on commit c8a5634

Please sign in to comment.