diff --git a/db/migrations/6.5.0-6.6.0/modw_supremm.sql b/db/migrations/6.5.0-6.6.0/modw_supremm.sql new file mode 100644 index 00000000..723d1ae8 --- /dev/null +++ b/db/migrations/6.5.0-6.6.0/modw_supremm.sql @@ -0,0 +1,250 @@ + +USE `modw_supremm`; + +DROP TRIGGER IF EXISTS `modw_supremm`.`executable_BUPD`; +DROP TRIGGER IF EXISTS `modw_supremm`.`executable_BINS`; +DROP TABLE IF EXISTS `application_hint`; + +ALTER TABLE `application` + ADD `application_fosid` int(11) NOT NULL DEFAULT -1 AFTER `license_type`, + ADD `url` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL AFTER `application_fosid`; + +CREATE TABLE `application_fos` ( + `id` int(11) NOT NULL, + `description` varchar(256) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +LOCK TABLES `modw_supremm`.`application_fos` WRITE, `modw_supremm`.`application` WRITE; +DELETE IGNORE FROM `modw_supremm`.`application_fos`; +DELETE IGNORE FROM `modw_supremm`.`application`; +INSERT INTO `modw_supremm`.`application` (id, name, license_type, application_fosid, url) VALUES + (-1,'NA','permissive',-1,NULL), + (0,'uncategorized','permissive',1,NULL), + (1,'adcirc','proprietary',1,NULL), + (2,'amber','permissive',2,'http://ambermd.org/'), + (3,'berkeleygw','permissive',1,NULL), + (4,'cactus','permissive',3,'http://cactuscode.org/'), + (5,'casino','proprietary',1,NULL), + (6,'ccsm','permissive',1,NULL), + (7,'cesm','permissive',4,'http://www.cesm.ucar.edu/'), + (8,'charmm','permissive',1,NULL), + (9,'cp2k','permissive',5,'https://www.cp2k.org/'), + (10,'cpmd','proprietary',5,NULL), + (11,'desmond','proprietary',1,NULL), + (12,'enzo','permissive',6,'http://enzo-project.org/'), + (13,'gadget','permissive',6,NULL), + (14,'gamess','permissive',7,NULL), + (15,'gpaw','permissive',1,NULL), + (16,'gromacs','permissive',2,'http://www.gromacs.org/'), + (17,'homme','permissive',4,'https://www.homme.ucar.edu/'), + (18,'lammps','permissive',2,'http://lammps.sandia.gov/'), + (19,'lattice boltzmann','permissive',1,NULL), + (20,'mcnpx','proprietary',1,NULL), + (21,'milc','permissive',8,'http://physics.indiana.edu/~sg/milc.html'), + (22,'mpiblast','permissive',1,NULL), + (23,'namd','permissive',2,'http://www.ks.uiuc.edu/Research/namd/'), + (24,'nwchem','permissive',7,'http://www.nwchem-sw.org/index.php/Main_Page'), + (25,'openfoam','permissive',9,'http://www.openfoam.com/'), + (26,'opensees','permissive',10,'http://opensees.berkeley.edu/'), + (27,'paratec','permissive',5,'http://www.nersc.gov/users/software/applications/materials-science/paratec/'), + (28,'q-espresso','permissive',5,'http://www.quantum-espresso.org/'), + (29,'siesta','permissive',5,'http://departments.icmab.es/leem/siesta/'), + (30,'specfem3d','permissive',10,'https://github.com/geodynamics/specfem3d'), + (31,'superlu','permissive',1,NULL), + (32,'vasp','proprietary',5,NULL), + (33,'wrf','permissive',4,NULL), + (34,'pegasus','proprietary',1,NULL), + (35,'rosetta','permissive',2,'https://www.rosettacommons.org'), + (36,'cybershake','unknown',1,NULL), + (37,'hpcc','permissive',11,'http://icl.cs.utk.edu/hpcc/'), + (38,'aesop','unknown',1,NULL), + (39,'qcff','unknown',1,NULL), + (40,'linpack','permissive',11,'http://www.netlib.org/linpack/'), + (41,'ior','permissive',11,'https://github.com/LLNL/ior'), + (42,'imb','permissive',1,NULL), + (43,'mpi-tile-io','permissive',1,NULL), + (44,'charm++','permissive',1,NULL), + (45,'wien2k','permissive',1,NULL), + (46,'pstgf','unknown',1,NULL), + (47,'stgf','unknown',1,NULL), + (48,'stgfz','unknown',1,NULL), + (49,'parsec','permissive',1,NULL), + (50,'enkf','permissive',1,NULL), + (51,'dsmc','permissive',1,NULL), + (52,'p-flapw','permissive',1,NULL), + (53,'hisq','unknown',1,NULL), + (54,'petsc','permissive',1,NULL), + (55,'h2mol','permissive',1,NULL), + (56,'numactl','permissive',1,NULL), + (57,'matmult','permissive',1,NULL), + (58,'mitgcm','proprietary',1,NULL), + (59,'dl_poly','permissive',2,'http://www.ccp5.ac.uk/DL_POLY_CLASSIC/'), + (60,'vmd','permissive',12,NULL), + (61,'gaussian','proprietary',7,'http://www.gaussian.com/'), + (62,'qmcchem','permissive',5,NULL), + (63,'olympus','unknown',1,NULL), + (64,'visit','permissive',12,'http://www.visitusers.org'), + (65,'meep','permissive',1,NULL), + (66,'sweep3d','permissive',1,NULL), + (67,'wannier90','permissive',1,NULL), + (68,'abinit','permissive',1,NULL), + (69,'qwalk','permissive',5,'http://qwalk.github.io/mainline/'), + (70,'octopus','permissive',1,NULL), + (71,'fdtd','proprietary',13,NULL), + (72,'gipaw','permissive',1,NULL), + (73,'acesiii','permissive',1,NULL), + (74,'q-chem','proprietary',5,NULL), + (75,'castep','proprietary',1,NULL), + (76,'rmhd','permissive',1,NULL), + (77,'aerosoft gasp','proprietary',1,NULL), + (78,'chroma','permissive',8,'http://jeffersonlab.github.io/chroma/'), + (79,'a.out','permissive',1,NULL), + (80,'stellarbox','permissive',1,NULL), + (81,'rocflo','unknown',1,NULL), + (82,'bsr hbd3','unknown',1,NULL), + (83,'mlrho','permissive',1,NULL), + (84,'harm3d','permissive',3,'http://dx.doi.org/10.1088/0004-637X/692/1/411'), + (85,'bsr','unknown',1,NULL), + (86,'nek5000','permissive',9,NULL), + (87,'cfdem','permissive',1,NULL), + (88,'spec','permissive',3,'https://www.black-holes.org/SpEC.html'), + (89,'cdp','unknown',1,NULL), + (90,'swan','permissive',1,NULL), + (91,'mpsolve','permissive',1,NULL), + (92,'openggcm','permissive',1,NULL), + (93,'fdl3di','permissive',1,NULL), + (94,'tmdmpi','unknown',1,NULL), + (95,'gh3d2m','permissive',1,NULL), + (96,'mc3dp','unknown',1,NULL), + (97,'fd3d','permissive',1,NULL), + (98,'3dsg','unknown',1,NULL), + (99,'cmaq_cctm','permissive',1,NULL), + (100,'zeus-mp','permissive',14,'http://www.netpurgatory.com/zeusmp.html'), + (101,'zasp','unknown',1,NULL), + (102,'ifortddwntl.om','unknown',1,NULL), + (103,'uts_ws','unknown',1,NULL), + (104,'transfer','unknown',1,NULL), + (105,'mangll_dgae_snell','unknown',1,NULL), + (106,'md1_mpi','unknown',1,NULL), + (107,'flash4','permissive',1,NULL), + (108,'mhd3d','permissive',14,NULL), + (109,'lesmpi_rankine.a','unknown',1,NULL), + (110,'graph500','permissive',1,NULL), + (111,'nrlmol','unknown',1,NULL), + (112,'PROPRIETARY','permissive',1,NULL), + (113,'adf','proprietary',1,NULL), + (114,'maker','permissive',1,NULL), + (115,'python','permissive',1,NULL), + (116,'nemo','permissive',5,'https://engineering.purdue.edu/gekcogrp/software-projects/nemo5/'), + (117,'lsms','permissive',1,NULL), + (118,'aims','proprietary',1,NULL), + (119,'cnvnator','permissive',1,NULL), + (120,'matlab','permissive',1,NULL), + (121,'arps','permissive',1,NULL), + (122,'chargemol','permissive',1,NULL), + (123,'rsqsim','permissive',1,NULL), + (124,'gizmo','permissive',1,'http://www.tapir.caltech.edu/~phopkins/Site/GIZMO.html'), + (125,'uspex','permissive',1,'http://uspex.stonybrook.edu/uspex.html'), + (126,'hoomd','permissive',1,NULL), + (127,'dumses','permissive',1,NULL), + (128,'titan2d','permissive',1,'https://vhub.org/resources/titan2d'), + (129,'astrogk','permissive',1,'http://newton.physics.uiowa.edu/~ghowes/astrogk/'), + (130,'snoopy','permissive',1,'http://ipag.osug.fr/~lesurg/snoopy_doc/html/index.html'), + (131,'r','permissive',15,'https://www.r-project.org/'), + (132,'unknown (ran under a debugger)','permissive',1,NULL), + (133,'ncbi-blast','permissive',1,'http://blast.ncbi.nlm.nih.gov/Blast.cgi'), + (134,'gnu-octave','permissive',1,'https://www.gnu.org/software/octave/'), + (135,'garli','permissive',1,'http://wiki.hpc.ufl.edu/doc/Garli'), + (136,'orca','permissive',1,'https://orcaforum.cec.mpg.de/'), + (137,'paraview','permissive',12,'http://www.paraview.org/'), + (138,'dirac','permissive',1,'http://diracprogram.org/doku.php'), + (139,'gatk','permissive',1,'https://www.broadinstitute.org/gatk/'), + (140,'varscan','permissive',1,'http://varscan.sourceforge.net/'), + (141,'picard','permissive',1,'http://broadinstitute.github.io/picard/'), + (142,'setsm','permissive',16,'http://www.pgc.umn.edu/elevation/stereo/'), + (143,'gdal','permissive',1,'http://www.gdal.org/'), + (144,'citcoms','permissive',10,'https://geodynamics.org/cig/software/citcoms/'), + (145,'adda','permissive',17,'https://www.openhub.net/p/adda'), + (146,'meld','permissive',2,'https://github.com/laufercenter/meld'), + (147,'osiris','permissive',17,'http://epp.ist.utl.pt/wp/osiris/'), + (148,'chimera','permissive',12,'https://www.cgl.ucsf.edu/chimera'), + (149,'rockstar-galaxies','permissive',6,'https://bitbucket.org/pbehroozi/rockstar-galaxies'), + (150,'swift','permissive',1,'http://swift-lang.org/'), + (151,'castro','permissive',18,'http://boxlib-codes.github.io/Castro/'), + (152,'mdtest','permissive',1,'https://sourceforge.net/projects/mdtest/'), + (153,'waveqlab3d','permissive',1,'https://www.scec.org/publication/7004'), + (154,'msflukss','permissive',14,'http://dl.acm.org/citation.cfm?id=2616499'), + (155,'awp-odc','permissive',10,'https://github.com/HPGeoC/awp-odc-os'), + (156,'fluent','proprietary',9,'http://www.ansys.com/'), + (157,'ls-dyna','permissive',1,'http://www.oasys-software.com/dyna/en/software/ls-dyna.shtml'), + (158,'psdns','permissive',19,'http://www.cs.odu.edu/~mln/ltrs-pdfs/conf-hpc-95-p1.pdf'), + (159,'openatom','permissive',2,'http://charm.cs.illinois.edu/OpenAtom/'), + (160,'changa','permissive',6,'http://www-hpcc.astro.washington.edu/tools/changa.html'), + (161,'maestro','permissive',18,'http://boxlib-codes.github.io/MAESTRO/'), + (162,'caffe','permissive',20,'http://caffe.berkeleyvision.org/'), + (163,'hpcg','permissive',11,'https://software.sandia.gov/hpcg/html/index.html'), + (164,'feap','permissive',21,'http://www.ce.berkeley.edu/~sanjay/FEAP/feap.html'), + (165,'system applications','permissive',22,NULL), + (166,'star-ccm+','proprietary',9,'http://www.ce.berkeley.edu/~sanjay/FEAP/feap.html'), + (167,'neo-rxchf','permissive',23,NULL), + (168,'episimdemics','permissive',24,'http://charm.cs.uiuc.edu/research/episim'), + (169,'alya','permissive',9,'http://www.bsc.es/es/computer-applications/alya-system'), + (170,'distuf','permissive',19,NULL), + (171,'eve','permissive',25,'https://tavazoielab.c2b2.columbia.edu/EVE/'), + (172,'moose','permissive',26,'http://mooseframework.org/'), + (173,'X11 applications','permissive',22,NULL), + (174,'specfem2d','permissive',10,'https://github.com/geodynamics/specfem2d'), + (175,'hadoop','permissive',27,'https://github.com/glennklockwood/myhadoop/'), + (176,'supremm','permissive',28,'http://xdmod.sourceforge.net/'), + (177,'vpic','permissive',29,'https://github.com/losalamos/vpic'), + (178,'rmgdft','permissive',5,'https://sourceforge.net/p/rmgdft/wiki/Home/'), + (179,'ramses','permissive',6,'http://dx.doi.org/10.1051/0004-6361:20011817'), + (180,'lsqr','permissive',10,'http://www.cs.ucf.edu/~lwang/LSQR.html'), + (181,'cg-md','permissive',2,'http://pubs.acs.org/doi/abs/10.1021/ct400727q'), + (182,'ppm','permissive',19,'https://www.xsede.org/documents/271087/586927/Woodward.pdf'), + (183,'wsmp','permissive',1,'http://researcher.watson.ibm.com/researcher/view_group.php?id=1426'), + (184,'lsu3shell','permissive',1,'https://arxiv.org/abs/1602.02965'), + (185,'sord','permissive',10,'http://gely.github.io/coseis/docs/SORD.html'), + (186,'grips','permissive',1,'https://bluewaters.ncsa.illinois.edu/documents/10157/c321b78f-5176-495c-b34b-a229dbbf96a4'), + (187,'plascomcm','permissive',17,'https://bitbucket.org/xpacc/plascomcm'), + (188,'mconv','permissive',14,'https://bluewaterssymposium2015.sched.org/event/38Pr/astro-robert-f-stein-ab-initial-models-of-solar-activity'), + (189,'INTERACTIVE','permissive',1,NULL), + (190,'cgmd','permissive',2,'https://vothgroup.uchicago.edu/research/multiscale-theory-and-simulations-biomolecular-systems'), + (191,'3dh','permissive',29,'http://www.ncsa.illinois.edu/news/stories/ESSsolar/'), + (192,'hmc','permissive',8,NULL), + (193,'SYSTEM TESTING','permissive',22,NULL); +INSERT INTO + `modw_supremm`.`application_fos` (id, description) +VALUES + (-1,'NA'), + (1,'uncategorized'), + (2,'Molecular Dynamics'), + (3,'General Relativity'), + (4,'Climate and Weather'), + (5,'Material Science'), + (6,'Cosmology'), + (7,'Computational Chemistry'), + (8,'Quantum Chromo Dynamics'), + (9,'Computational Fluid Dynamics'), + (10,'Earthquakes/Seismology'), + (11,'Benchmarking'), + (12,'Visualization'), + (13,'Atmostpheric Science'), + (14,'Magnetohydrodynamics'), + (15,'Statistical Analysis'), + (16,'Earth Science'), + (17,'Physics'), + (18,'Stellar Atmospheres and Supernovae'), + (19,'Turbulence'), + (20,'Machine Learning'), + (21,'Finite Element Analysis'), + (22,'None'), + (23,'Quantum Chemistry'), + (24,'Social Networks'), + (25,'Cellular Evolution'), + (26,'Computational Mechanics'), + (27,'Map Reduce'), + (28,'System Monitoring'), + (29,'Plasmas/Magnetosphere'); +UNLOCK TABLES diff --git a/etl/js/config/supremm/app_ident.js b/etl/js/config/supremm/app_ident.js new file mode 100644 index 00000000..932fc944 --- /dev/null +++ b/etl/js/config/supremm/app_ident.js @@ -0,0 +1,118 @@ +"use strict"; + +module.exports = function(configfile) { + + var fs = require("fs"); + var appconf = JSON.parse(fs.readFileSync(configfile, 'utf8')); + + var i; + for (i = 0; i < appconf.length; i++) { + appconf[i].realname = appconf[i].name; + if (appconf[i].license_type != "permissive") { + appconf[i].name = "PROPRIETARY"; + } + } + + var pathregex = []; + var execregex = []; + var simplematches = []; + + var init = function() { + + var pathmatch = []; + var pathappid = []; + var legacyexact = []; + var legacyappid = []; + var execmatch = []; + var execappid = []; + + var i, j; + for (i = 0; i < appconf.length; i++) { + if (appconf[i].name == 'NA' || appconf[i].name == 'uncategorized') { + continue; + } + + if (appconf[i].pathmatch) { + pathmatch.push('(' + appconf[i].pathmatch.join('\|') + ')'); + pathappid.push(i); + } + + if (appconf[i].execmatch) { + execmatch.push('(' + appconf[i].execmatch.join('\|') + ')'); + execappid.push(i); + } + + if (appconf[i].hints) { + var exact = []; + for (j = 0; j < appconf[i].hints.length; j++) { + exact.push('^' + appconf[i].hints[j] + '$'); + simplematches.push({pattern: appconf[i].hints[j].toLocaleLowerCase(), appid: i}); + } + if (exact.length > 0) { + legacyexact.push('(' + exact.join('\|') + ')'); + legacyappid.push(i); + } + } + } + + if (pathmatch.length > 0) { + pathregex.push({regex: new RegExp(pathmatch.join('\|'), 'i'), appid: pathappid}); + } + + if (execmatch.length > 0) { + execregex.push({regex: new RegExp(execmatch.join('\|'), 'i'), appid: execappid}); + } + + if (legacyexact.length > 0) { + execregex.push({regex: new RegExp(legacyexact.join('\|'), 'i'), appid: legacyappid}); + } + }; + + var getmatch = function(regex, cmdline) { + var appindex = null; + + var match = regex.exec(cmdline); + if (match) { + match.some(function(value, index) { + if (index > 0 && value) { + appindex = index - 1; + return true; + } + return false; + }); + } + + return appindex; + }; + + init(); + + return function(cmdline) { + var i, index, execstr, cmdtoks; + + cmdtoks = cmdline.split('/'); + execstr = cmdtoks[cmdtoks.length - 1]; + + for (i = 0; i < pathregex.length; i++) { + index = getmatch(pathregex[i].regex, cmdline); + if (index !== null) { + return appconf[pathregex[i].appid[index]]; + } + } + + for (i = 0; i < execregex.length; i++) { + index = getmatch(execregex[i].regex, execstr); + if (index !== null) { + return appconf[execregex[i].appid[index]]; + } + } + var lowercmd = execstr.toLocaleLowerCase(); + for (i = 0; i < simplematches.length; i++) { + if (lowercmd.indexOf(simplematches[i].pattern) !== -1) { + return appconf[simplematches[i].appid]; + } + } + return null; + }; +}; + diff --git a/etl/js/config/supremm/application.json b/etl/js/config/supremm/application.json index 5f78f10b..ee577496 100644 --- a/etl/js/config/supremm/application.json +++ b/etl/js/config/supremm/application.json @@ -3,17 +3,12 @@ "id": -1, "name": "NA", "license_type": "permissive", - "hints": [ - "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - ] + "science_area": "NA" }, { "id": 0, "name": "uncategorized", - "license_type": "permissive", - "hints": [ - "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" - ] + "license_type": "permissive" }, { "id": 1, @@ -27,6 +22,8 @@ "id": 2, "name": "amber", "license_type": "permissive", + "url": "http://ambermd.org/", + "science_area": "Molecular Dynamics", "hints": [ "amber", "MMPBSA", @@ -55,6 +52,11 @@ "id": 4, "name": "cactus", "license_type": "permissive", + "url": "http://cactuscode.org/", + "science_area": "General Relativity", + "pathmatch": [ + "BATCH\\/exec$" + ], "hints": [ "cactus" ] @@ -79,6 +81,8 @@ "id": 7, "name": "cesm", "license_type": "permissive", + "url": "http://www.cesm.ucar.edu/", + "science_area": "Climate and Weather", "hints": [ "cesm" ] @@ -95,6 +99,8 @@ "id": 9, "name": "cp2k", "license_type": "permissive", + "url": "https://www.cp2k.org/", + "science_area": "Material Science", "hints": [ "cp2k" ] @@ -103,6 +109,7 @@ "id": 10, "name": "cpmd", "license_type": "proprietary", + "science_area": "Material Science", "hints": [ "cpmd" ] @@ -119,6 +126,8 @@ "id": 12, "name": "enzo", "license_type": "permissive", + "url": "http://enzo-project.org/", + "science_area": "Cosmology", "hints": [ "enzo", "ring.exe" @@ -128,6 +137,7 @@ "id": 13, "name": "gadget", "license_type": "permissive", + "science_area": "Cosmology", "hints": [ "gadget" ] @@ -136,6 +146,7 @@ "id": 14, "name": "gamess", "license_type": "permissive", + "science_area": "Computational Chemistry", "hints": [ "gamess", "rungms" @@ -153,6 +164,15 @@ "id": 16, "name": "gromacs", "license_type": "permissive", + "url": "http://www.gromacs.org/", + "science_area": "Molecular Dynamics", + "execmatch": [ + "^g_anadock", + "^g_cluster", + "^g_pme_error", + "^g_rama", + "^trjconv" + ], "hints": [ "gromacs", "mdrun", @@ -165,6 +185,8 @@ "id": 17, "name": "homme", "license_type": "permissive", + "url": "https://www.homme.ucar.edu/", + "science_area": "Climate and Weather", "hints": [ "homme", "preqx" @@ -174,6 +196,8 @@ "id": 18, "name": "lammps", "license_type": "permissive", + "url": "http://lammps.sandia.gov/", + "science_area": "Molecular Dynamics", "hints": [ "lammps", "lmp" @@ -198,8 +222,14 @@ { "id": 21, "name": "milc", - "url": "http://physics.indiana.edu/~sg/milc.html", "license_type": "permissive", + "url": "http://physics.indiana.edu/~sg/milc.html", + "science_area": "Quantum Chromo Dynamics", + "execmatch": [ + "^ks_spectrum", + "^su3_rmd", + "^su3_rhmc" + ], "hints": [ "milc", "su3_hmc_sf_pcac", @@ -219,6 +249,8 @@ "id": 23, "name": "namd", "license_type": "permissive", + "url": "http://www.ks.uiuc.edu/Research/namd/", + "science_area": "Molecular Dynamics", "hints": [ "namd" ] @@ -227,6 +259,8 @@ "id": 24, "name": "nwchem", "license_type": "permissive", + "url": "http://www.nwchem-sw.org/index.php/Main_Page", + "science_area": "Computational Chemistry", "hints": [ "nwchem" ] @@ -234,8 +268,9 @@ { "id": 25, "name": "openfoam", - "url": "http://www.openfoam.com/", "license_type": "permissive", + "url": "http://www.openfoam.com/", + "science_area": "Computational Fluid Dynamics", "hints": [ "foam", "cfdemSolverIB", @@ -251,6 +286,8 @@ "id": 26, "name": "opensees", "license_type": "permissive", + "url": "http://opensees.berkeley.edu/", + "science_area": "Earthquakes/Seismology", "hints": [ "opensees" ] @@ -259,6 +296,8 @@ "id": 27, "name": "paratec", "license_type": "permissive", + "url": "http://www.nersc.gov/users/software/applications/materials-science/paratec/", + "science_area": "Material Science", "hints": [ "paratec" ] @@ -267,6 +306,8 @@ "id": 28, "name": "q-espresso", "license_type": "permissive", + "url": "http://www.quantum-espresso.org/", + "science_area": "Material Science", "hints": [ "bands.x", "cp.x", @@ -289,7 +330,9 @@ { "id": 29, "name": "siesta", - "license_type": "proprietary", + "license_type": "permissive", + "url": "http://departments.icmab.es/leem/siesta/", + "science_area": "Material Science", "hints": [ "siesta", "tbtrans" @@ -299,6 +342,8 @@ "id": 30, "name": "specfem3d", "license_type": "permissive", + "url": "https://github.com/geodynamics/specfem3d", + "science_area": "Earthquakes/Seismology", "hints": [ "specfem3d", "xmeshfem3D" @@ -316,6 +361,7 @@ "id": 32, "name": "vasp", "license_type": "proprietary", + "science_area": "Material Science", "hints": [ "vasp", "vp" @@ -325,6 +371,7 @@ "id": 33, "name": "wrf", "license_type": "permissive", + "science_area": "Climate and Weather", "hints": [ "arwpost", "geogrid", @@ -349,6 +396,12 @@ "id": 35, "name": "rosetta", "license_type": "permissive", + "url": "https://www.rosettacommons.org", + "science_area": "Molecular Dynamics", + "execmatch": [ + "^pepspec", + "^fixbb" + ], "hints": [ "minimize.default.linuxgccrelease" ] @@ -365,6 +418,8 @@ "id": 37, "name": "hpcc", "license_type": "permissive", + "url": "http://icl.cs.utk.edu/hpcc/", + "science_area": "Benchmarking", "hints": [ "hpcc" ] @@ -389,6 +444,8 @@ "id": 40, "name": "linpack", "license_type": "permissive", + "url": "http://www.netlib.org/linpack/", + "science_area": "Benchmarking", "hints": [ "xhpl_mvapich2_version5", "xhpl_intel64_dynamic", @@ -400,6 +457,8 @@ "id": 41, "name": "ior", "license_type": "permissive", + "url": "https://github.com/LLNL/ior", + "science_area": "Benchmarking", "hints": [ "ior" ] @@ -547,6 +606,8 @@ "id": 59, "name": "dl_poly", "license_type": "permissive", + "url": "http://www.ccp5.ac.uk/DL_POLY_CLASSIC/", + "science_area": "Molecular Dynamics", "hints": [ "dlpoly" ] @@ -555,6 +616,7 @@ "id": 60, "name": "vmd", "license_type": "permissive", + "science_area": "Visualization", "hints": [ "vmd" ] @@ -563,27 +625,33 @@ "id": 61, "name": "gaussian", "license_type": "proprietary", - "hints": [ - "g09", - "l906.exe", - "l703.exe", - "l401.exe", - "l502.exe", - "l9999.exe", - "l904.exe", - "l804.exe", - "l801.exe", - "l701.exe", - "l601.exe", - "l508.exe", - "l1101.exe", - "l1002.exe" + "url": "http://www.gaussian.com/", + "science_area": "Computational Chemistry", + "execmatch": [ + "^g09", + "^l101.exe", + "^l906.exe", + "^l703.exe", + "^l401.exe", + "^l301.exe", + "^l302.exe", + "^l502.exe", + "^l9999.exe", + "^l904.exe", + "^l804.exe", + "^l801.exe", + "^l701.exe", + "^l601.exe", + "^l508.exe", + "^l1101.exe", + "^l1002.exe" ] }, { "id": 62, "name": "qmcchem", "license_type": "permissive", + "science_area": "Material Science", "hints": [ "qmc" ] @@ -599,8 +667,12 @@ { "id": 64, "name": "visit", - "url": "http://www.visitusers.org", "license_type": "permissive", + "url": "http://www.visitusers.org", + "science_area": "Visualization", + "execmatch": [ + "^visit$" + ], "hints": [ "engine_par", "engine_ser" @@ -642,6 +714,8 @@ "id": 69, "name": "qwalk", "license_type": "permissive", + "url": "http://qwalk.github.io/mainline/", + "science_area": "Material Science", "hints": [ "qwalk" ] @@ -658,6 +732,7 @@ "id": 71, "name": "fdtd", "license_type": "proprietary", + "science_area": "Atmostpheric Science", "hints": [ "fdtd" ] @@ -682,6 +757,7 @@ "id": 74, "name": "q-chem", "license_type": "proprietary", + "science_area": "Material Science", "hints": [ "qcprog.exe" ] @@ -713,17 +789,24 @@ { "id": 78, "name": "chroma", - "license_type": "unknown", + "license_type": "permissive", + "url": "http://jeffersonlab.github.io/chroma/", + "science_area": "Quantum Chromo Dynamics", "hints": [ "chroma" + ], + "execmatch": [ + "^chroma\\.parscalar", + "^harom[\\._]parscalar", + "^hmc_parscalar" ] }, { "id": 79, "name": "a.out", "license_type": "permissive", - "hints": [ - "a.out" + "execmatch": [ + "^a.out$" ] }, { @@ -763,6 +846,8 @@ "id": 84, "name": "harm3d", "license_type": "permissive", + "url": "http://dx.doi.org/10.1088/0004-637X/692/1/411", + "science_area": "General Relativity", "hints": [ "harm3d" ] @@ -779,6 +864,7 @@ "id": 86, "name": "nek5000", "license_type": "permissive", + "science_area": "Computational Fluid Dynamics", "hints": [ "nek5000" ] @@ -795,8 +881,15 @@ "id": 88, "name": "spec", "license_type": "permissive", - "hints": [ - "spec" + "url": "https://www.black-holes.org/SpEC.html", + "science_area": "General Relativity", + "execmatch": [ + "^spec$", + "^ApplyObservers$", + "^EvolveHyperbolicSystem$", + "^TrajectoryToSpatialCoordMapFiles$", + "^DomainInfo$", + "^SurfaceToSpatialCoordMapFiles$" ] }, { @@ -891,6 +984,8 @@ "id": 100, "name": "zeus-mp", "license_type": "permissive", + "url": "http://www.netpurgatory.com/zeusmp.html", + "science_area": "Magnetohydrodynamics", "hints": [ "zeusmp" ] @@ -955,6 +1050,7 @@ "id": 108, "name": "mhd3d", "license_type": "permissive", + "science_area": "Magnetohydrodynamics", "hints": [ "mhd3d" ] @@ -1022,6 +1118,8 @@ "id": 116, "name": "nemo", "license_type": "permissive", + "url": "https://engineering.purdue.edu/gekcogrp/software-projects/nemo5/", + "science_area": "Material Science", "hints": [ "nemo" ] @@ -1086,8 +1184,8 @@ { "id": 124, "name": "gizmo", - "url": "http://www.tapir.caltech.edu/~phopkins/Site/GIZMO.html", "license_type": "permissive", + "url": "http://www.tapir.caltech.edu/~phopkins/Site/GIZMO.html", "hints": [ "GIZMO" ] @@ -1095,8 +1193,8 @@ { "id": 125, "name": "uspex", - "url": "http://uspex.stonybrook.edu/uspex.html", "license_type": "permissive", + "url": "http://uspex.stonybrook.edu/uspex.html", "hints": [ "mpi-run-1cpus-uspex.o", "mpi-run-1cpus-uspex-once.o" @@ -1121,8 +1219,8 @@ { "id": 128, "name": "titan2d", - "url": "https://vhub.org/resources/titan2d", "license_type": "permissive", + "url": "https://vhub.org/resources/titan2d", "hints": [ "titan" ] @@ -1130,8 +1228,8 @@ { "id": 129, "name": "astrogk", - "url": "http://newton.physics.uiowa.edu/~ghowes/astrogk/", "license_type": "permissive", + "url": "http://newton.physics.uiowa.edu/~ghowes/astrogk/", "hints": [ "agk" ] @@ -1139,18 +1237,21 @@ { "id": 130, "name": "snoopy", - "url": "http://ipag.osug.fr/~lesurg/snoopy_doc/html/index.html", "license_type": "permissive", + "url": "http://ipag.osug.fr/~lesurg/snoopy_doc/html/index.html", "hints": [ "snoopy" ] - }, { "id": 131, "name": "r", - "url": "https://www.r-project.org/", "license_type": "permissive", + "url": "https://www.r-project.org/", + "science_area": "Statistical Analysis", + "execmatch": [ + "^R$" + ], "hints": [ "Rscript", "RMPISNOW" @@ -1164,14 +1265,15 @@ "valgrind", "perfexpert", "ddt-debugger", + "gdb", "hpcrun" ] }, { "id": 133, "name": "ncbi-blast", - "url": "http://blast.ncbi.nlm.nih.gov/Blast.cgi", "license_type": "permissive", + "url": "http://blast.ncbi.nlm.nih.gov/Blast.cgi", "hints": [ "blastx" ] @@ -1179,8 +1281,8 @@ { "id": 134, "name": "gnu-octave", - "url": "https://www.gnu.org/software/octave/", "license_type": "permissive", + "url": "https://www.gnu.org/software/octave/", "hints": [ "octave" ] @@ -1188,8 +1290,8 @@ { "id": 135, "name": "garli", - "url": "http://wiki.hpc.ufl.edu/doc/Garli", "license_type": "permissive", + "url": "http://wiki.hpc.ufl.edu/doc/Garli", "hints": [ "Garli" ] @@ -1197,8 +1299,8 @@ { "id": 136, "name": "orca", - "url": "https://orcaforum.cec.mpg.de/", "license_type": "permissive", + "url": "https://orcaforum.cec.mpg.de/", "hints": [ "orca_cpscf", "orca_scf", @@ -1209,8 +1311,9 @@ { "id": 137, "name": "paraview", - "url": "http://www.paraview.org/", "license_type": "permissive", + "url": "http://www.paraview.org/", + "science_area": "Visualization", "hints": [ "pvbatch", "pvserver" @@ -1219,8 +1322,8 @@ { "id": 138, "name": "dirac", - "url": "http://diracprogram.org/doku.php", "license_type": "permissive", + "url": "http://diracprogram.org/doku.php", "hints": [ "dirac.x" ] @@ -1228,8 +1331,8 @@ { "id": 139, "name": "gatk", - "url": "https://www.broadinstitute.org/gatk/", "license_type": "permissive", + "url": "https://www.broadinstitute.org/gatk/", "hints": [ "GenomeAnalysisTK.jar" ] @@ -1237,18 +1340,20 @@ { "id": 140, "name": "varscan", - "url": "http://varscan.sourceforge.net/", "license_type": "permissive", + "url": "http://varscan.sourceforge.net/", + "execmatch": [ + "^VarScan.*\\.jar$" + ], "hints": [ - "VarScan.jar", - "VarScan.v%.jar" + "VarScan.jar" ] }, { "id": 141, "name": "picard", - "url": "http://broadinstitute.github.io/picard/", "license_type": "permissive", + "url": "http://broadinstitute.github.io/picard/", "hints": [ "picard.jar" ] @@ -1256,8 +1361,9 @@ { "id": 142, "name": "setsm", - "url": "http://www.pgc.umn.edu/elevation/stereo/", "license_type": "permissive", + "url": "http://www.pgc.umn.edu/elevation/stereo/", + "science_area": "Earth Science", "hints": [ "setsm" ] @@ -1265,8 +1371,8 @@ { "id": 143, "name": "gdal", - "url": "http://www.gdal.org/", "license_type": "permissive", + "url": "http://www.gdal.org/", "hints": [ "gdal" ] @@ -1274,17 +1380,21 @@ { "id": 144, "name": "citcoms", - "url": "https://geodynamics.org/cig/software/citcoms/", "license_type": "permissive", - "hints": [ - "mpipycitcoms" + "url": "https://geodynamics.org/cig/software/citcoms/", + "science_area": "Earthquakes/Seismology", + "execmatch": [ + "^mpipycitcoms", + "^pycitcoms", + "^citcoms" ] }, { "id": 145, "name": "adda", - "url": "https://www.openhub.net/p/adda", "license_type": "permissive", + "url": "https://www.openhub.net/p/adda", + "science_area": "Physics", "hints": [ "adda_mpi" ] @@ -1292,8 +1402,9 @@ { "id": 146, "name": "meld", - "url": "https://github.com/laufercenter/meld", "license_type": "permissive", + "url": "https://github.com/laufercenter/meld", + "science_area": "Molecular Dynamics", "hints": [ "launch_remd" ] @@ -1301,8 +1412,9 @@ { "id": 147, "name": "osiris", - "url": "http://www.ncbi.nlm.nih.gov/projects/SNP/osiris", "license_type": "permissive", + "url": "http://epp.ist.utl.pt/wp/osiris/", + "science_area": "Physics", "hints": [ "osiris-" ] @@ -1310,8 +1422,9 @@ { "id": 148, "name": "chimera", - "url": "https://www.cgl.ucsf.edu/chimera", "license_type": "permissive", + "url": "https://www.cgl.ucsf.edu/chimera", + "science_area": "Visualization", "hints": [ "CHIMERA3D" ] @@ -1319,8 +1432,9 @@ { "id": 149, "name": "rockstar-galaxies", - "url": "https://bitbucket.org/pbehroozi/rockstar-galaxies", "license_type": "permissive", + "url": "https://bitbucket.org/pbehroozi/rockstar-galaxies", + "science_area": "Cosmology", "hints": [ "rockstar-galaxies" ] @@ -1328,8 +1442,8 @@ { "id": 150, "name": "swift", - "url": "http://swift-lang.org/", "license_type": "permissive", + "url": "http://swift-lang.org/", "hints": [ "cscript" ] @@ -1337,17 +1451,18 @@ { "id": 151, "name": "castro", - "url": "http://boxlib-codes.github.io/Castro/", "license_type": "permissive", - "hints": [ - "Castro3d" + "url": "http://boxlib-codes.github.io/Castro/", + "science_area": "Stellar Atmospheres and Supernovae", + "execmatch": [ + "^Castro[23]d" ] }, { "id": 152, "name": "mdtest", - "url": "https://sourceforge.net/projects/mdtest/", "license_type": "permissive", + "url": "https://sourceforge.net/projects/mdtest/", "hints": [ "mdtest" ] @@ -1355,8 +1470,8 @@ { "id": 153, "name": "waveqlab3d", - "url": "https://www.scec.org/publication/7004", "license_type": "permissive", + "url": "https://www.scec.org/publication/7004", "hints": [ "waveqlab3d" ] @@ -1364,19 +1479,414 @@ { "id": 154, "name": "msflukss", - "url": "", "license_type": "permissive", + "url": "http://dl.acm.org/citation.cfm?id=2616499", + "science_area": "Magnetohydrodynamics", "hints": [ "MHDAM3d.Linux" ] }, { "id": 155, - "name": "awp-odc-os", - "url": "https://github.com/HPGeoC/awp-odc-os", + "name": "awp-odc", "license_type": "permissive", + "url": "https://github.com/HPGeoC/awp-odc-os", + "science_area": "Earthquakes/Seismology", "hints": [ "pmcl3d" ] + }, + { + "id": 156, + "name": "fluent", + "license_type": "proprietary", + "url": "http://www.ansys.com/", + "science_area": "Computational Fluid Dynamics", + "execmatch": [ + "^fluent" + ] + }, + { + "id": 157, + "name": "ls-dyna", + "license_type": "permissive", + "url": "http://www.oasys-software.com/dyna/en/software/ls-dyna.shtml", + "execmatch": [ + "^mppdyna", + "^ls-dyna" + ] + }, + { + "id": 158, + "name": "psdns", + "license_type": "permissive", + "url": "http://www.cs.odu.edu/~mln/ltrs-pdfs/conf-hpc-95-p1.pdf", + "science_area": "Turbulence", + "execmatch": [ + "^DNS2d_", + "^PSDNS_" + ] + }, + { + "id": 159, + "name": "openatom", + "license_type": "permissive", + "url": "http://charm.cs.illinois.edu/OpenAtom/", + "science_area": "Molecular Dynamics", + "execmatch": [ + "^OpenAtom" + ] + }, + { + "id": 160, + "name": "changa", + "license_type": "permissive", + "url": "http://www-hpcc.astro.washington.edu/tools/changa.html", + "science_area": "Cosmology", + "execmatch": [ + "^ChaNGa" + ] + }, + { + "id": 161, + "name": "maestro", + "license_type": "permissive", + "url": "http://boxlib-codes.github.io/MAESTRO/", + "science_area": "Stellar Atmospheres and Supernovae", + "execmatch": [ + "^maestro", + "main\\.Linux\\.Cray.*\\.exe" + ] + }, + { + "id": 162, + "name": "caffe", + "license_type": "permissive", + "url": "http://caffe.berkeleyvision.org/", + "science_area": "Machine Learning", + "hints": [ + "caffenet" + ] + }, + { + "id": 163, + "name": "hpcg", + "license_type": "permissive", + "url": "https://software.sandia.gov/hpcg/html/index.html", + "science_area": "Benchmarking", + "execmatch": [ + "^xhpcg" + ] + }, + { + "id": 164, + "name": "feap", + "license_type": "permissive", + "url": "http://www.ce.berkeley.edu/~sanjay/FEAP/feap.html", + "science_area": "Finite Element Analysis", + "execmatch": [ + "^feap" + ] + }, + { + "id": 165, + "name": "system applications", + "license_type": "permissive", + "science_area": "None", + "execmatch": [ + "^sh$", + "^bash$", + "^csh$", + "^touch$", + "^cat$", + "^zcat$", + "^cp$", + "^chmod$", + "^df$", + "^find$", + "^locate$", + "^hostname$", + "^vmstat$", + "^pwd$", + "^ls$", + "^sleep$", + "^true$", + "^which$", + "^uname$", + "^top$", + "^ulimit$", + "^uptime$", + "^mount$", + "^date$", + "^dd$", + "^dmesg$", + "^tar$" + ] + }, + { + "id": 166, + "name": "star-ccm+", + "license_type": "proprietary", + "url": "http://www.ce.berkeley.edu/~sanjay/FEAP/feap.html", + "science_area": "Computational Fluid Dynamics", + "execmatch": [ + "^star-ccm" + ] + }, + { + "id": 167, + "name": "neo-rxchf", + "license_type": "permissive", + "science_area": "Quantum Chemistry", + "pathmatch": [ + "\\/NEO-RXCHF\\/" + ] + }, + { + "id": 168, + "name": "episimdemics", + "license_type": "permissive", + "url": "http://charm.cs.uiuc.edu/research/episim", + "science_area": "Social Networks", + "execmatch": [ + "^EpiSimdemics" + ] + }, + { + "name": "alya", + "license_type": "permissive", + "url": "http://www.bsc.es/es/computer-applications/alya-system", + "science_area": "Computational Fluid Dynamics", + "execmatch": [ + "^alya" + ] + }, + { + "name": "distuf", + "license_type": "permissive", + "science_area": "Turbulence", + "execmatch": [ + "^distuf" + ] + }, + { + "name": "eve", + "license_type": "permissive", + "url": "https://tavazoielab.c2b2.columbia.edu/EVE/", + "science_area": "Cellular Evolution", + "execmatch": [ + "^eve$" + ] + }, + { + "name": "moose", + "license_type": "permissive", + "url": "http://mooseframework.org/", + "science_area": "Computational Mechanics", + "execmatch": [ + "^moose_", + "^darcy_thermo_mech" + ] + }, + { + "name": "X11 applications", + "license_type": "permissive", + "science_area": "None", + "execmatch": [ + "^x11$", + "^Xorg$", + "^vncserver$", + "^xterm$", + "^xclock$" + ] + }, + { + "name": "specfem2d", + "license_type": "permissive", + "url": "https://github.com/geodynamics/specfem2d", + "science_area": "Earthquakes/Seismology", + "hints": [ + "specfem2d", + "xmeshfem3D" + ] + }, + { + "name": "hadoop", + "license_type": "permissive", + "url": "https://github.com/glennklockwood/myhadoop/", + "science_area": "Map Reduce", + "execmatch": [ + "^start-mapred.sh$", + "^start_my_hadoop$" + ], + "pathmatch": [ + "\\/hadoop", + "\\/myhadoop" + ] + }, + { + "name": "supremm", + "license_type": "permissive", + "url": "http://xdmod.sourceforge.net/", + "science_area": "System Monitoring", + "execmatch": [ + "^summarize_mpi.py$", + "^summarize_jobs.py$", + "^ldms2pcp.py$" + ] + }, + { + "name": "vpic", + "license_type": "permissive", + "url": "https://github.com/losalamos/vpic", + "science_area": "Plasmas/Magnetosphere", + "execmatch": [ + "^vpic", + "^waves.cxx.op$", + "^dipole.cxx.op$" + ] + }, + { + "name": "rmgdft", + "license_type": "permissive", + "url": "https://sourceforge.net/p/rmgdft/wiki/Home/", + "science_area": "Material Science", + "execmatch": [ + "^rmg" + ] + }, + { + "name": "ramses", + "license_type": "permissive", + "url": "http://dx.doi.org/10.1051/0004-6361:20011817", + "science_area": "Cosmology", + "execmatch": [ + "^euler_cpu", + "^euler_gpu", + "^euler_zslab" + ] + }, + { + "name": "lsqr", + "license_type": "permissive", + "url": "http://www.cs.ucf.edu/~lwang/LSQR.html", + "science_area": "Earthquakes/Seismology", + "execmatch": [ + "^plsqr_" + ] + }, + { + "name": "cg-md", + "license_type": "permissive", + "url": "http://pubs.acs.org/doi/abs/10.1021/ct400727q", + "science_area": "Molecular Dynamics", + "execmatch": [ + "^cg$" + ] + }, + { + "name": "ppm", + "license_type": "permissive", + "url": "https://www.xsede.org/documents/271087/586927/Woodward.pdf", + "science_area": "Turbulence", + "execmatch": [ + "^workerbee" + ] + }, + { + "name": "wsmp", + "license_type": "permissive", + "url": "http://researcher.watson.ibm.com/researcher/view_group.php?id=1426", + "execmatch": [ + "^wsmp_" + ] + }, + { + "name": "lsu3shell", + "license_type": "permissive", + "url": "https://arxiv.org/abs/1602.02965", + "execmatch": [ + "^lsu3shell" + ] + }, + { + "name": "sord", + "license_type": "permissive", + "url": "http://gely.github.io/coseis/docs/SORD.html", + "science_area": "Earthquakes/Seismology", + "execmatch": [ + "^sord" + ] + }, + { + "name": "grips", + "license_type": "permissive", + "url": "https://bluewaters.ncsa.illinois.edu/documents/10157/c321b78f-5176-495c-b34b-a229dbbf96a4", + "execmatch": [ + "^grips_bluew" + ] + }, + { + "name": "plascomcm", + "license_type": "permissive", + "url": "https://bitbucket.org/xpacc/plascomcm", + "science_area": "Physics", + "execmatch": [ + "^plascomcm" + ] + }, + { + "name": "mconv", + "license_type": "permissive", + "url": "https://bluewaterssymposium2015.sched.org/event/38Pr/astro-robert-f-stein-ab-initial-models-of-solar-activity", + "science_area": "Magnetohydrodynamics", + "execmatch": [ + "^mconv_" + ] + }, + { + "name": "INTERACTIVE", + "license_type": "permissive", + "execmatch": [ + "^ccmlaunch$" + ] + }, + { + "name": "cgmd", + "license_type": "permissive", + "url": "https://vothgroup.uchicago.edu/research/multiscale-theory-and-simulations-biomolecular-systems", + "science_area": "Molecular Dynamics", + "execmatch": [ + "^exeCGBW$", + "^exeCG2BW$" + ] + }, + { + "name": "3dh", + "license_type": "permissive", + "url": "http://www.ncsa.illinois.edu/news/stories/ESSsolar/", + "science_area": "Plasmas/Magnetosphere", + "execmatch": [ + "^3dh$", + "^3dh[[_+][0-9a-z]+" + ] + }, + { + "name": "hmc", + "license_type": "permissive", + "science_area": "Quantum Chromo Dynamics", + "execmatch": [ + "^hmc" + ] + }, + { + "name": "SYSTEM TESTING", + "license_type": "permissive", + "science_area": "None", + "execmatch": [ + "^ptest_", + "^prog_mpi$", + "^netgauge$" + ] } ] diff --git a/etl/js/config/supremm/applicationtables.js b/etl/js/config/supremm/applicationtables.js index 36f3aff6..5970531b 100644 --- a/etl/js/config/supremm/applicationtables.js +++ b/etl/js/config/supremm/applicationtables.js @@ -1,7 +1,44 @@ "use strict"; -var logger = { warning: function(s) { console.log(s) } }; +var logger = { warning: function(s) { console.log(s); } }; +var keyvaluetable = function(tablename) { + + var tabledata = { + 'NA': -1, + 'uncategorized': 1 + }; + var maxid = 2; + + return { + addrow: function(description) { + if (description in tabledata) { + return; + } + tabledata[description] = maxid++; + }, + getid: function(description) { + if (description) { + return tabledata[description]; + } + return tabledata.uncategorized; + }, + getsql: function() { + var mysql = require("mysql"); + + var row; + var rows = []; + + for (row in tabledata) { + if (tabledata.hasOwnProperty(row)) { + rows.push('(' + mysql.escape(tabledata[row]) + ',' + mysql.escape(row) + ')'); + } + } + + return 'INSERT INTO \n\t' + tablename + ' (id, description)\nVALUES \n\t' + rows.join(',\n\t'); + } + }; +}; module.exports = function(configfile) { @@ -10,58 +47,67 @@ module.exports = function(configfile) { var appconf = JSON.parse(fs.readFileSync(configfile)); + var appfos = keyvaluetable('`modw_supremm`.`application_fos`'); var appconfobj = {}; var maxid = 0; - for(var i = 0; i < appconf.length; i++) { - if( appconfobj[ appconf[i].name ] ) { + var i; + for (i = 0; i < appconf.length; i++) { + if (appconfobj[ appconf[i].name ]) { logger.warning("Duplicate application definitions for " + appconf[i].name + " only the final definition will be used."); } appconfobj[ appconf[i].name ] = appconf[i]; - maxid = Math.max(maxid, appconf[i].id); + if (appconf[i].id) { + maxid = Math.max(maxid, appconf[i].id); + } + if (appconf[i].science_area) { + appfos.addrow(appconf[i].science_area); + } } - - if( appconfobj['PROPRIETARY'] ) { - var proprietary_id = appconfobj['PROPRIETARY'].id; - } else { + if (!appconfobj.PROPRIETARY) { logger.warning("Adding an application definition for PROPRIETARY"); - maxid += 1; - var proprietary_id = maxid; - appconf.push({ id: proprietary_id, name: 'PROPRIETARY', license_type: 'permissive', hints: []}); + appconf.push({name: 'PROPRIETARY', license_type: 'permissive', hints: []}); + } + + // create autogenerated ids + for (i = 0; i < appconf.length; i++) { + if (!("id" in appconf[i])) { + appconf[i].id = ++maxid; + } } return { getsql: function() { var application_table = "`modw_supremm`.`application`"; - var applicationhint_table = "`modw_supremm`.`application_hint`"; + var applicationfos_table = "`modw_supremm`.`application_fos`"; var approws = []; - var hintrows = []; - for(var i = 0; i < appconf.length; i++) { - approws.push("(" + appconf[i].id + "," + mysql.escape(appconf[i].name) + "," + mysql.escape(appconf[i].license_type) + ")"); - var appid = (appconf[i].license_type == "permissive") ? appconf[i].id : proprietary_id; - for(var j=0; j < appconf[i].hints.length; j++) { - hintrows.push("(" + appid + "," + mysql.escape(appconf[i].hints[j]) + "," + appconf[i].id + ")"); - } + var i; + for (i = 0; i < appconf.length; i++) { + approws.push("\n\t(" + appconf[i].id + "," + + mysql.escape(appconf[i].name) + "," + + mysql.escape(appconf[i].license_type) + ',' + + mysql.escape(appfos.getid(appconf[i].science_area)) + ',' + + mysql.escape(appconf[i].url) + ")"); } - var apptablesql = [ - "LOCK TABLES " + applicationhint_table + " WRITE, " + application_table + " WRITE", - "DELETE IGNORE FROM " + applicationhint_table, + var apptablesql = [ + "LOCK TABLES " + applicationfos_table + " WRITE, " + application_table + " WRITE", + "DELETE IGNORE FROM " + applicationfos_table, "DELETE IGNORE FROM " + application_table, - "INSERT INTO " + application_table + " (id, name, license_type) VALUES " + approws.join(","), - "INSERT INTO " + applicationhint_table + " (id, hint, realid) VALUES " + hintrows.join(","), + "INSERT INTO " + application_table + " (id, name, license_type, application_fosid, url) VALUES " + approws.join(","), + appfos.getsql(), "UNLOCK TABLES" ]; return apptablesql.join(";\n"); } - } + }; }; /* Used for testing */ -if( require.main === module ) { +if (require.main === module ) { console.log(module.exports("./application.json").getsql()); } diff --git a/etl/js/config/supremm/dataset_maps/pcp.js b/etl/js/config/supremm/dataset_maps/pcp.js index 0bae2c60..b6ea0e8f 100644 --- a/etl/js/config/supremm/dataset_maps/pcp.js +++ b/etl/js/config/supremm/dataset_maps/pcp.js @@ -1,5 +1,7 @@ module.exports = function(config) { + var appident = require('../app_ident.js')(config.applicationDefn); + return { id: config.resource_id, name: config.resource, @@ -179,6 +181,23 @@ module.exports = function(config) { }; } }, + "application": { + formula: function(job) { + var exec = this.attributes.executable.formula.call(this, job); + if (exec.error) { + return exec; + } + + var app_id = appident(exec.value); + + if (app_id) { + return {value: app_id.name, error: 0}; + } + else { + return {value: "uncategorized", error: 0}; + } + } + }, "exit_status": { formula: function(job) { var exit = this.ref(job, "acct.exit_status"); diff --git a/etl/js/config/supremm/etl.profile.js b/etl/js/config/supremm/etl.profile.js index b61ce1a2..262ba364 100644 --- a/etl/js/config/supremm/etl.profile.js +++ b/etl/js/config/supremm/etl.profile.js @@ -106,6 +106,8 @@ module.exports = { db = getMongoSettings(config, datasetConfig[i]); + datasetConfig[i].applicationDefn = configRoot + "/application.json"; + this.datasets.push({ name: datasetConfig[i].resource, enabled: datasetConfig[i].enabled === undefined ? true : datasetConfig[i].enabled, diff --git a/etl/js/config/supremm/etl.schema.js b/etl/js/config/supremm/etl.schema.js index 3b4ab10d..ff8b64bf 100644 --- a/etl/js/config/supremm/etl.schema.js +++ b/etl/js/config/supremm/etl.schema.js @@ -82,11 +82,6 @@ module.exports = { var appload = require('./applicationtables.js'); return appload(__dirname + '/application.json').getsql(); } - }, - application_hint: { - schema: "modw_supremm", - definition: "static", - import_stmt: null } }, postprocess: [ @@ -324,13 +319,21 @@ module.exports = { dim_insert: function(attributes) { return { query: "INSERT IGNORE INTO modw_supremm.executable (`resource_id`, `exec`, `binary`, `exec_md5`, `application_id`) " + - "VALUES (:resource_id, :exec, substring_index(:exec,'/',-1), MD5(:exec), (SELECT if (:exec = 'NA', -1, " + - "COALESCE((SELECT id FROM modw_supremm.application_hint WHERE substring_index(:exec,'/',-1) LIKE hint ORDER BY id LIMIT 1)," + - "COALESCE((SELECT id FROM modw_supremm.application_hint WHERE substring_index(:exec,'/',-1) LIKE concat('%', hint, '%') ORDER BY id LIMIT 1),0)))))", - values: {resource_id: attributes.resource_id.value, exec: attributes.executable.value} + "VALUES (:resource_id, :exec, substring_index(:exec,'/',-1), MD5(:exec), COALESCE((SELECT id FROM modw_supremm.application WHERE `name` = :appname), -1) )", + values: {resource_id: attributes.resource_id.value, exec: attributes.executable.value, appname: attributes.application.value} }; } }, + application: { + unit: null, + type: "string", + dtype: "accounting", + group: "Executable", + nullable: false, + def: "NA", + comments: "The name of the application that ran", + per: "job", + }, exit_status: { unit: null, type: "string", @@ -1964,6 +1967,11 @@ module.exports = { table: "modw_supremm.datasource", where: "description = :datasource" }, + application: { + mapping: {application_id: "id"}, + table: "modw_supremm.application", + where: "name = :application" + }, cwd: { mapping: {cwd_id: "id"}, table: "modw_supremm.cwd", @@ -2176,7 +2184,7 @@ module.exports = { comments: "The application that the job ran. This value is autodetected based on the job executable path. A value of uncategorized indicates that the executable path was not recognized as a community application. A value of PROPRIETARY is shown for any application that has a non-open licence agreement that may restrict publishing of performance data. NA means not available.", per: "job", table: "job", - queries: ["executable"], + queries: ["application"], agg: { table: 'supremmfact', roles: { disable: [ "pub" ] }, diff --git a/etl/js/config/supremm/tests/pcp/expected/4655275-1445928790.json b/etl/js/config/supremm/tests/pcp/expected/4655275-1445928790.json index 1b42f6f5..0ea6ddfc 100644 --- a/etl/js/config/supremm/tests/pcp/expected/4655275-1445928790.json +++ b/etl/js/config/supremm/tests/pcp/expected/4655275-1445928790.json @@ -35,6 +35,10 @@ "value": "/util/academic/namd/NAMD_2.9_Source-IBVERBS/charmrun", "error": 0 }, + "application": { + "value": "charm++", + "error": 0 + }, "exit_status": { "value": "COMPLETED", "error": 0 diff --git a/etl/js/config/supremm/tests/pcp/expected/5659085-1469572318.json b/etl/js/config/supremm/tests/pcp/expected/5659085-1469572318.json index 31e29576..4fb72847 100644 --- a/etl/js/config/supremm/tests/pcp/expected/5659085-1469572318.json +++ b/etl/js/config/supremm/tests/pcp/expected/5659085-1469572318.json @@ -35,6 +35,10 @@ "value": "python", "error": 0 }, + "application": { + "value": "python", + "error": 0 + }, "exit_status": { "value": "TIMEOUT", "error": 0