Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ben Albrecht
    @ben-albrecht
    Also, I think it would be reasonable to file a feature request for better error interface support. Let us know if you’re having trouble getting that working.
    hokiegeek2
    @hokiegeek2
    @ben-albrecht cool, thanks. I am not a C programmer, so I'll git it the ole' college try
    Brad Chamberlain
    @bradcray
    Following up on Ben’s response, it might be reasonable to request that these routines throw errors rather than printing them out to the console.
    Ben Albrecht
    @ben-albrecht

    @bradcray - I am not 100% sure, but I think the errors are emitted from the C HDF5 library itself (at least I didn’t see anywhere where the Chapel HDF5 module prints them).

    Better error interface support might involve capturing the information via the HDF5 error interface and packing it into a proper Chapel error that gets thrown.

    hokiegeek2
    @hokiegeek2
    @bradcray yeah, I'd prefer error throws
    @ben-albrecht yeah, that's basically what I was planning to do wihtin Arkouda
    But it makes more sense to do so within Chapel so others can use it
    Mihai Damian Visan
    @vmdamian
    Hello! Quick question from a begginer regarding setting up Chapel. Is there any simple way to set up paths? I don't wanna run utils/setchplenv.bash everytime I open a new terminal.
    Brad Chamberlain
    @bradcray
    @vmdamian: There are a few options: First, you can configure your environment through normal shell-based mechanisms like .bashrc or .bash-profile that are not specific to Chapel. Alternatively, you can set up a chplconfig file which stores your default / preferred profile. See https://chapel-lang.org/docs/usingchapel/chplenv.html#readme-chplenv-chplconfig for details.
    Mihai Damian Visan
    @vmdamian
    Got it @bradcray, was looking for a quick script to get all needed vars, but managed to find them and added them in bash_profile. Thanks a lot!
    Brad Chamberlain
    @bradcray
    :+1:
    Brad Chamberlain
    @bradcray
    @here: If anyone here on Gitter hasn’t signed up for the Chapel Discourse site yet, we’ve just enabled the ability to log in using your GitHub credentials rather than creating a new account. Just click on “log in” and then click on the black “with GitHub” button rather than filling out the form: https://chapel.discourse.group/
    Zhihui Du
    @duzhihui_twitter
    When I try to include some C++ codes into Chapel, it says that
    "sacak.chpl:16: error: file '/home/z/zd4/SA/nong/saca-k-tois-20130413/saca-k/saca-k.cpp' does not have a recognized suffix Note: This source location is a guess." Can Chapel support extern C++ codes or not?
    I can include some c codes successfully using the extern method of Chapel.
    Engin Kayraklioglu
    @e-kayrakli
    Chapel doesn’t have C++ interoperability. You can add a thin C layer around the relevant parts of your C++ code and use functions in that layer from Chapel relying on its C interoperability.
    1 reply
    Thomas Rolinger
    @thomasrolinger
    Does anyone know whether there is an implementation of the PageRank algorithm in Chapel?
    tmacd8
    @tmacd8
    I noticed the documentation for string.strip(chars: string = " trn" and I'm thinking that should be \t\r\n.
    Lydia Duncan
    @lydia-duncan
    @tmacd8 - that sounds right. I suspect it is something about the documentation removing the “\” from the displayed output. Would you mind opening an issue about it?
    tmacd8
    @tmacd8
    What does the following error mean? x.chpl:224: error: halt reached - Encountered corrupt string metadata
    Ben Albrecht
    @ben-albrecht

    Looks like this occurs when the cached num code points doesn’t match the counted num code points:

    // String.chpl
      inline proc const string.numCodepoints {
        const n = this.cachedNumCodepoints;
        if boundsChecking {
          if n != countNumCodepoints(this) {
            halt("Encountered corrupt string metadata");
          }
        }
        return n;
      }

    Not sure how that would happen off the top of my head. @e-kayrakli - do you have any ideas?

    Engin Kayraklioglu
    @e-kayrakli
    @tmacd8 — it means the string you are using on that line was created in a way… that we are not expecting
    Or at least that’s what it ideally should mean, but it can also point to a bug in a string method that you have used before that manipulated the string
    I’d like to know more about this as it may be a bug that we haven’t seen before. Whereas, it may be coming from the user code if you are tinkering with string internals (like the character buffer) etc by non-user-facing means
    tmacd8
    @tmacd8
    I'll open an issue with a test case.
    Engin Kayraklioglu
    @e-kayrakli
    Thanks!
    Brad Chamberlain
    @bradcray
    Hi @tmacd8! Fun to see your name on here today!
    Engin Kayraklioglu
    @e-kayrakli
    For those following, the bug @tmacd8 hit is chapel-lang/chapel#15775, which proposes that we should drop support for copy-initializing Chapel strings from c_strings. In which case, he would have gotten a compile time error with a more helpful message.
    tmacd8
    @tmacd8
    @bradcray - hello to all. I've been away too long. Now that winter is rapidly approaching and I've put my bicycle away until next year, I should have more time to explore chapel.
    Brad Chamberlain
    @bradcray
    Perfect! Can’t wait to see what you do with it.
    Zhihui Du
    @duzhihui_twitter
    I am tring to integrate the suffix array into Arkouda. When debugging, it is too time cosuming for recompling Arkouda. Is ther any way to make it quick for debugging?
    Elliot Ronaghan
    @ronawho
    export ARKOUDA_QUICK_COMPILE=true will speed up build times (but will hurt execution performance)
    And a local (CHPL_COMM=none) build will be faster too. There were also some compilation speed improvements in Chapel 1.23, so I'd recommend using 1.23 if you're not already.
    Elliot Ronaghan
    @ronawho
    Oh, and you can skip the dependency checks with ARKOUDA_SKIP_CHECK_DEPS=true. I think I see 100s build times with those 3 settings (compared to 10+ minutes for an optimized distributed build)
    2 replies
    Michael Merrill
    @mhmerrill
    @duzhihui_twitter we usually build a chapel unit test to actuate the logic in the specific module to make development time faster. example of these chapel unit tests are in arkouda/test, BTW you should ask further questions in the https://gitter.im/ArkoudaProject/community channel
    1 reply
    Gaurav Singh
    @gaurav-singh1998
    Hello, Chapel community I am a new contributor here. In the past month, I made Pull Request to add support for == and != comparisons in IO channels chapel-lang/chapel#16592 but the Chapel automation added the cla required label to it. Do I need to do something to remove it? Sorry for asking such doubts and looking forward to becoming an avid contributor in this wonderful community. Thanks
    Brad Chamberlain
    @bradcray
    Hi @gaurav-singh1998 — Thanks for noting this. We’ve recently switched from requiring signed Apache CLAs for all pull requests to requiring them to be signed in accordance to the DCO. However, this is a good reminder that we have not yet turned off the script that checks for signed CLAs which is why that tag is being applied. I believe that your commits were made before we made the switch from CLAs to DCOs, but probably the easiest way to get them into a mergeable state would be to re-commit them with DCO signature lines. See https://github.com/chapel-lang/chapel/blob/master/.github/CONTRIBUTING.md#chapel-and-the-developer-certificate-of-origin-dco for more information about the DCO and https://github.com/chapel-lang/chapel/blob/master/doc/rst/developer/bestPractices/DCO.rst for lots of details about how to sign new commits and how to retroactively sign commits.
    Gaurav Singh
    @gaurav-singh1998
    Hi, @bradcray thanks for helping I have done the same.
    Brad Chamberlain
    @bradcray
    Looks good thanks (and you’ll see that it has passed the DCO bot checks now… I believe your prior commits ran before that bot was enabled, which is why they didn’t fail). Ignore the “CLA required” tag, which I’ll look into removing this week.
    Mihai Damian Visan
    @visanmihaidamian_gitlab
    Hi everyone! I'm trying to get a parallel version of the naive pattern matching algorithm in Chapel for some university work and I don't seem to get my head around it. I got it to work to some extent, but it's really really slow and I'm not sure why. Is there anyone that can take a look at a couple of lines of code and provide some input about some (probably obvious) mistakes I'm doing?
    Brad Chamberlain
    @bradcray
    When you say slow, (a) how are you doing the measurements, (b) slow compared to what, and (c) are you compiling with the --fast flag?
    Mihai Damian Visan
    @visanmihaidamian_gitlab
    Slow as in much slower than the naive C algorithm, no I'm not compiling with the --fast flag.
    Brad Chamberlain
    @bradcray
    OK, definitely use the --fast flag as a starting point then and see where that gets you. By default, Chapel includes a number of runtime checks that make the code safer but much more expensive than C.
    W.r.t. question (a), are you timing the executable as a whole using a command-line utility like time or are you timing a section of the code using Chapel’s library features for timings? (The reason this matters is that Chapel does a bunch of setup that C doesn’t, so for a program that’s not particularly long-running, this can hurt timings taken from the command-line that C doesn’t have to pay; while for long-running programs, that startup time will be dwarfed by the program’s execution time).
    But yeah, if these general tips don’t help, we can definitely help look at your code to see whether there’s a fundamental problem or misunderstanding.
    Mihai Damian Visan
    @visanmihaidamian_gitlab
    Yes, --fast helped a lot. I'll look more into it (don't want to bother anyone with me probably missing something in the docs) and come back if I can't figure it out myself. Thanks a lot @bradcray!
    Brad Chamberlain
    @bradcray
    OK, sounds good. Don’t feel you have to wrestle with the docs in silence. We’re happy to help out if we can.
    hokiegeek2
    @hokiegeek2
    what's the syntax for checking to see if object is not null (nil)?
    Engin Kayraklioglu
    @e-kayrakli
    class C {};
    
    var c: owned C?;
    writeln(c == nil);  // true
    
    c = new C();
    writeln(c == nil);  // false
    Brad Chamberlain
    @bradcray
    @hokiegeek2: In addition, in a conditional context, you can also simply write:
    if c then// is c non-nil?
    However, slightly surprisingly to me, you cannot currently write:
    if !c then// is c nil?