Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move buildkite to new central #69

Closed
wants to merge 1 commit into from
Closed

Move buildkite to new central #69

wants to merge 1 commit into from

Conversation

Sbozzolo
Copy link
Member

@Sbozzolo Sbozzolo commented Feb 22, 2024

And use climacommon :)

Closes #72

@Sbozzolo Sbozzolo force-pushed the gb/move_newcentral branch 3 times, most recently from 930cd3b to 300c59c Compare February 22, 2024 23:13
@Sbozzolo Sbozzolo force-pushed the gb/move_newcentral branch 3 times, most recently from 80ca805 to ac17d61 Compare March 18, 2024 22:50
@charleskawczynski
Copy link
Member

Ok, one conceptual issue is that the threaded tests are being launched with --threads 8, and runsingleton does not take this into account. I think reverting the runsingleton change should fix this.

@Sbozzolo
Copy link
Member Author

Ok, one conceptual issue is that the threaded tests are being launched with --threads 8, and runsingleton does not take this into account. I think reverting the runsingleton change should fix this.

I don't thinks that's the case. If we are not running with MPI (as in the threaded test), the context should be singleton. It is the device that would change to CPUMultiThreaded.

@charleskawczynski
Copy link
Member

I don't think it's the problem we're seeing, but it is a conceptual issue: we end up reducing coverage if we don't run basic.jl in multithreaded mode.

@Sbozzolo
Copy link
Member Author

I don't think it's the problem we're seeing, but it is a conceptual issue: we end up reducing coverage if we don't run basic.jl in multithreaded mode.

Singleton and mutli-threaded are not mutually exclusive.

This is how singleton is picked by ClimaComms.context:

function context(device = device())
    name = get(ENV, "CLIMACOMMS_CONTEXT", nothing)
    if !isnothing(name)
        if name == "MPI"
            return MPICommsContext()
        elseif name == "SINGLETON"
            return SingletonCommsContext()
        else
            error("Invalid context: $name")
        end
    end
    # detect common environment variables used by MPI launchers
    #   PMI_RANK appears to be used by MPICH and srun
    #   OMPI_COMM_WORLD_RANK appears to be used by OpenMPI
    if haskey(ENV, "PMI_RANK") || haskey(ENV, "OMPI_COMM_WORLD_RANK")
        return MPICommsContext(device)
    else
        return SingletonCommsContext(device)
    end
end

What I understand from this is that the context should be singleton when you are not running with MPI.

@charleskawczynski
Copy link
Member

Singleton and mutli-threaded are not mutually exclusive.

I understand that, but Base.julia_cmd() in the launch

function runsingleton(file)
    Base.run(
        Cmd(
            `$(Base.julia_cmd()) --startup-file=no --project=$(Base.active_project()) $file`,
            env = ("CLIMACOMMS_CONTEXT" => "SINGLETON",),
        ),
    )
end

does not propagate multiple threads:

Base.julia_cmd(juliapath=joinpath(Sys.BINDIR, julia_exename()); cpu_target::Union{Nothing,String}=nothing)

  Return a julia command similar to the one of the running process. Propagates any of the --cpu-target, --sysimage,
  --compile, --sysimage-native-code, --compiled-modules, --pkgimages, --inline, --check-bounds, --optimize,
  --min-optlevel, -g, --code-coverage, --track-allocation, --color, --startup-file, and --depwarn command line arguments
  that are not at their default values.

@Sbozzolo Sbozzolo force-pushed the gb/move_newcentral branch 2 times, most recently from 821ba4c to 2eaf084 Compare April 23, 2024 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move to new-central/MPITrampoline
2 participants