Skip to content

Commit

Permalink
version 1892
Browse files Browse the repository at this point in the history
  • Loading branch information
barnex committed Mar 6, 2012
1 parent f644b00 commit cbe60bb
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ all:
go install mumax2-bin
go install apigen
go install texgen
bin/apigen

.PHONY: clean
clean:
make clean -C src/libmumax2
go clean
rm -rf pkg/*
rm -rf bin/mumax2-bin
rm -rf bin/apigen
rm -rf bin/texgen

.PHONY: test
test:
Expand Down
2 changes: 1 addition & 1 deletion misc/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ echo 'Running unit tests'
fortune 2> /dev/null

# Nicely format all go source files
gofmt -w src/pkg/*/*/*.go src/*.mod/pkg/*.go
#gofmt -w src/*/*.go src/*.mod/pkg/*.go

# Run all unit tests
rm test.log -rf
Expand Down
2 changes: 1 addition & 1 deletion src/mumax/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ const UPDATE_DASH = 150 * 1e6
// INTERNAL: show live progress: steps, t, dt, outputID
func (e *Engine) updateDash() {
t := Nanoseconds()
if t - lastdash > UPDATE_DASH {
if t-lastdash > UPDATE_DASH {
lastdash = t
Dashboard(" step", e.step.multiplier[0],
"t:", float32(e.time.multiplier[0]), "s",
Expand Down
3 changes: 1 addition & 2 deletions src/mumax/engine/outputformat.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ type OutputFormat interface {
Write(out io.Writer, q *Quant, options []string) // Writes the quantity buffer to out
}


// global map of registered output formats
var outputformats map[string]OutputFormat

// registers an output format
func RegisterOutputFormat(format OutputFormat) {
if outputformats == nil{
if outputformats == nil {
outputformats = make(map[string]OutputFormat)
}
outputformats[format.Name()] = format
Expand Down
6 changes: 5 additions & 1 deletion src/mumax/frontend/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ func (c *Client) startSubcommand() (command string, waiter chan (int)) {
err := proc.Wait()
if err != nil {
if msg, ok := err.(*exec.ExitError); ok {
if msg.ProcessState.Success(){exitstat=0}else{exitstat=1}
if msg.ProcessState.Success() {
exitstat = 0
} else {
exitstat = 1
}
// TODO: extract unix exit status
//exitstat = msg.ExitStatus()
} else {
Expand Down
8 changes: 4 additions & 4 deletions src/mumax/frontend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ var (
flag_version *bool = flag.Bool("v", false, "Print version info and exit")
flag_test *bool = flag.Bool("test", false, "Test CUDA and exit")
//flag_timeout *string = flag.String("timeout", "", "Set a maximum run time. Units s,h,d are recognized.")
flag_gpus *string = flag.String("gpu", "all", "Which GPUs to use. gpu=0, gpu=0:3, gpu=1,2,3, gpu=all")
flag_sched *string = flag.String("sched", "auto", "CUDA scheduling: auto|spin|yield|sync")
flag_fft *string = flag.String("fft", "5", "Override the FFT implementation (advanced)")
flag_gpus *string = flag.String("gpu", "all", "Which GPUs to use. gpu=0, gpu=0:3, gpu=1,2,3, gpu=all")
flag_sched *string = flag.String("sched", "auto", "CUDA scheduling: auto|spin|yield|sync")
flag_fft *string = flag.String("fft", "5", "Override the FFT implementation (advanced)")
)

// Mumax2 main function
Expand Down Expand Up @@ -268,7 +268,7 @@ func getCrashStack() string {

const (
WELCOME = `
MuMax 2.0.1865 alpha
MuMax 2.0.1892 alpha
(C) Arne Vansteenkiste, Ben Van de Wiele
(Dynamat/EELAB Ghent University, Belgium), and
Rémy Lassalle-Balier, Graham Rowlands, Mykola Dvornik.
Expand Down

0 comments on commit cbe60bb

Please sign in to comment.