Bold across newline is not recognized as bold

Given the text
  """
  this is some **bold
  text**
  """
When I render
Then "bold text" should be bold
# But it's not

Sorry to bother you with this @burodepeper, but do you think it can be fixed easily?

Nope, can't be easily fixed, unfortunately.
There has been a long discussion about this in language-gfm partly from which this package was developed. The big issue (as I see it) is that Atom parses content line by line, and in doing so doesn't give a multiline look ahead. My attempt to solve this resulted in an awful lot of false-positives, something that is at the core of what I try to prevent.
How I since see this issue is that inline styling elements (bold, italic, strike-through, etc.) are to be treated as inline elements, in other words: they don't span multiple lines by definition. This is somewhat parallel to how inline elements behave in HTML. This can be a bit confusing for a regular user, but the current parser in Atom simply doesn't allow for the most user friendly solutions.
The biggest culprit in trying to come up with a solid solution for supporting multiline inlines does also have to take into account that inlines can be nested.  If you want to try to fix it yourself I can give you some more technical details, but beware...

You're right, anyway I didn't have high expectations. I guess my only issue with this is parallel to #144, when a paragraph with eg. bold text gets a Reflow and breaks the style. Do you think we can easily prevent that from happening?

Okay, makes sense in your reflow example. Is there any particular reason why you're using manual reflow, and not use the editor soft-wrap-at-preferred-width option?

I guess that comes down more to personal preferences, but I prefer hard-wrapped text for better diffability.

To each his own. Anyway, I don't think I can help you with this issue any further at this moment. I'm hoping they'll use a different grammar parsing engine in 2.0.

@burodepeper I search but couldn't find: do you see that issue reported upstream?

I search but couldn't find: do you see that issue reported upstream?

@joallard What are you referring to exactly?

The big issue (as I see it) is that Atom parses content line by line, and in doing so doesn't give a multiline look ahead.

This can be a bit confusing for a regular user, but the current parser in Atom simply doesn't allow for the most user friendly solutions.

I had the feeling this wasn't fixable in here, but does the parser give us the tools to do that?

Atom allows two types of matches with regards to grammars. There's a simple match (let's call these "inlines") which simply matches a pattern with one limitation: documents are parsed line-by-line, so you can't process anything multiline with these. The entire match has to occur on a single line. This feature is disabled by design in Atom. I spoke about it a long time ago with one of the core developers of Atom on Slack.
The other type has a begin and an end part, I call these "blocks". Both begin and end behave similar to match, however, the content between the two can contain line-breaks. The problem with these blocks is that the end part is optional; if it detects the begin part, it will still process anything that comes after as if it's part of that pattern. So when this involves emphasis, and you can't find the end part, your entire document might be marked emphasized. And it turns out that that happens quite often. With emphasis you have to account for nested emphasis, and then things get tricky because of these limitations. Have a look at this discussion which I believe is the reason I started developing this alternative.
I don't want to make it sound like you are the problem, but your hard-wrap preference doesn't play well with this kind of begin and end matching. And since the majority of users are no- or soft-wrappers, it happens that you are one of the few that's affected by this. So, yes, the tools are available, technically, but it's a problem that is not easily solved for all use-cases, and then sadly, the majority "wins". I chose to try and prevent false-positive, instead of the other way around.
You are more than welcome to give it a go yourself.

Right, thanks for the explainer. I'll keep the prevention of false positives in mind if I ever get around to it. I also wonder what the CMD spec says about a stray emphasis tag. Off the top, I'd say it shouldn't go across a markdown-block. (So * is either terminated with a * or \n\n) I'll also be sure to put some good test coverage if I do this, I'm pretty well acquainted with Rspec in the Ruby world.

Off the top, I'd say it shouldn't go across a markdown-block. (So * is either terminated with a * or \n\n)

This is exactly one of the things that's impossible. The match alternative parses single lines, without a possibility of looking ahead or behind beyond that line. The begin alternative can only be successfully terminated by an end match. You can't negate the begin-match.
This approach works good enough for programming languages, because proper grammar is absolute, and because the grammar rules are rather strict. An opening ( needs a closing ). I have yet to come across any false-positive while programming.

I'll also be sure to put some good test coverage if I do this

There are already a bunch of tests in place, a good chunk of them disabled for these reasons.


Application error when acess /, Error=ID4014: A Security TokenHandler is not registered.

3 Questions ---------------------------!!!!!!!!!!!!!

Is there any setup on ADFS required?

If the answer above is "NO", I am getting - in the ULS Logs

Application error when access /, Error=ID4014: A SecurityTokenHandler is not registered to read security token ('Assertion', 'urn:oasis:names:tc:SAML:2.0:assertion').   at Microsoft.IdentityModel.Web.TokenReceiver.ReadToken(String tokenXml, XmlDictionaryReaderQuotas readerQuotas)     at Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.SignInWithResponseMessage(HttpRequest request)     at Microsoft.IdentityModel.Web.WSFederationAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs args)     at Microsoft.SharePoint.IdentityModel.SPFederationAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs eventArgs)     at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.Execute... 1d74659e-02a9-601e-d2d0-f7f2e174f79f
I have followed the following doc from Microsoft to configure - https://docs.microsoft.com/en-us/office365/enterprise/using-azure-ad-for-sharepoint-server-authentication
I have run the PowerShell scripts as written, but "NO LUCK" as you can see from the logs.

How do you configure Center Admin in SharePoint to only need to authenticate the Trust aka adding a > Center Admin > Manager Web applications > Authentication Providers > Custom Sign In Page (How do you configure the trusted sign in page, if you add like it explains in the article /_trust/ will it create a new page?  Right now I am only using the Default Sign In Page which gives you a choice of

Windows Authentication
AzureAD

Thank you ahead of time.

@moojjoo - ADFS is not used in this configuration, SharePoint receives a SAML 1.1 token directly from AzureAD.
The error indicates "A SecurityTokenHandler is not registered to read security token ('Assertion', 'urn:oasis:names:tc:SAML:2.0:assertion')", meaning it is likely that not all steps from the article were completed. SharePoint 2013 and 2016 require SAML 1.1, your configuration appears to be using SAML 2.0, meaning the steps for removing the existing SAML 2.0 token issuance policy and adding a SAML 1.1 token issuance policy were either missed or did not complete successfully.
@denisebmsft please close.

how i remove SAML 2.0 and add SAML 1.1 , please help.

@BilawalAsghar follow the steps in the article in the order they are written. The PowerShell script shows how to remove the SAML 2.0 issuance policy and add a SAML 1.1 issuance policy.
@denisebmsft Please close.


What about a langchain wrapper for lit-llama?

Do you think that can be useful having a custom langchain wrapper for lit-llama?
Using the CustomLLM class, proposed in the langchain docs: https://python.langchain.com/en/latest/modules/models/llms/examples/custom_llm.html
Thank you :)

Hey @mfranzon, that would be cool! Is it something you'd be interested in contributing?

Any progress on this? I would also like to use  it.

@themantalope Yep, I am trying to do at my best but in this period I have to many commitments, I hope to push a PR as soon as possible.


[#159136460] Bump datadog BOSH release

What
Bump the datadog Bosh release to include a BAU change which tests Consul's reporting of its leader against IPs, not against DNS names.
How to review

Merge https://github.com/alphagov/paas-datadog-for-cloudfoundry-boshrelease/pull/31
Update the WIP commit in this PR's branch referencing the final BOSH release
Deploy a dev env on this branch with datadog integrations enabled
Check that the <env name> consul cluster has at least one leader datadog monitor is not red

Who can review
Anyone except myself.

LGTM


focusInvalid on iOS Safari Browser

Focusing of invalid elements don't work on iOS Safari browser.
I've tested it on Chrome/iOs and there are no problems.

I'm sorry for the lack of activity on this issue. Instead of leaving it open any longer, I decided to close old issues without trying to address them, to longer give the false impression that it will get addressed eventually, especially after several years with no activity. It doesn't mean I'm abandoning the project, just that I'm unable to work through 200+ open issues with the little time I can afford to spend on this project.
To the reporter (or anyone else interested in this issue): If you're still affected by the same issue, please consider opening a new issue, with a testpage that demonstrates the issue with a current version of the plugin. Even better, make an attempt to fix the issue yourself, and improve the project by sending a pull request. This may seem daunting at first, but you'll likely learn some useful skills that you can apply elsewhere as well. And you can help keep this project alive. We've documented how to do these things, too. A patch is worth a thousand issues!


Typedef definitions go generator

Changes introduced with this PR
A golang code generator that takes an Arcaflow schema YAML structure loaded using Arcaflow library and generates the type definitions in Go code. Related to https://github.com/arcalot/arcaflow-plugin-sdk-go/issues/18.
For the reviewers convenience, a valid schema_input.yaml can be found here.

By contributing to this repository, I agree to the contribution guidelines.

@janosdebugs I think all the comments/changes have been addressed now.
Please let me know if there is anything else needed and thanks for all the suggestions.


[RIP-15]Add Ipv6 support for RocketMQ

What is the purpose of the change
add the support of IPv6
Brief changelog

Modified the message system flag to indicate which IP protocol the client and broker itself came from.
Modified the method of generating and decoding msgID
Modified the class related to message storage and decoding

Verifying this change
https://docs.google.com/presentation/d/1d4GXH0pdwQiUgzlwqJqWLmR5Punz6GG0RvMP0IgHvbM/edit?usp=sharing
Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

[ ] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[ ] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
[ ] Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test  to make sure integration-test pass.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Coverage decreased (-0.09%) to 50.5% when pulling e4b74bb1b0e52eb68d61ace0187333469cdb38ab on supercym:IPV6 into be7c6dd219c250a289ebf7d6d23d2a2b61f32f70 on apache:IPV6.

Firstly,I have seen that there are others commits in this pr.So,I suggest you can rebase your pr's codes in you local machine. @supercym

I review the pr,initially.I have a important question to ask.
In this pr,you may not take acl ip address pattern matching into account.So I suggest you to see the acl module firstly. @supercym

@supercym Could you please check the review comments?

@supercym could you rebase your pr first, this pr brought so many other's commits.


Namespace should be templated

I have a Kustomize HelmChart setup where I can't override the namespace, and the default namespace is used instead.

thanks for your commit, i merged it.

Thank you! I did not increase the version, however, that caused an issue during the release. I've now done so in my fork.


How to Pass Dynamic Id to the route value of Menu attribute

| Question
| ----------------------- | -----------------------
| Laravel Version         | 8.12
| Project Version         | 3.5
Current Behavior
Cant pass dynamic Id value to the route value
Expected Behavior
I wanted the menu link to redirect to a specific school that is assigned to the user.
Steps to Reproduce
[
    'text'  => 'My School',
    'route' => ['school.show', [Auth::user()->principal->id]], // I am trying to make it Dynamic, specific to each user
    'can'   => ['isUserPrincipal']
 ],

@bitzs-alex Take a look to Menu Configuration At Runtime. You can't do that using the adminlte.php configuration file.


[WFLY-16976]: Upgrade jboss metadata to 15.2.0.Beta1

Upgrade jboss metadata to 15.2.0.Beta1 to have jboss descriptors using jakartaee 10 namespace

Jira: https://issues.redhat.com/browse/WFLY-16976
Signed-off-by: Emmanuel Hugonnet<EMAIL_ADDRESS>

Thanks @ehsavoie


feature: add ability to pass body-parser options

WIP. Can be merged only after this is merged+released and we have bumped the version here.

@divyenduz the body-parser-graphql PR is merged & released. Can you rebase + update the dep?

@schickling: This is done. Please let me know if any changes are needed. Thanks.

@divyenduz, @schickling, many thanks!


Error pubspec.yaml: A package may not list itself as a dependency.

Not able to Install the package
Error in flutter pub get
Thanks
Jay
<EMAIL_ADDRESS>
Steps to Reproduce

...
...
...

Logs

@jayantsr,
It's not clear which plugin you are trying to add. Please add steps to replicate and the plugin that you want to add.
Also make sure the plugin name is not same as your project name, that may throw the error you are seeing.
If issue persists, please provide pubspec.yaml.
Thanks.

Sorry I am reporting for the first time in the github.   The Plugin is geofencing 0.1.0 which is released on Sept  10 2020.  https://pub.dev/packages/geofencing.

@darshankawar
thankyou very. much.  It was some other issue with my network.  It's working.  Just to answer. the question.  the Plugin is geofencing 0.1.0.  released on Sept 10, 2020.  Thanks, it's working now.


Say what is using a file is being used by program

Is your feature request related to a problem?
When I do something to a file and it will say "file in use" it should tell me what file it is and what program is using it.

Duplicate of #1681.


[Bug] [Web-Interface] [RocksDB] Cannot rename collection

my environment running ArangoDB
I'm using the latest ArangoDB of the respective release series:

[x] 3.2 Beta4
[x] docker - official docker library

Storage engine: RocksDB
this is a web interface-related issue:
These are the steps to reproduce:

open the browser on http://<IP_ADDRESS>:8529
log in as ...
use database [x] _system [ ] other:
create a collection
then go to the collection's settings and rename that collection, hit "Save"

The following problem occurs: [Screenshot?]
Error message: Please enter a valid number
Instead I would be expecting:
A renamed collection
I guess the form checks for validity of the MMFIles related fields which under RocksDB are not there.

This is probably due to the web UI validating the "journal size" value that is supposed to be there when updating/renaming a collection via the web UI.
The problem is that this value is meaningless with the RocksDB engine and there is no way to enter it in the web UI for RocksDB. So saving/renaming the collection via the web UI will always fail then.

Probably will also happen for indexBuckets value, as can be seen in the code of collectionsItemView.js:
166           if (status === 'loaded') {
167             var journalSize;
168             try {
169               journalSize = JSON.parse($('#change-collection-size').val() * 1024 * 1024);
170             } catch (e) {
171               arangoHelper.arangoError('Please enter a valid number');
172               return 0;
173             }
174
175             var indexBuckets;
176             try {
177               indexBuckets = JSON.parse($('#change-index-buckets').val());
178               if (indexBuckets < 1 || parseInt(indexBuckets, 10) !== Math.pow(2, Math.log2(indexBuckets))) {
179                 throw new Error('invalid indexBuckets value');
180               }
181             } catch (e) {
182               arangoHelper.arangoError('Please enter a valid number of index buckets');
183               return 0;
184             }
185             var callbackChange = function (error) {
186               if (error) {
187                 arangoHelper.arangoError('Collection error: ' + error.responseText);
188               } else {
189                 this.collectionsView.render();
190                 window.modalView.hide();
191               }
192             }.bind(this);
193

Fixed in PR: https://github.com/arangodb/arangodb/pull/2784

Thanks. Will there be a Beta5?

Fix confirmed. Closing


Spelling corrections on right click.

Is Your Feature Request Related to a Problem? Please Describe

I am a terrible speller. Just awful. It's great that beaker highlights misspelled words, however, the right click context menu doesn't provide corrections.
Solution You'd Like

Right click shows top spelling corrections for a misspelled word. This could be always on, or toggleable in the context menu in firefox.
Alternatives You've Considered

Cut and paste the word into search. This makes me more aware that I cannot spell and therefore sad.
Learn to spell properly - while possible, highly unlikely this will ever happen.

Additional Context

It seems electron has a nice api for this. I would be happy to implement if everyone is happy with the addition. Seems simple enough

+1


Rotation Animation

Do you have any instructions on adding rotation Animation?

The sample shows an example of rotating the matrix


More Adjoint Variable Diagnostics

What changes does this PR introduce?
(Bug fix, feature, docs update, ...)
This adds to the previous adjoint diagnostics infrastructure in a couple of ways:

Add all variables in addummy_in_stepping
Add adjoint ptracer variables
Rewrite of addummy_in_stepping to make it ... more compact and easier to add new control variables

What is the current behaviour?
(You can also link to an open issue here)
What is the new behaviour
(if this is a feature change)?
Does this PR introduce a breaking change?
(What changes might users need to make in their application due to this PR?)
I hope not. I did a little bit of testing and it seems to be working
Other information:
This is a work in progress, some other items would be:

[x] Currently both RS and RL variables are dumped. I'm not sure how to handle RS variables with diagnostics bec other than copying them to a temporary variable then printing. This is already done if dumpAdVarExch=2, but perhaps this should always be done for RS variables. Actually, that seems straight forward...
[x] add dumpAdRec as parameter to the dump_adj routines
[x] Add add seaice and exf fields
[x] merge the ptracers_ad_dump with the new dump_adj* routines
[x] verification setup for variables in addummy_in_stepping
[ ] verification setup for variables seaice and exf fields
[ ] verification setup for variables ptracers fields
[ ] dig into frequency=1., error
[ ] add documentation regarding adj etan

As mentioned in MITgcm/xmitgcm#247, using the diagnostics package is nice because xmitgcm can read these adjoint fields "out of the box" (i.e. without adding meta data to xmitgcm/variables.py ... which is good, because anyone using the adjoint needs all the help they can get!
Suggested addition to tag-index
(To avoid unnecessary merge conflicts, please don't update tag-index. One of the admins will do that when merging your pull request.)

Added all current adjoint variables in addummy_in_stepping, and ptracers to work with diagnostics package
Streamlined addummy_in_stepping for mdsio output

Pinging @mjlosch since he was interested :)
I'll get to those to-do notes when I can.

Pinging @mjlosch since he was interested :)
I'll get to those to-do notes when I can.

Hi @timothyas
this looks great. There's actually a routine DIAGNOSTICS_FILL_RS, see recent commit 35cf6b5  , so we can probably tick that box. There are a couple of things that I noticed:

ADJetan is written elsewhere (addummy_for_etan), can we add your machinery there as well?
we should have the code tested in verification experiments as much as possible. I can see that there's something in global_ocean.cs32x15/input_ad, maybe it's worth it to add a second stream with 2D and RS/RL variables. I suggest: 'ADJetan ', 'ADJqnet ', 'ADJempmr', 'ADJtaux ','ADJtauy '. Anything else?
for frequency(3) = 1.,, the model stalls with a Floating point exception:

    frame #0: 0x0000000100ee7642 mitgcmuv_ad`diagnostics_out_ at diagnostics_out.for:4109
   4106	C     a) find the time of the previous multiple of output freq:
   4107	        timeRec(1) = myTime-deltaTClock*0.5D0
   4108	        timeRec(1) = (timeRec(1)-phase(listId))/freq(listId)
-> 4109	        i = INT( timeRec(1) )
   4110	        IF ( timeRec(1).LT.0. ) THEN
   4111	          tmpLoc = FLOAT(i)
   4112	          IF ( timeRec(1).NE.tmpLoc ) i = i - 1

any idea why that's not allowed? -1. seems to work.

We should definitely add seaice and exf fields. I can try to do that, assuming that it happens in seaice_ad_dump.F and exf_adjoint_snapshots_ad.F, right?

Hi @timothyas
this looks great. There's actually a routine DIAGNOSTICS_FILL_RS, see recent commit 35cf6b5  , so we can probably tick that box. There are a couple of things that I noticed:

ADJetan is written elsewhere (addummy_for_etan), can we add your machinery there as well?
we should have the code tested in verification experiments as much as possible. I can see that there's something in global_ocean.cs32x15/input_ad, maybe it's worth it to add a second stream with 2D and RS/RL variables. I suggest: 'ADJetan ', 'ADJqnet ', 'ADJempmr', 'ADJtaux ','ADJtauy '. Anything else?
for frequency(3) = 1.,, the model stalls with a Floating point exception:

    frame #0: 0x0000000100ee7642 mitgcmuv_ad`diagnostics_out_ at diagnostics_out.for:4109
   4106	C     a) find the time of the previous multiple of output freq:
   4107	        timeRec(1) = myTime-deltaTClock*0.5D0
   4108	        timeRec(1) = (timeRec(1)-phase(listId))/freq(listId)
-> 4109	        i = INT( timeRec(1) )
   4110	        IF ( timeRec(1).LT.0. ) THEN
   4111	          tmpLoc = FLOAT(i)
   4112	          IF ( timeRec(1).NE.tmpLoc ) i = i - 1

any idea why that's not allowed? -1. seems to work.

We should definitely add seaice and exf fields. I can try to do that, assuming that it happens in seaice_ad_dump.F and exf_adjoint_snapshots_ad.F, right?

@timothyas It looks like the global variable dumpAdRecMn is different for seaice (dumpAdRecSi) and exf (dumpAdRecEx). This means that we need to pass this as an argument to all dump_adj_*.F routines, right?

@timothyas It looks like the global variable dumpAdRecMn is different for seaice (dumpAdRecSi) and exf (dumpAdRecEx). This means that we need to pass this as an argument to all dump_adj_*.F routines, right?

Thanks for taking a look @mjlosch! I updated the to-do list with a couple of your notes. Here are a couple of replies:

ADJetan is written elsewhere (addummy_for_etan), can we add your machinery there as well?

This one is a bit difficult because the time step is "off by one" with the other variables. Here is what I wrote in #151

The caveat here is that I could not get this to work with the diagnostics package, and this issue is a bit technical. I put the dummy routine in this particular location so that adEtaN gets the impact of adjoint variables from calc_r_star_ad or calc_surf_dr_ad, and before it is integrated through the adjoint model, where adEtaN is zero'd out as sensitivities are passed to other variables. However, at this particular spot adEtaN is a "half" time step off from the other variables, so it did not make sense to fill the diagnostic slots for ADJetan to be printed later via addummy_in_stepping because they would be inconsistent. I also could not think of a way to print individual diagnostic variables at different times. This could be fixed by placing dummy_in_stepping in a similar manner to do_state_vars_diags but for adjoint variables, but this seemed like overkill for a first step.

I remember thinking that the adjoint diagnostics would formally need adjoint equivalents of the routines do_statevars_diags and diagnostics_fill_state, etc, which appropriately handle the time steps.

we should have the code tested in verification experiments as much as possible. I can see that there's something in global_ocean.cs32x15/input_ad, maybe it's worth it to add a second stream with 2D and RS/RL variables. I suggest: 'ADJetan ', 'ADJqnet ', 'ADJempmr', 'ADJtaux ','ADJtauy '. Anything else?

I think that is sufficient at the moment, but seaice adjoint variables are added, maybe some of these could be added to global_ocean.cs32x15/input_ad.seaice. Additionally, adjoint ptracers could be tested in global_oce_biogeo_bling/, which I could add while getting the ptracers dump to work with the new routines.

for frequency(3) = 1.,, the model stalls with a Floating point exception:

No idea what that's about. Added it to the list to dig into

We should definitely add seaice and exf fields. I can try to do that, assuming that it happens in seaice_ad_dump.F and exf_adjoint_snapshots_ad.F, right?

That would be awesome, thank you! 🙏  I believe those are the places, although it seems like the exf routine is commented out of addummy_in_stepping, so off the top of my head I'm not sure if or where it's called.

Thanks for taking a look @mjlosch! I updated the to-do list with a couple of your notes. Here are a couple of replies:

ADJetan is written elsewhere (addummy_for_etan), can we add your machinery there as well?

This one is a bit difficult because the time step is "off by one" with the other variables. Here is what I wrote in #151

The caveat here is that I could not get this to work with the diagnostics package, and this issue is a bit technical. I put the dummy routine in this particular location so that adEtaN gets the impact of adjoint variables from calc_r_star_ad or calc_surf_dr_ad, and before it is integrated through the adjoint model, where adEtaN is zero'd out as sensitivities are passed to other variables. However, at this particular spot adEtaN is a "half" time step off from the other variables, so it did not make sense to fill the diagnostic slots for ADJetan to be printed later via addummy_in_stepping because they would be inconsistent. I also could not think of a way to print individual diagnostic variables at different times. This could be fixed by placing dummy_in_stepping in a similar manner to do_state_vars_diags but for adjoint variables, but this seemed like overkill for a first step.

I remember thinking that the adjoint diagnostics would formally need adjoint equivalents of the routines do_statevars_diags and diagnostics_fill_state, etc, which appropriately handle the time steps.

we should have the code tested in verification experiments as much as possible. I can see that there's something in global_ocean.cs32x15/input_ad, maybe it's worth it to add a second stream with 2D and RS/RL variables. I suggest: 'ADJetan ', 'ADJqnet ', 'ADJempmr', 'ADJtaux ','ADJtauy '. Anything else?

I think that is sufficient at the moment, but seaice adjoint variables are added, maybe some of these could be added to global_ocean.cs32x15/input_ad.seaice. Additionally, adjoint ptracers could be tested in global_oce_biogeo_bling/, which I could add while getting the ptracers dump to work with the new routines.

for frequency(3) = 1.,, the model stalls with a Floating point exception:

No idea what that's about. Added it to the list to dig into

We should definitely add seaice and exf fields. I can try to do that, assuming that it happens in seaice_ad_dump.F and exf_adjoint_snapshots_ad.F, right?

That would be awesome, thank you! 🙏  I believe those are the places, although it seems like the exf routine is commented out of addummy_in_stepping, so off the top of my head I'm not sure if or where it's called.

@timothyas
I added my seaice and elf code, mainly for you to have a look. Unfortunately, it only works when useSEAICE = .FALSE.,, I have no idea why, message(s):
(PID.TID 0000.0001) - WARNING -   diag.#   114 : ADJuvel  (#   1 ) in outp.Stream: adjDiag
(PID.TID 0000.0001) - WARNING -   has not been filled (ndiag=  0 )
(PID.TID 0000.0001) WARNING DIAGNOSTICS_OUT  => write ZEROS instead

etc. Tomorrow is another day.

@timothyas
I added my seaice and elf code, mainly for you to have a look. Unfortunately, it only works when useSEAICE = .FALSE.,, I have no idea why, message(s):
(PID.TID 0000.0001) - WARNING -   diag.#   114 : ADJuvel  (#   1 ) in outp.Stream: adjDiag
(PID.TID 0000.0001) - WARNING -   has not been filled (ndiag=  0 )
(PID.TID 0000.0001) WARNING DIAGNOSTICS_OUT  => write ZEROS instead

etc. Tomorrow is another day.

@timothyas
now the only variable that's not filled ist ADJetan, because that's not implemented. It should be possible to do that better by calling the pair DIAGNOSTICS_SWITCH_ONOFF and DIAGNOSTICS_WRITE_ADJ explicitly at the beginning and at the end of forward step. Currently DIAGNOSTICS_SWITCH_ONOFF is called over and over again in TAF-generated code, which is probably OK, because useDiagnostics should be turned off, but still ...
Note, I am still not enirely sure, if the AD-diagnostics for exf and seaice are properly filled (I mean the correct number of times).

@timothyas
now the only variable that's not filled ist ADJetan, because that's not implemented. It should be possible to do that better by calling the pair DIAGNOSTICS_SWITCH_ONOFF and DIAGNOSTICS_WRITE_ADJ explicitly at the beginning and at the end of forward step. Currently DIAGNOSTICS_SWITCH_ONOFF is called over and over again in TAF-generated code, which is probably OK, because useDiagnostics should be turned off, but still ...
Note, I am still not enirely sure, if the AD-diagnostics for exf and seaice are properly filled (I mean the correct number of times).

@timothyas
I am not sure if I understand the issue with diagnostic ADJetan. If we fill it in addummy_for_etan.F it may be half a time step away from the other variables, but if it is zero, when addummy_in_stepping.F is called, then that's even less useful. I'd rather have a slightly inconsistent diagnostic rather than none, or do I miss something important in the grander scheme of things?
Another question: does it make to to move calling DIAGNOSTICS_SWITCH_ONOFF to autodiff_inadmode_set.F and calling DIAGNOSTICS_WRITE_ADJ to autodiff_inadmode_unset.F? These routines are called at the beginning and end of the AD-forward step, and this would then catch all diagnostics being filled along the way. Again I may be missing something important here.

@timothyas
I am not sure if I understand the issue with diagnostic ADJetan. If we fill it in addummy_for_etan.F it may be half a time step away from the other variables, but if it is zero, when addummy_in_stepping.F is called, then that's even less useful. I'd rather have a slightly inconsistent diagnostic rather than none, or do I miss something important in the grander scheme of things?
Another question: does it make to to move calling DIAGNOSTICS_SWITCH_ONOFF to autodiff_inadmode_set.F and calling DIAGNOSTICS_WRITE_ADJ to autodiff_inadmode_unset.F? These routines are called at the beginning and end of the AD-forward step, and this would then catch all diagnostics being filled along the way. Again I may be missing something important here.

commit 4434b0a implements the ideas of my previous comment. Diagnostics variable ADJetan is filled, but with an offset of 1 time step. If this is a problem, we can revert, but I think it is better than not having it at all, it should just be documented somewhere.

commit 4434b0a implements the ideas of my previous comment. Diagnostics variable ADJetan is filled, but with an offset of 1 time step. If this is a problem, we can revert, but I think it is better than not having it at all, it should just be documented somewhere.

Hey @mjlosch, thanks for pushing this. I did not have a "master plan" for etan. To be honest, I avoided writing it out "improperly" in the earlier PR that I referenced basically because I was still new to everything, and couldn't really decide what to do so it's just good to hear your input. I'm fine with printing adj etan at a (reverse) lag, and we can just note that in the docs that this is the way it is.
As I mentioned in my email, I think moving the SWITCH_ONOFF and WRITE_ADJ calls to the SET/UNSET routines makes sense, and is generally cleaner. I don't see a reason not to do that, but will just look things over when I modify the ptracers.

Hey @mjlosch, thanks for pushing this. I did not have a "master plan" for etan. To be honest, I avoided writing it out "improperly" in the earlier PR that I referenced basically because I was still new to everything, and couldn't really decide what to do so it's just good to hear your input. I'm fine with printing adj etan at a (reverse) lag, and we can just note that in the docs that this is the way it is.
As I mentioned in my email, I think moving the SWITCH_ONOFF and WRITE_ADJ calls to the SET/UNSET routines makes sense, and is generally cleaner. I don't see a reason not to do that, but will just look things over when I modify the ptracers.

@mjlosch

I created a branch on verification_other to run these diagnostics, let me know what you think: https://github.com/timothyas/verification_other/tree/test_adj_diags
added ptracers to the mix, is there a place we can add this for a verification experiment?

Hey @mjlosch just a heads up I rebased this on top of the most recent master branch. It should not create any conflicts, but just letting you know before you pull next.
(this is one of a many branches making up my PhD work, and I had to rebase it to sync it up with the others and string them all together ... it's getting a little ridiculous)

@timothyas

just a heads up I rebased this on top of the most recent master branch. It should not create any conflicts, but just letting you know before you pull next.

what does that mean? can I just pull or will I have to do something different?

Oh yep you can just pull, shouldn't be an issue

@timothyas
I don't know if I understand this rebase stuff. I had to resolve conflicts, which I would have had to commit before going, so I deleted my local branch and check it out again. Now there are only very few point on the list, right? I'll have a look at the frequency=1. error now. And then we can modify the experiments global_ocean.cs32x15.seaice and global_oce_biogeo_bling to get the code tested.

@timothyas
the frequency = 1. error has nothing to do with this PR. I also happens for pure forward simulations: I am testing with global_ocean.cs32x15.seaice, which has a startTime = 72000*86400 = 6.2208E+09
In diagnostics_out.F there's
https://github.com/MITgcm/MITgcm/blob/830e1a2c4c6f4f46908cffb59c28ba6c47110bc8/pkg/diagnostics/diagnostics_out.F#L126-L128
so when freq=1, the INT(very large number) stalls; for freq=-1, this code is not reached, and for freq=86400., which would be appropriate (=deltaTclock in this experiment), everything works.
Question for @jm-c : is there a good way out? Can we "normalise" timeRec(1) like this timeRec(1) = myTime-startTime- deltaTClock*0.5 _d 0? Is this worth an issue?

Sorry for the troubles @mjlosch - I'll chill out with the rebasing... 🙃
Nice debugging @mjlosch. What about adding in diagnostics_readparms something like:
IF (frequency(l).GE. zeroRL) THEN
    freq(n) = MAX(frequency(l), deltaTclock)
ELSE
    freq(n) = MIN(frequency(l),-deltaTclock)
ENDIF

Thinking about that e.g. here
https://github.com/MITgcm/MITgcm/blob/bd16afdcdefcbc67ac6c141b9a1d59a84f529014/pkg/diagnostics/diagnostics_readparms.F#L284-L289
But maybe more appropriate in a separate issue/pr.

I added the following:

documentation regarding ADJetan and update list of available adjoint diagnostics
add ADJ exf variables to global_ocean.cs32x15.seaice
add ADJ ptracer to global_oce_biogeo_bling

Let me know what you think, I'm happy to change any of those things around. Since that completes the original checklist I'll take this off draft mode, but the Work In Progress label is perhaps still appropriate...

@timothyas
great, thank you for the documentation part. Looks like we are done. Let's have someone else review this. Any suggestions? I'd always suggest @jm-c but I am sure he'd be happy if someone else can have a look at this too.

Let's not worry about the diagnostics frequency here. I like your suggestion.  I'll start an issue with this.

@ifenty
would you mind reviewing this PR?

@timothyas @mjlosch This is such a marvelous contribution.  I can see a lot of attention to detail here.  I'll take a quick look by generating new diag adj output from the global 3D and labsea verification experiments.

@timothyas I would like to make few minor adjustments + pass some tests (e.g., where RS is real*4). Thinking it would be easier
to get master (now that PR #406 is merged) merge into this PR since both are dealing  with AUTODIFF things. Can I do that ?

Sure thing @jm-c

@timothyas @jm-c
Merging master into this branch leads to an extra TAF recomputation warning in forward_step (myTime,myIter), at least I didn't see that before. I think this is benign and TAF deals with it properly (I guess) by saving and restoring these two variables, but it would still be good to understand where this comes from. I think it has to do with the fact that we are now passing these  variables to autodiff_inadmode_set/unset_ad.F, but I have no clue why.

Moving the call to AUTODIFF_INADMODE_UNSET at the beginning for FORWARD_STEP behind resetting the model iteration counter and model time fixes this. So I guess, that's already the accepted solution?

Hi both,
I am going to push some minot changes there (iclucing fixing this one) so you don't need to rush.
Cheers,
Jean-Michel
On Fri, Mar 12, 2021 at 01:01:10AM -0800, Martin Losch wrote:

@timothyas @jm-c
Merging master into this branch leads to an extra TAF recomputation warning in forward_step (myTime,myIter), at least I didn't see that before. I think this is benign and TAF deals with it properly (I guess) by saving and restoring these two variables, but it would still be good to understand where this comes from. I think it has to do with the fact that we are now passing these  variables to autodiff_inadmode_set/unset_ad.F, but I have no clue why.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/MITgcm/MITgcm/pull/411#issuecomment-797343419

@timothyas & @mjlosch I think with latest fixes all ADM experiments pass with gfortran & -devel (halfpipe_streamice was not compiling and all 4 global_ocean.90x40x15 were failing to run due to seg-fault reated to adBottomDragFld).
The next thing I am going to push is:

minor argument change in the 4 dump_adj_xy*.F routines ; this fix the compilation when I check for argument consistency
(with intel compiler & -devel) between S/R call and how argument are defined.
in the simplest of the 4, i.e., dump_adj_xy.F I am proposing 2 improvements + better doc of argument list + simplification
(i.e., removing un-needed included header files):
a) avoid calling 2 times COPY_ADVAR_OUTP (for this purpose, I permuted the doDump and filling the diagnostics);
this save one EXCH call (in this particular case); could think of going 1 step further (checking with DIAGNOSTICS_IS_ON)
but not sure it's worth here, at this point.
b) I dont' fill any diagnostics if diagName is '- None -' : This allows user to use this S/R to add a new AD-var output even
when a corresponding diagnostics does not exist (yet).
c) in term of doc: I copied the description of "vType" from file: copy_advar_outp.F ; I think it's useful to have some comments
but not sure if it's the right one.
d) not checked yet with OpenAD (but need to since I remove some included header files)
I suggest you review/improve the suggested changes in dump_adj_xy.F and then we could make similar changes in the 3 others.

Thanks for your changes @jm-c! I agree with all of them - especially a) and b) are nice additions.
In response to c) thanks for adding the vType description, that is the correct one since this is simply getting passed directly to that S/R.
As for OpenAD, it would be great if you could check this, I currently don't have a (quick) way to run it.
Lastly @mjlosch, I compiled and ran global_oce_biogeo_bling and it looks all good. It seems like fixing the placement of AUTODIFF_INADMODE_UNSET fixed the recomputations, since I'm not seeing anything unexpected in the log file. This seems like a clean solution

I can (and will) test OpenAD. It's not the most straightforward test to pass, so it take a little bit of time.

@timothyas And I forgot to mention regarding your suggestion for dump_adj_xy.F, if you don't mind pushing your improvement to this file, it would be great.

Not a problem - done. I'd be happy to copy the improvements you made on _xy to the other three similar files, just let me know if so.

I've checked (and fix) our full set of OpenAD experiments (including isomip by adding PR #442 in my test); I am going to push few minor cleaning, including removing exf_ad_dump.F file: I don't think there is any need to keep this old version which is not longer called since the end of 2007 and might confuse users who are looking at where exf-ad output are done.

Thanks so much for the cleanup and testing @jm-c, it all looks good to me. I just made a commit that deletes some of the includes in addummy_for_etan that you commented out. I can revert that if you disagree, but I thought I'd just push it since it's such a tiny change.
But yep, looks good to me - thanks everyone for the community effort on this one!

OK, going to merge this PR soon. And regarding tag-index addition, will add a little more that what is suggested here at the top of this PR, e.g., seaice & exf ad-diags.

@jm-c Can you please do this merge ASAP?


unable to install on NetBox v 3.4.5

every time I try to install is crashes netbox. is there anyway to get working??
Thanks for the help

I've the same issue and would like to implement in 3.4.5 version

Latest PhoneBox plugin version 0.0.5-beta.1 is now compatible with NetBox 3.2-3.4.


Distinguish between single window and maximize mode window

Description
When using fullscreen 1, maximize mode, it is difficult to distinguish whether the current window is in fullscreen or normal single window state, so I want to make a border color plugin to distinguish
However, there are too many places for border to be re-rendered, so I can't fix the color of border in maximize mode state, just like in this video below, when I switch workspace, the color changes back
https://github.com/hyprwm/Hyprland/assets/30348075/a53d1c03-438c-4e2f-acf6-7428d8bd0591
I wonder if the border in this code can be directly skipped and not executed when it is in the maximize mode state

for example like this:

This way the border color can be customized by the plugin
https://github.com/hyprwm/Hyprland/assets/30348075/be4b515b-dd9d-4488-9643-d7342c8e3731

just windowrulev2 = bordercolor <color>,fullscreen:1 or i'm getting smth wrong?


Dropdown Menus- identifiers not creating pages

Is this a BUG REPORT or FEATURE REQUEST?:
bug
What happened:
I want to add dropdown menus to the site using the example given here. When the dropdowns were added the identifier dropdown did not link to the page. Instead, clicking the identifier dropdown caused the current page to move to it's top (such as examplepage.com/# would do). This happened if I added a url or if the url was left blank.
What you expected to happen:
I expected the identifier dropdown to link to that page.
How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:
Do the dropdown menu pages have to be in a list instead of a single page?
Environment: Windows 10

Syna Theme version:  v0.17.3
Hugo version:  Hugo Static Site Generator v0.74.3/extended windows/amd64
Others:

Thanks for reporting. Yes this seems to be not as one would expect. It seems like it was created in the idea to work like it currently does so.
I agree, that it probably should be as you thought.
Paging @mpourismaiel to get some insights into the why a click on the dropdown doesn't lead to the url, but it needs a separate dropdown item basically duplicating the menu item such as is done within the demo:
[[menu.main]]
  url = "/dev"
  name = "Dev Section"
  weight = 35
  identifier = "dev"

[[menu.main]]
  url = "/dev"
  name = "Dev Section"
  weight = 10
  parent = "dev"

My assumption is the reasoning is on mobile we don't have a hover event and therefore a click is needed to open the dropdown.
Therefore with child menus we need an additional item instead of the main menu item being linkable as the click is used for open/closing the dropdown.

That makes sense- it would be very difficult to hover on mobile...
Any idea why clicking the main menu brings me to the top of the page?

This is hard coded in the code as it still represents a link and I assume the decision was to take you to the top of the page. Probably shouldn't change the state of the page at all I guess.
Ref to the code snippet setting the href to '#': https://github.com/okkur/syna/blob/master/layouts/partials/fragments/nav.html#L71

Hmmm any tips on how to change that so that this doesn't happen? Even on mobile it's taking me back to the top of the page. Tried removing the # in the code snippet which resulted in dropdowns not working.
Any advice would be appreciated!

Will check out a few ideas. In the interim maybe @mpourismaiel also has some thoughts.

@stp-ip I was able to alleviate the issue by deleting line 71 from https://github.com/okkur/syna/blob/master/layouts/partials/fragments/nav.html#L71. This allows the menu to  be opened without the page view reverting to the top of the page.
Follow up question - the only way to exit the drop down menu and stay on the same page is to click the parent. This means that multiple dropdown menus can be open at once (which is fine for mobile, but looks odd on desktop). Is there a way to close a dropdown menu by clicking anywhere on the page that is outside of the menu?

Thanks for the follow-up. Didn't have time to dive deeper into the underlying issue.
In terms of clicking somewhere else to close drop-down. That's a good addition, but is currently not possible.
To be able to track that feature you could open an issue so it doesn't get hurried in here.

@stp-ip Will do - thanks again for all the help!


Current state of WASM threads

I wanted to ask what the current status is of WebAssembly threads with Rust. I know there is this article, which shows how to use threads with wasm-bindgen, however, it's not using the std threads API. I know threads have shipped in Chrome and Firefox and the C++ pthread_create does work. How about Rust? Are there any plans to support std::thread so that we can do something like this in Rust?
thread::spawn(|| {
  // ...
});

I wrote up a bit awhile back at https://github.com/rust-lang/rust/issues/77839, and unfortunately I don't think much has changed in the meantime.

I wrote up a bit awhile back at https://github.com/rust-lang/rust/issues/77839, and unfortunately I don't think much has changed in the meantime.