GitXplorerGitXplorer
L

SC-by-Default-Julia

public
0 stars
0 forks
0 issues

Commits

List of commits on branch atomic-expand-volatile.
Unverified
22910499ba014d7f76f38c009b46dffcd8d99a3b

make immutable stores to be release

LLun-Liu committed 4 years ago
Unverified
73bf8b4cfa92967d37d1e96a79f7d81f9a8e62ce

add example for @drf

LLun-Liu committed 4 years ago
Unverified
e1bfd942047ccf68534b65a4369eb774310fd8d5

fix @drf

LLun-Liu committed 4 years ago
Unverified
24e9ca6fdf163c5f8e63aa236c281f0b6c8b3a49

fix

LLun-Liu committed 4 years ago
Unverified
5580bbabee9f1a0c872a2eda2348504bc0d38bb6

workaround for mac build

LLun-Liu committed 4 years ago
Unverified
39ba4a696b45cece9175b5d30ff6dac94f74ae7e

trying fixing build problem on Mac

LLun-Liu committed 4 years ago

README

The README file for this repository.

This is work is based on v1.4.1 of the public Julia implementation on GitHub. The original README is kept at the end.

Building

The build process is similar to building the original Julia from source.

First, make sure you have all the required dependencies installed.

Checkout atomic-expand-volatile branch that has the SC-by-Default Julia modifications by running:

git checkout atomic-expand-volatile

Switch to use LLVM 9.0.1 by adding the following line to Make.user (or create the file with such line if the file does not exist)

LLVM_VER = 9.0.1

NOTE: SC-by-Default Julia is being developed with LLVM 9.0.1. Other versions of LLVM may also work but they are not tested.

Now run make to build the julia executable.

Once it is built, you can run the julia executable after you enter your julia directory and run

./julia

You can read about the building process in this section from the original README: Building Julia

@drf Annotations

SC-by-Default Julia provides Sequential Consistency for Julia programs it executes by default. For performance-sensitive regions of the code, programmers are allowed to use @drf annotations to restore the original Julia memory model semantics in those regions of the code.

Currently, @drf annotations can be used in the following manners:

  1. Annotate a for loop with @drf. The object iterated over in a @drf for loop should be a one-dimensional range. The implementation mimics @simd so it has the same requirement for the loop structure as @simd does.

Below is an example of using @drf for an implementation of fill!

  function fill!(dest::Array{T}, x) where T xT = convert(T, x)
      @drf for i in eachindex(dest)
          @inbounds dest[i] = xT
      end
      return dest
  end 

Naturally, loops already marked as @simd are good candidates for @drf. To enable treating all loops marked as @simd as @drf without having to annotate them again, set the following LLVM argument by running:

export JULIA_LLVM_ARGS=-drf_simd
  1. Annotate a list of functions to have the original Julia memory model semantics. The list of function names is passed as an llvm argument, therefore to set the list of functions that will be treated as @drf, use:
    export JULIA_LLVM_ARGS="-drf_func_list=funcname1;funcname2;funcname3..."
  1. Annotate a list of modules to have the original Julia memory model semantics, meaning all functions in the modules specified will be treated as @drf. The list of module names is also passed as an llvm argument, and can be set using:
    export JULIA_LLVM_ARGS="-drf_mod_list=modname1;modname2;modname3..."

The above usage of @drf can be mixed together, for example, setting JULIA_LLVM_ARGS as following when running julia:

export JULIA_LLVM_ARGS="-drf_mod_list=Base;Sort;LinearAlgebra -drf_func_list=setindex  -drf_simd"

will mark Base module, Sort module, LinearAlgebra module, and setindex function as @drf, and treat all @simd for loop as @drf too.

==================================================================================================

The Original Julia README

Code coverage: coveralls codecov

Documentation: version 1

The Julia Language

Julia is a high-level, high-performance dynamic language for technical computing. The main homepage for Julia can be found at julialang.org. This is the GitHub repository of Julia source code, including instructions for compiling and installing Julia, below.

Resources

New developers may find the notes in CONTRIBUTING helpful to start contributing to the Julia codebase.

External Resources

Binary Installation

If you would rather not compile the latest Julia from source, platform-specific tarballs with pre-compiled binaries are also available for download. The downloads page also provides details on the different tiers of support for OS and platform combinations.

If everything works correctly, you will see a Julia banner and an interactive prompt into which you can enter expressions for evaluation. You can read about getting started in the manual.

Note: Although some system package managers provide Julia, such installations are neither maintained nor endorsed by the Julia project. They may be outdated, broken and/or unmaintained. We recommend you use the official Julia binaries instead.

Building Julia

First, make sure you have all the required dependencies installed. Then, acquire the source code by cloning the git repository:

git clone git://github.com/JuliaLang/julia.git

By default you will be building the latest unstable version of Julia. However, most users should use the most recent stable version of Julia. You can get this version by changing to the Julia directory and running:

git checkout v1.3.0

Now run make to build the julia executable.

Building Julia requires 2GiB of disk space and approximately 4GiB of virtual memory.

Note: The build process will fail badly if any of the build directory's parent directories have spaces or other shell meta-characters such as $ or : in their names (this is due to a limitation in GNU make).

Once it is built, you can run the julia executable after you enter your julia directory and run

./julia

Your first test of Julia determines whether your build is working properly. From the UNIX/Windows command prompt inside the julia source directory, type make testall. You should see output that lists a series of running tests; if they complete without error, you should be in good shape to start using Julia.

You can read about getting started in the manual.

In case this default build path did not work, detailed build instructions are included in the build documentation.

Uninstalling Julia

Julia does not install anything outside the directory it was cloned into. Julia can be completely uninstalled by deleting this directory. Julia packages are installed in ~/.julia by default, and can be uninstalled by deleting ~/.julia.

Source Code Organization

The Julia source code is organized as follows:

base/          source code for the Base module (part of Julia's standard library)
stdlib/        source code for other standard library packages
contrib/       editor support for Julia source, miscellaneous scripts
deps/          external dependencies
doc/src/manual source for the user manual
doc/build      detailed notes for building Julia
src/           source for Julia language core
test/          test suites
ui/            source for various front ends
usr/           binaries and shared libraries loaded by Julia's standard libraries

Terminal, Editors and IDEs

The Julia REPL is quite powerful. See the section in the manual on the Julia REPL for more details.

Support for editing Julia is available for many widely used editors: Emacs, Vim, Sublime Text, and many others.

Supported IDEs include: Juno (Atom plugin), julia-vscode (VS Code plugin), and julia-intellij (IntelliJ IDEA plugin). The popular Jupyter notebook interface is available through IJulia.