Skip to content

urbanjost/M_sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Name

M_sort - Fortran modules for sorting

Description

The M_sort(3fm) module is a collection of Fortran procedures that do simple sorts.


gmake

Building the Module using make(1)

Just download the github repository, enter the src/ directory and run make(1):

     git clone https://github.com/urbanjost/M_sort.git
     cd M_sort/src
     # change Makefile if not using one of the listed compilers

     # for gfortran
     make clean
     make gfortran

     # for ifort
     make clean
     make ifort

     # for nvfortran
     make clean
     make nvfortran

     # optionally
     make run  # run all the demo programs from the man-pages
     make help # see other developer options

This will compile the M_sort(3f) module and optionally build all the example programs from the document pages in the example/ sub-directory and run the unit tests.


-

Build and Test with FPM

(registered at the fpm(1) registry )

Alternatively, download the github repository and build it with fpm ( as described at Fortran Package Manager )

     git clone https://github.com/urbanjost/M_sort.git
     cd M_sort
     fpm test  # run unit tests

or just list it as a dependency in your fpm.toml project file.

     [dependencies]
     M_sort        = { git = "https://github.com/urbanjost/M_sort.git" ,tag="v1.0.1"}

-

Build and Test with CMake

      git clone https://github.com/urbanjost/M_sort.git
      cd M_sort

      # Create a Build Directory:
      mkdir -p build

      cd build
      cmake -S ../src -B .

      # Configure the Build, specifying your preferred compiler (ifort, flang, etc.):
      cmake . -DCMAKE_Fortran_COMPILER=gfortran

      # Build the Project:
      cmake --build .

Optional CMake section:

      # Verify build
      # On Linux this would create, for example:
      ls build/lib/libM_sort.a   # the static library
      ls build/include/*.mod     # module files
      ls build/test/*            # test executables
      ls build/example/*         # example executables

      #Optionally Run Tests and Examples:
      for name in ./test/* ./example/*
      do
         $name
      done

      #Install (Optional):
      # This installs the library and module files to the system
      # (e.g., /usr/local/lib/ and /usr/local/include/).
      cmake --install .

      # if you have insufficient permissions sudo(1) may be required
      # to perform the install
      #sudo cmake --install .

      # Verify installation
      ls /usr/local/lib/libM_sort.a
      ls /usr/local/include/*.mod

      # Cleaning Up: To clean artifacts, remove the build/ directory:
      rm -rf build

Demo Programs

demos

There are demo programs extracted from the man pages in the example/ directory

Documentation

docs

User

  • A single page that uses javascript to combine all the HTML descriptions of the man-pages is at BOOK_M_sort.

  • An index to HTML versions of the man-pages

in addition in the docs/ directory there is

Developer

See Also

Releases

No releases published

Packages

 
 
 

Contributors