Closed amalic closed 4 years ago
That shouldn't be happening. Please try ./gradlew run --console=verbose
and post the results here.
having the same problem. I ran the above and got the output below `
Task :versionTxt Task :compileJava UP-TO-DATE Task :processResources UP-TO-DATE Task :classes UP-TO-DATE
Task :run Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/dementia.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/colorectal_cancer.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/self_harm.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/osteoporosis.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/veteran_substance_abuse_conditions.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/veteran_substance_abuse_treatment.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/epilepsy.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/mTBI.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/primary_atrophic_hypothyroidism.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/attention_deficit_disorder.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/medications/ear_infection_antibiotic.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/medications/moderate_opioid_pain_reliever.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/medications/strong_opioid_pain_reliever.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/medications/otc_pain_reliever.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/medications/otc_antihistamine.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/gallstones.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/sore_throat.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/homelessness.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/congestive_heart_failure.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/total_joint_replacement/functional_status_assessments.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/lung_cancer.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/contraceptives.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/sexual_activity.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/appendicitis.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/veteran_lung_cancer.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/opioid_addiction.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/osteoarthritis.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/pregnancy.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/contraceptives/female_sterilization.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/contraceptives/patch_contraceptive.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/contraceptives/oral_contraceptive.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/contraceptives/injectable_contraceptive.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/contraceptives/implant_contraceptive.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/contraceptives/ring_contraceptive.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/contraceptives/male_sterilization.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/contraceptives/clear_contraceptive.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/contraceptives/intrauterine_device.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/veteran.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/surgery/general_anesthesia.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/contraceptive_maintenance.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/veteran_self_harm.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/fibromyalgia.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/veteran_hyperlipidemia.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/lupus.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/cystic_fibrosis.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/dialysis.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/rheumatoid_arthritis.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/urinary_tract_infections.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/metabolic_syndrome_care.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/bronchitis.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/asthma.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/sinusitis.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/copd.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/gout.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/injuries.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/allergies.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/veteran_prostate_cancer.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/wellness_encounters.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/dermatitis.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/lung_cancer/lung_cancer_probabilities.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/food_allergies.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/veteran_ptsd.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/atopy.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/hypothyroidism.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/allergies/outgrow_env_allergies.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/allergies/allergy_panel.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/allergies/outgrow_food_allergies.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/allergies/severe_allergic_reaction.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/allergies/allergy_incidence.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/allergies/immunotherapy.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/allergic_rhinitis.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/female_reproduction.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/veteran_mdd.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/dermatitis/early_severe_eczema_obs.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/dermatitis/moderate_cd_obs.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/dermatitis/severe_cd_obs.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/dermatitis/early_moderate_eczema_obs.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/dermatitis/mid_moderate_eczema_obs.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/dermatitis/mid_severe_eczema_obs.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/veterans/veteran_suicide_probabilities.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/med_rec.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/metabolic_syndrome_disease.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/ear_infections.json Loading /Users/robertbeetel/Workspace/synthea/build/resources/main/modules/total_joint_replacement.json Loaded 88 modules. Running with options: Population: 1 Seed: 1540426208921 Location: Massachusetts Min Age: 0 Max Age: 140 1 -- Antonio44 Koch169 (44 y/o M) Milton, Massachusetts {alive=1, dead=0}`
When it says UP-TO-DATE
it is not actually compiling anything... it checks that no changes have been made since it was last compiled, and if there weren't, it says UP-TO-DATE
and moves on it's merry way.
If it was recompiling, you'd see something like this instead:
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :versionTxt
> Task :compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
> Task :processResources
> Task :classes
> Task :run
Loading /Users/jwalonoski/git/synthea/build/resources/main/modules/dementia.json
Loading /Users/jwalonoski/git/synthea/build/resources/main/modules/colorectal_cancer.json
Loading /Users/jwalonoski/git/synthea/build/resources/main/modules/self_harm.json
Loading /Users/jwalonoski/git/synthea/build/resources/main/modules/osteoporosis.json
...
I can't replicate this issue. Can someone provide steps to reproduce and logs that verify this? If not, I'm going to close this issue.
For clarity, when it says something like
Loading /path/synthea/build/resources/main/modules/dementia.json
These files are not being compiled or downloaded, they are simply being loaded from the local file system into the program memory for execution.
I have created a Dockerfile (plz let me know if you want me to do a pull request). Because gradlew was not working properly I used gradle directly. You will also notice that I removed automated Testing and recompilation when running the command.
To run it you will need Docker on you machine.
Build
docker build --rm -t synthea .
Run You can add your command line arguments after below command. Those will be passed to the command executed in the ENTRYPOINT directive of Docker.
docker run -i --rm -v <local_dir>:/data synthea
Update: Feel free to play around and replace gradle again with gradlew. You'll notice that both build and running the app will take longer via gradlew.
For clarity, when it says something like
Loading /path/synthea/build/resources/main/modules/dementia.json
These files are not being compiled or downloaded, they are simply being loaded from the local file system into the program memory for execution.
Can't you package it in a FAT jar instead and run it via java -jar <fatjar>
Sure, we could package them in a jar... However, the idea was that some people will add, modify, or delete JSON modules after compilation. One long-term goal was that you could use the Module Builder to make such model changes, and then hit a "run" or "execute" button -- which would drop the changes into the modules folder and then generate some patients dynamically.
Regarding docker... I have no strong feelings about this. To be honest, I'm a docker newbie. What sort of maintenance would be required by the project?
I expected the build only to run once. But when running run_synthea, packages are being downloaded and the some build is running.
Would be great if run_synthea would just start the prebuilt app!