# AMD64 Multi-CPU Compile Flags

**URL:** <https://discourse.julialang.org/t/amd64-multi-cpu-compile-flags/2415>\
**Category:** General Usage\
**Tags:** question\
**Created:** [March 2, 2017, 11:31pm UTC](https://discourse.julialang.org/t/amd64-multi-cpu-compile-flags/2415 "2017-03-02T23:31:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon51122801](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anon51122801](https://discourse.julialang.org/u/anon51122801)\
**Post date:** [March 2, 2017, 11:31pm UTC](https://discourse.julialang.org/t/amd64-multi-cpu-compile-flags/2415/1 "2017-03-02T23:31:18Z")

</div>

I blew away the previous install of Julia 0.6.0-dev and are redoing 0.5 as per the instructions:

[https://github.com/JuliaLang/julia/tree/v0.5.0](https://github.com/JuliaLang/julia/tree/v0.5.0)

```julia
$ cd /../git
$ git clone git://github.com/JuliaLang/julia.git
... git gits some stuff
$ cd julia
$ git checkout release-0.5
... changed origin to master release-0.5

```

Compile options for Multi-CPU AMD:

[https://github.com/JuliaLang/julia#platform-specific-build-notes](https://github.com/JuliaLang/julia#platform-specific-build-notes)

```julia
"Set one of the following build options in Make.user and build again:

    OPENBLAS_TARGET_ARCH=BARCELONA (AMD CPUs)"

```

Edit Make.user:

```julia
$ cp Make.inc Make.user && vim Make.user

```

Modify ARCH\_flags:

```julia
12 # OPENBLAS build options
  13 OPENBLAS_TARGET_ARCH:=

```

… becomes

```julia
12 # OPENBLAS build options
  13 OPENBLAS_TARGET_ARCH:=BARCELONA

```

Save/exit Make.user

```julia
$ make

```

Compile fails with error message … too many pipes open, install GNU tar or bsdtar

Eveytime I compile trying to use Multi-CPU flags for AMD CPUs, release-0.5 fails. Is this a common issue? Have searched through this site and can find no other direct/indirect install match.

For the time being, I killed the Make.user, reran $ make but I would like a Mult-core build of Julia to best use this system and increase my learning.

Comments welcome.

TIA. JNA.

Edit: changed “multi-core” to “multi-cpu”

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [March 2, 2017, 11:43pm UTC](https://discourse.julialang.org/t/amd64-multi-cpu-compile-flags/2415/2 "2017-03-02T23:43:04Z")

</div>

> [@jna](#):
>
> Compile options for Multi-core AMD:

Does the build fail without the flag? Also what do you mean by “multi-core AMD” anyway…

> [@jna](#):
>
> $ cp Make.inc Make.user && vim Make.user

You create `Make.user` or edit `Make.inc`. You don’t copy `Make.inc` into `Make.user`.

---

<div class="post-metadata">

**Author:** ![anon51122801](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anon51122801](https://discourse.julialang.org/u/anon51122801)\
**Post date:** [March 2, 2017, 11:46pm UTC](https://discourse.julialang.org/t/amd64-multi-cpu-compile-flags/2415/3 "2017-03-02T23:46:10Z")

</div>

No, it compiles using default settings.

Hmm perhaps I should say “multi-CPU” ?

Ahhh, well the instructions were not really clear. I read it as you make a Make.user, set the flags and the system will look for a Make.user and compile with that.

My bad.

Edit to above question also.

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [March 2, 2017, 11:48pm UTC](https://discourse.julialang.org/t/amd64-multi-cpu-compile-flags/2415/4 "2017-03-02T23:48:40Z")

</div>

> [@jna](#):
>
> Hmm perhaps I should say “multi-CPU” ?

Still, what do you mean by that. The README you linked does not mention anything about “multi-CPU” or “multi-core”. It’s about workaround compile failure.

---

<div class="post-metadata">

**Author:** ![anon51122801](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anon51122801](https://discourse.julialang.org/u/anon51122801)\
**Post date:** [March 2, 2017, 11:54pm UTC](https://discourse.julialang.org/t/amd64-multi-cpu-compile-flags/2415/5 "2017-03-02T23:54:12Z")

</div>

OK, I see your point. I was thinking think in terms of “multi-CPU” not “CPU-type” and failed to see the distinction. Ah well, at least it got my Topic Created rate up 🕶

Maybe I should have tried this first:

```julia
You can also set MARCH=native for a maximum-performance build customized for the current machine CPU.

```

Thanks for your comments.

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [March 3, 2017, 12:01am UTC](https://discourse.julialang.org/t/amd64-multi-cpu-compile-flags/2415/6 "2017-03-03T00:01:45Z")

</div>

`MARCH=native` should also be the default.

---

<div class="post-metadata">

**Author:** ![anon51122801](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anon51122801](https://discourse.julialang.org/u/anon51122801)\
**Post date:** [March 3, 2017, 12:04am UTC](https://discourse.julialang.org/t/amd64-multi-cpu-compile-flags/2415/7 "2017-03-03T00:04:13Z")

</div>

Noted.
